XRL Tech Corner

Font size: +

Install Ubuntu Moodle

In this tutorial we are going to talk about one of the online content managers for learning based on online courses . It's about Moodle . We are going to dedicate this article to install Moodle in Ubuntu.

We will start by opening the Ubuntu virtual machine that we already created in a previous tutorial: how to install Ubuntu in a VirtualBox virtual machine.

And it will also be necessary to have the tutorial how to install Apache, MySQL and PHP in Ubuntu .

The first thing we are going to do when starting the operating system is to open a terminal with Ctrl + Alt + T.

Installing the database

Carlos @ tutorial: ~

Once we are inside we will create the database within MySQL that will house the Moodle engine.

To do this we are going to connect as administrator to the database through the mysql client:

mysql -u root -p

If we do not specify a password when installing the MySQL package, the password will usually be blank, so just press the "Return" key when you ask for it.

Next we will create the database with the following sentence:


Now we will create a user that will be called mood to connect to the database from Moodle :

CREATE USER mood @ localhost IDENTIFIED BY 'mood1234';

Next we will give privileges to that user for the moodle database:

GRANT ALL PRIVILEGES ON moodle. * TO mood @ localhost;

To consolidate these permits we must record them with the following command:


Once these actions are done, we will write exit to exit the mysql client.

Then we can go to the official website to download Moodle in its latest version 3.1 or do it directly with wget from the console.

For this we will go to our main user directory by typing the cd statement and download the latest version available with the sentence:

wget http://download.moodle.org/download.php/direct/stable31/moodle-latest-31.tgz

We will unpack it with the order:

tar zxvf moodle-latest-31.tgz

We will create the Moodle data directory (usually a directory called moodledata ) in our $ HOME user directory.

mkdir $ HOME / moodledata

You will have to have assigned the owner www-data so we will proceed to change it:

sudo chown -R www-data: www-data moodledata

As always, once the download of the programs is finished, we will erase the tgz file to free up disk space.

Once the file is unpacked, we will have to copy all that directory called moodle to the directory where we have the html files that the Apache web server uses.

On our website we will have a landing page and a route / moodle where the Moodle engine will be, with which we could locate the files   right inside the html folder:

sudo mv ~ / moodle / var / www / html /

The sudo will ask you to enter the user password.

Now we must change the owner of the files to be www-data, which is the user that Apache habitually uses.

sudo chown -R www-data: www-data / var / www / html / moodle

Perfect, now we will continue the installation from the web browser.

For this we will enter the browser specifying our IP address (or localhost) and access the Moodle installation screen.

http: // localhost / moodle

In the installation screen, we will select the language "Spanish - international (es)" from the drop - down list and click " Next ".

install moodle language

Then we must enter the routes where Moodle is located and its data. We will specify a user path for the data directory, since it is not recommended to save the data in the html folders of the web server.

Then click on " Next ".

install moodle dirs

In the next screen we will select the MySQL database driver. We will leave the selected type by default and click " Next ".

install moodle driverbd

In the next screen we will show the database configuration, so we will have to enter the name of the database " moodle ", the user " mood " and the password " mood1234 " that we have previously created. The other data will be left by default. Then click on "Next ".

install moodle configbd

Once done we will see that you will ask to accept the terms and conditions.

Click on " Continue ".

install moodle conditions

Next we will see the screen of minimum requirements correct.

Click on "Continue".

install moodle reqs ok

With that we will arrive at the screen where the results of installation of the Moodle components will appear. Click on " Continue ".

install moodle test ok

Next we will have to create the administrator user.

The necessary data will be the name and surname, the password and the email address. Additionally we can specify a city, a country and a description. Then we will click on "Update personal information".

install moodle create admin

In the next screen we will have to specify the name and alias of the website and an optional description. As well as the time zone, and identification management, that is, if you will send emails when users register in the registration process. Once done click on "Save changes".

install moodle config site

And that's it!. In the next screen we will see the user's personal area, which in this case will be the administrator of the site.

install moodle admin logged

In the administration screen we will see that we can create courses, administer the site, manage and see the users, manage the badges (they are like virtual diplomas) that can be granted to the students once they have approved the courses.

Obviously Moodle has many other configuration options, but the goal of this tutorial is to perform the installation and configuration by default.

In summary, we have made the installation and basic configuration of this LCMS called Moodle in our virtual machine with Ubuntu 14.04.

Rate this blog entry:
Install Joomla on Ubuntu
Install Drupal 8 on Ubuntu

Related Posts



No comments made yet. Be the first to submit a comment
Wednesday, 18 September 2019

Captcha Image