• 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 3.5 on Ubuntu 18.04

{{postValue.id}}

To install Moodle 3.5 on Ubuntu 18.04
Moodle is an open-source Learning Management System (LMS) and it has become one of the most popular LMSs among educators around the world as a tool for creating single robust, secure and integrated system that can help you create personalized learning environments and online courses as a dynamic website.In this tutorial, we will cover the installation of Moodle on Ubuntu 18.04.

Prerequisites
To install LAMP(Apache, MariaDB, php7)
In MariaDB (create database and user and give privileges to that user )

Php installation with required following modules

add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php7.0 php7.0-mysql php7.0-curl php7.0-json php7.0-cgi libapache2-mod-php7.0 php7.0-mcrypt php7.0-xmlrpc 
php7.0-gd php7.0-mbstring php7.0  php7.0-common  php7.0-xmlrpc php7.0-soap  php7.0-xml php7.0-intl  php7.0-cli  php7.0-ldap 
php7.0-zip php7.0-readline php7.0-imap php7.0-tidy php7.0-recode php7.0-sq php7.0-intl

Installation
Download a Moodle package using the following URL

root@linuxhelp1:~# wget https://download.moodle.org/download.php/direct/stable35/moodle-latest-35.tgz
--2018-06-05 10:24:17--  https://download.moodle.org/download.php/direct/stable35/moodle-latest-35.tgz
Resolving download.moodle.org (download.moodle.org)... 104.20.218.25, 104.20.219.25, 2400:cb00:2048:1::6814:da19, ...
Connecting to download.moodle.org (download.moodle.org)|104.20.218.25|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46289797 (44M) [application/g-zip]
Saving to: ‘;moodle-latest-35.tgz’;

moodle-latest-35.tgz    100%[==============================>]  44.14M   841KB/s    in 42s     

2018-06-05 10:25:00 (1.04 MB/s) - ‘;moodle-latest-35.tgz’; saved [46289797/46289797]


After Downloading extract the downloaded package

root@linuxhelp1:~# tar -zxvf moodle-latest-35.tgz
moodle/
moodle/report/
moodle/report/performance/
moodle/report/performance/classes/
moodle/report/performance/classes/privacy/
.
.
moodle/blocks/calendar_upcoming/version.php
moodle/blocks/calendar_upcoming/lang/
moodle/blocks/calendar_upcoming/lang/en/
moodle/blocks/calendar_upcoming/lang/en/block_calendar_upcoming.php
moodle/blocks/calendar_upcoming/block_calendar_upcoming.php
moodle/behat.yml.dist

Move the extracted file into the HTML directory

root@linuxhelp1:~# mv moodle /var/www/

Navigate to the apache document root directory

root@linuxhelp1:~# cd /var/www/

Change ownership and permission of the as Moodle follows

root@linuxhelp1:/var/www# chown -R www-data.www-data moodle
root@linuxhelp1:/var/www# chmod -R 775 moodle

Create a new virtual host configuration for accessing the Moodle

root@linuxhelp1:/var/www# vim /etc/apache2/sites-available/moodle.conf
<VirtualHost *:80>
ServerName www.linuxhelp1.com
DocumentRoot /var/www/moodle/

<Directory /var/www/moodle/>
AllowOverride All
allow from all
</Directory>

</VirtualHost>

Enable site access

root@linuxhelp1:/var/www# a2ensite moodle.conf
Enabling site moodle.
To activate the new configuration, you need to run:
  systemctl reload apache2


Disable default access

root@linuxhelp1:/var/www# a2dissite 000-default.conf
Site 000-default disabled.
To activate the new configuration, you need to run:
  systemctl reload apache2

Enable rewrite module

root@linuxhelp1:/var/www# a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
  systemctl restart apache2

Restart the apache service to make the changes effect

root@linuxhelp1:/var/www# systemctl restart apache2

Now you can proceed the further installation and configuration from the browser by navigating to the following URL: http://<ipaddress or domain name
browser_url

Here we have to choose the language to use the Moodle CMS
choose_language

Choose the installation paths
choose_path

Create a new directory and set permission and ownership

root@linuxhelp1:/var/www# mkdir moodledata
root@linuxhelp1:/var/www# chown -R www-data.www-data moodledata
root@linuxhelp1:/var/www# chmod -R 775 moodledata


Restart the apache service to make the changes effect

root@linuxhelp1:/var/www# systemctl restart apache2

Choose the Database as shown below
Choose_databse

Configure the Database setup as follows
database_setup

Choose the installation as shown below
choose_installation

Add the following lines into config-> my.ini (xampp server) or open my.cnf (Apache server)

root@www:~# vim /etc/mysql/mariadb.cnf
[..]
[client]
default-character-set = utf8mb4

[mysqld]
innodb_file_format = Barracuda
innodb_file_per_table = 1
innodb_large_prefix

character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
skip-character-set-client-handshake

[mysql]
default-character-set = utf8mb4
[..]

Restart the Mysql service to make the changes effect

root@www:~# systemctl restart mariadb

Verify the compatibility for installing Moodle as shown below
compitibility_check

After the configuration, you will see the following page as shown below
after_configuration

Configure the Admin user setup
admin_setup

Configure the Site information as follows
site_information

After the Successful login, you will see the Admin dashboard of Moodle as shown below
admin_dashboard

You will see the Homepage of Moodle as shown below
homepage_moodle


With this, the method to install Moodle 3.5 on Ubuntu 18.04 comes to an end.

Tags:
james
Author: 

Comments ( 1 )

sagarpawar
vim /etc/apache2/sites-available/moodle.conf not working
Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the latest version of Moodle?

A

You can always look for the latest releases of Moodle in https://download.moodle.org/download.php/direct/stable35/.

Q

How to resolve the database connection issue after moodle wizard setup?

A

Please provide valid Moodle Db credentials inside this /etc/mysql/mariadb.cnf.

Q

Is Moodle just for online learning?

A

It can be. However, in most cases Moodle is used to support and combine face-to-face interaction with e-learning, m-learning and other forms of learning.

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

What is Moodle?

A

Moodle is an open-source Learning Management System (LMS) and it has become one of the most popular LMSs among educators around the world as a tool for creating single robust, secure and integrated system that can help you create personalized learning environments and online courses as a dynamic website.

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 Isaac ?
How to run windows application in linux

I need to run the windows application in my Linux machine, instead of installing from yum repo or any other repos. How to do that..??

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.