Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments. It has several features considered typical of an e-learning platform, in addition to some original innovations like its filtering system. Moodle is a learning management system (LMS) and can be used in many types of environments such as in education, training and development, and business settings.
In this guide, we’ll show you how to install Moodle on a Linux VPS.
First you need to login to your Centos 6 virtual private server as user ‘root’ .
# ssh root@hostname
Install PHP extensions
# yum -y install php-common php-cli php-pear php php-pdo php-mysql libXpm php-gd php-xml php-mbstring php-xmlrpc php-intl php-soap
Restart Apache web server
Download Moodle in /opt
# cd /opt # wget http://nchc.dl.sourceforge.net/project/moodle/Moodle/stable26/moodle-latest-26.tgz
Extract Moodle and move the installation into your document root directory (which in our case is /var/www/html/):
# tar xvzf moodle-latest-26.tgz # mv moodle/ /var/www/html/
# mysql -u root -p mysql> create database moodle; mysql> grant all privileges on moodle.* to 'moodleuser'@'localhost' identified by 'YOUR_PASSWORD'; mysql> flush privileges; mysql> exit
Set the owner and group of Moodle as apache. We also need to create a moodledata directory in /var/www/ for the files that are created by the Moodle interface, then set the correct permissions of /var/www/html/moodle and the newly created /var/www/moodledata directory.
# chown -R apache:apache /var/www/html/moodle # chmod -R 755 /var/www/html/moodle # mkdir /var/www/moodledata # chown -R apache:apache /var/www/moodledata
You can start the installation of Moodle from your favourite browser using http://Your_Public_IP/moodle. Follow the instructions and enter your MySQL database and user credentials when prompted.