Moodle is a course management system (CMS), also known as a learning management system (LMS) or a virtual learning environment (VLE). It is a free web application that educators can use to create effective online learning sites.
PHP Requirements for Moodle
- The iconv extension is required.
- The mbstring extension is recommended.
- The curl extension is required
- The openssl extension is recommended
- The soap extension is recommended
- The ctype extension is required.
- The zip extension is required.
- The gd extension is required
- The simplexml extension is required.
- The spl extension is required.
- The pcre extension is required.
- The dom extension is required.
- The xml extension is required.
- The json extension is required.
You can install all required PHP extensions by the following command
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
Download moodle into /usr/local/src
Extract moodle and move into DocumentRoot
#tar xvzf moodle-latest-26.tgz #mv moodle /var/www/html/moodle
Create Database and User in mysql
Enter into mysql as root
You need to enter mysql root password to enter in to mysql.
#mysql -u root -p
You will get mysql command tetminal.We need to create Database amd User for moodle.
I'm going to set database name, username , and password as 'moodle'.You can change it as per your wish.
mysql> create database moodle;
mysql> create user [email protected];
Set password for mysql user
mysql> set password for [email protected] = password ('moodle');
Allow Grant privileges to the user
mysql>GRANT ALL PRIVILEGES ON moodle.* to [email protected] identified by 'moodle';
mysql> flush privileges;
Now all the Activities in mysql is completed.You can simply logout from the mysql using quit
Set Ownership and permission in DocumentRoot
We need to set the Owner and group of moodle as apache.Set 755 permission to the /var/www/html/moodle folder
#chown -R apache:apache /var/www/html/moodle
#chmod -R 755 /var/www/html/moodle
Installation of moodle from the browser.
You can start installation of moodle via browse http://Public_IP/moodle You will get a language selection page.You can set language as per your wish.
Cick Next button.You will get a page which will explain all details about Web address, Moodle directory ,Data Directory
Then Click Next button.There is a propability of getting an error like Data directory (/var/www/moodledata) cannot be created by the installer.So We need to create /var/www/moodledata . This directory should be readable and writable by the web server user ('apache').
#mkdir /var/www/moodledata#chown -R apache:apache /var/www/moodledata
Now the problem will solve and you can select database driver on here.We are using mysql as database. So don't need to change any option.
Click Next button, You need to input database details here.
Click Next button, Then you will get a page, which will describe about license of moodle,
Click Continue to accept License.Then you will get a Server check page.If you are missing any packages here need to install it.If all requirements are okay , Then you will get a message "Your server environment meets all minimum requirements." in the bottom of the next page.Click Continue . Now installation is complete. You can setup admin details and use moodle site.
Moodle is successfully installed .You can use this as a course management system.