Install Moodle on a Linux VPS
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 [email protected]
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/
Now we need to create a MySQL database and user. Enter into MySQL as root:
# 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.
Of course you don’t have to do any of this if you use one of our Linux VPS hosting services, in which case you can simply ask our expert Linux admins to install this for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.