Install Moodle
Instalando moodle no Centos
Eu assumo que o apache e mysql já estejam instalados no servidor.
1 - Vá para moodle.org e download o último moodle*.tgz.
cd /tmp
wget http://download.moodle.org/stable19/moodle-weekly-19.tgz #Do not use this link. Get latest file from http://www.moodle.org/
2 - Como root:
yum install php php-mysql httpd mysqlclient10 mysql-server php-gd php-mbstring php-xmlrpc
3 - Se a sua instalaçã do mysql é recente, vc precisa ter a senha do root
service mysqld start
/usr/bin/mysqladmin -u root password 'newpassword'
4 - Inicie os serviços e tenha certeza que estão iniciando automaticamente
service httpd start
service mysqld start
chkconfig httpd on
chkconfig mysqld on
5 - Create a user moodle with a good password that has all privileges on the table moodle. I suggest that you download and install PhpMyAdmin to do it. Try the latest 2.xx.x.x version as it will work on Centos 5. To use PhpMyAdmin, you will need to create a file named config.inc.php inside PhpMyAdmin instalation folder (/var/www/html/phpmyadmin) with mysql information like root password defined on step 3.
config.inc.php example:
<?
$i = 1;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'newpassword';
?>
After configure PhpMyAdmin, open your favorite browser, point to PhpMyAdmin installation path and:
Privileges -> Add a new user -> Fill the form -> Click on "Create database with same name and grant all privileges" -> Go
Be sure to protect the access to your PhpMyAdmin as it will probably grant root access to anyone that knows its URL. It is a good idea to remove the entire directory after all is working as it is very easy to install it back. Password protect the directory may be good idea too.
6 - Extract files from moodle*.tgz at /var/www/html/moodle.
mkdir /var/www/html/moodle
cd /var/www/html/moodle
tar xvzf /tmp/moodle-weekly-19.tgz
7 - Start your favorite browser and point to your server /moodle directory. Follow installation instructions.