• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Moodle - CMS tool in Ubuntu

{{postValue.id}}

To Install Moodle in Ubuntu

Moodle is an open source CMS software that is used for creating E-learning websites, course materials, online tests, and many more related things. Its an efficient tool for both the teachers and learners, as its interface is simple to follow. This article covers the in-depth yet comprehensive installation procedure of Moodle.

Features

  • User Friendly Interface
  • Simple and intuitive text editor
  • Rich Media Interaction
  • Personalized Dashboards
  • Abundant collaborative tools
  • Contains built-in Wiki Module
  • Supports Discussion Forums, Blogs, RSS feeds, etc.


To install LAMP server

In order to install Moodle in your Ubuntu, prior installation of LAMP server is necessary. It can be done by using the following command.

root@linuxhelp:~# apt-get install lamp-server^ -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting ' apache2-utils'  for task ' lamp-server' 
Note, selecting ' liblua5.1-0'  for task ' lamp-server' 
Note, selecting ' mysql-server-core-5.6'  for task ' lamp-server' 
Note, selecting ' mysql-server-5.6'  for task ' lamp-server' 
Note, selecting ' libaio1'  for task ' lamp-server' 
Note, selecting ' mysql-client-core-5.6'  for task ' lamp-server' 
Note, selecting ' libaprutil1'  for task ' lamp-server' 
Note, selecting ' libapache2-mod-php5'  for task ' lamp-server' 
Note, selecting ' php5-mysql'  for task ' lamp-server' 
.
.
.
Module mpm_event disabled.
Enabling module mpm_prefork.
apache2_switch_mpm Switch to prefork
apache2_invoke: Enable module php5
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...


To download and extract the Moodle package

Once LAMP server is installed, change your current directory to the default document root of Apache to download Moodle package.

root@linuxhelp:~# cd /var/www/html/
root@linuxhelp:/var/www/html# wget https://download.moodle.org/download.php/direct/stable30/moodle-latest-30.tgz
--2016-10-19 11:59:04--  https://download.moodle.org/download.php/direct/stable30/moodle-latest-30.tgz
Resolving download.moodle.org (download.moodle.org)... 104.20.1.239, 104.20.0.239, 2400:cb00:2048:1::6814:1ef, ...
Connecting to download.moodle.org (download.moodle.org)|104.20.1.239|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 38213274 (36M) [application/g-zip]
Saving to: ‘ moodle-latest-30.tgz’ 

moodle-latest-30.tgz                        100%[==========================================================================================> ]  36.44M   673KB/s   in 58s    

2016-10-19 12:00:04 (641 KB/s) - ‘ moodle-latest-30.tgz’  saved [38213274/38213274]

The Moodle package can be extracted with the help of tar command as given below.

root@linuxhelp:/var/www/html# tar -xzvf moodle-latest-30.tgz
moodle/
moodle/comment/
moodle/comment/classes/
moodle/comment/classes/external.php
moodle/comment/comment_ajax.php
moodle/comment/tests/
moodle/comment/tests/externallib_test.php
moodle/comment/comment.js
moodle/comment/index.php
moodle/comment/locallib.php
moodle/comment/lib.php
.
.
.
moodle/auth/db/db/install.php
moodle/auth/nologin/
moodle/auth/nologin/lang/
moodle/auth/nologin/lang/en/
moodle/auth/nologin/lang/en/auth_nologin.php
moodle/auth/nologin/version.php
moodle/auth/nologin/auth.php

Once the package is extracted, the user ownership and permissions for the Moodle directory has to be set.

root@linuxhelp:/var/www/html# chown -R www-data:www-data /var/www/html/moodle
root@linuxhelp:/var/www/html# chmod -R 775 /var/www/html/moodle

Now create a data directory for Moodle and set the permission as follows.

root@linuxhelp:/var/www/html# mkdir /var/www/moodledata
root@linuxhelp:/var/www/html# chmod 777 /var/www/moodledata/
root@linuxhelp:/var/www/html# chown -R www-data:www-data /var/www/moodledata


To create user Database with MySQL

Keep track of the following process to create a user database for Moodle using MySQL.

