How to install Moodle 2.9 on CentOS/RHEL 7/6/5

Share It!

Moodle (Modular Object-Oriented Dynamic Learning Environment) is a free open-source learning management system or e-Learning platform, that makes it easy for you to provide online support for your course. Moodle provides a place where you can easily create web pages with information about your course and provide links to word documents, slides, and other resources that your students will want to access.

welcome1

The department and the university provide a wealth of materials and resources, but catering for so many different types of students it can be hard for learners to find those that are most relevant to them. You can use your Moodle to provide links directly to the resources that will be most useful for your students whether e-library resources, skills courses, or information

Advantages:

  • Save time and money
  • Use less paper
  • Designed to encourage collaborative learning
  • Easy to experiment with new ideas and tools
  • Manage your materials

    Other Features & Tools:

  • Course calendar
  • Profiles and contact information
  • Deliver content
  • Video and audio
  • Group tools for students

    Install Required Packages

    Install order to setup Moodle first we need to install all required packages. First we need to install and configure LAMP and after that all PHP extension.
    install LAMP on CentOS/RHEL 5/6
    Install LAMP on CentOS/RHEL 7

    # yum install php-iconv php-mbstring php-curl php-openssl php-tokenizer php-xmlpc php-soap php-ldap php-pecl-apc
    # yum install php-ctype php-zip php-gd php-simplexml php-spl php-pcre php-dom php-xml php-intl php-json 
    # yum install wget
    

    Download Moodle and Decompress

    After downloading all require packages now we download Moodle and decompress it. You can directly download latest version of moodle from https://download.moodle.org/

    # cd /var/www/html
    # wget https://download.moodle.org/download.php/direct/stable29/moodle-latest-29.zip
    # unzip moodle-latest-29.zip
    

    Set the following permissions for apache user to moodle directory:

    # chmod -R 755 /var/www/html/moodle
    # chown -R apache.apache /var/www/html/moodle
    

    Create data directory for Moodle

    Moodle obliges a directory to store all its files, session information and so on. The web server needs to be able to write to this directory. This directory must NOT be accessible directly via the web.

    # mkdir /var/www/html/moodledata
    

    Set the following permissions for apache user to moodle directory:

    # chmod -R 777 /var/www/html/moodledata
    # chown -R apache.apache /var/www/html/moodledata
    

    Configure Web Server VirtualHost

    Now we will create a VirtualHost in Apache configuration file /etc/httpd/conf.d/moodle.techoism.com.conf

    <VirtualHost *:80>
    ServerName moodle.techoism.com
    ServerAlias www.moodle.techoism.com
    DocumentRoot /var/www/html/moodle
    ErrorLog /var/log/httpd/moodle.techoism.com_error_log
    CustomLog /var/log/httpd/moodle.techoism.com_access_log combined
    DirectoryIndex index.html index.htm index.php index.php4 index.php5
    <Directory /var/www/html/moodle>
    Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
    Allow from all
    AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
    </Directory>
    </VirtualHost>
    

    Restart Apache Server to reload changes.

    For CentOS 5/6
    # service httpd restart
    For CentOS 7
    # systemctl restart httpd
    

    Finally Start Moodle Web Installer

    Open up your web browser and navigate to http://moodle.techoism.com and follow instruction:
    moodle

    In next step we will mention Web Address, Moodle directory and Data directory path.
    moodle1

    Select the database driver and press next.
    moodle2

    Enter Database name and other require information and press next.
    moodle3

    Now click on Continue to accept the License Agreement.
    moodle4

    Now the installer will check for all require modules are installed, press continue.
    moodle5

    Installing all Moodle modules. Click continue when complete.
    moodle6

    Create a Administrator account and click Update.
    moodle7

    Now do all require setting, press save.
    moodle8

    Now your moodle site has been successfully installed.
    moodle9

    See Also:
    How To Install Moodle on Ubuntu using Nginx

    Enjoy it!

  • Comments
    1. 1 year ago
      • 1 year ago
      • 1 year ago
        • 1 year ago
    2. 1 year ago
    3. 1 year ago
    4. 10 months ago
      • 10 months ago
    5. 1 year ago

    Leave a Reply

    Your email address will not be published.