root@linuxhelp:/var/www/html# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with   or g.
Your MySQL connection id is 2
Server version: 5.6.31-0ubuntu0.15.10.1 (Ubuntu)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ' help '  or ' h'  for help. Type ' c'  to clear the current input statement.

mysql>  create database moodledb 
Query OK, 1 row affected (0.03 sec)

mysql>  CREATE USER ' moodleuser' @' localhost'  IDENTIFIED BY ' 123'  
Query OK, 0 rows affected (0.06 sec)

mysql>  GRANT ALL ON moodledb.* TO ' moodleuser' @' localhost'  
Query OK, 0 rows affected (0.00 sec)

mysql>  flush privileges 
Query OK, 0 rows affected (0.00 sec)

mysql>  exit 
Bye


To configure Virtual Host for moodle

It is necessary to configure Apache Virtual Host to access Moodle, and it can be done with the following command.

root@linuxhelp:~# vim /etc/apache2/sites-available/moodle.conf
< VirtualHost *:80> 
ServerAdmin admin@linuxhelp.com
DocumentRoot /var/www/html/moodle
ServerName linuxhelp.com
ServerAlias www.linuxhelp.com
< Directory /var/www/html/moodle/> 
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
< /Directory> 
< /VirtualHost> 

Once Apache Virtual Host is configured, create soft link for it as follows.

root@linuxhelp:~# ls -n /etc/apache2/sites-available/moodle.conf /etc/apache2/sites-enabled/
-rw-r--r-- 1 0 0 300 Oct 19 12:05 /etc/apache2/sites-available/moodle.conf
/etc/apache2/sites-enabled/:
total 0
lrwxrwxrwx 1 0 0 35 Oct 19 11:58 000-default.conf ->  ../sites-available/000-default.conf


To install PHP extentions

Now it is required to install the PHP extensions for proper functioning of Moodle. Trigger the following command for the same.

root@linuxhelp:~# apt-get install php5-curl php5-gd php5-xmlrpc php5-intl -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php5-curl php5-gd php5-intl php5-xmlrpc
0 upgraded, 4 newly installed, 0 to remove and 255 not upgraded.
Need to get 203 kB of archives.
After this operation, 793 kB of additional disk space will be used.
.
.
.
root@linuxhelp:~# apt-get install php5-curl php5-gd php5-xmlrpc php5-intl -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
php5-curl php5-gd php5-intl php5-xmlrpc
0 upgraded, 4 newly installed, 0 to remove and 255 not upgraded.
Need to get 203 kB of archives.
After this operation, 793 kB of additional disk space will be used.

Once PHP extensions are installed, restart the Apache service by setting off the following command.

root@linuxhelp:~# systemctl restart apache2


To install and configure Moodle

Once the previous procedures are completed, its time to install Moodle by calling the URL http://192.168.5.146/moodle on your browser.

you need to change your IP address or Hostname

Moodle-install-open-browser

Choose your desired language.

Moodle-language

Moodle-directory

Choose the Database.

Moodle-Choose-Database

Configure the Database.

Moodle-Database-setting

Moodle-installation

Moodle-install

Moodle-configure

Create an user account

Moodle-user-account

Configure your site as you desire.

Moodle-Configure

Moodle-site

Tags:
elijah
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Do I have to be really good with technology to use Moodle?

A

To use Moodle, you only need the basic web browsing skills. To install it you need a little more knowledge, but guidance is provided.

Q

How can I communicate with students by using Moodle?

A

Many ways are available. Some examples include: Forums are great for extended conversations over time, Messages for private channels, Chat for synchronous conversations, and Comments for quic

Q

When I spotted a bug in the system. What do I do?

A

Go to Tracker, search if the bug has already been reported and create a new issue if not.

Q

How much does it cost to have Moodle hosted?

A

There are many options for hosting. Cost is usually related to services provided and capacity (eg. a university site with 10 000 users will naturally cost more to host and maintain than a sma

Q

How do I log in to Moodle?

A

Go to the right URL (address) of the Moodle site, login with your username and password, or enter as a Guest (if allowed). Most Moodle sites will have a link to set up a new account or request forgotten details of your existing one.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Sebastian ?
How to change non required to required field in SuiteCRM Custom/Default Modules

How to change not required to the required field in SuiteCRM Custom/Default Modules?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.