Would you like to learn how to install Moodle on a computer running Ubuntu Linux? In this tutorial, we are going to install and configure Moodle using the Nginx server on a computer running Ubuntu Linux.
• Ubuntu 18
• Ubuntu 19
• Ubuntu 20
• Nginx 1.18.0
• Moodle 3.9.1
Moodle Related Tutorial:
On this page, we offer quick access to a list of tutorials related to Moodle.
Tutorial Nginx – Moodle installation
Install the Nginx web server and a list of required packages.
Install the MySQL database service.
Install the PHP package.
Install other PHP modules.
Find the location of the PHP configuration file on your system.
Edit the configuration file named: PHP.INI.
Your PHP version may not be the same as ours.
Your PHP configuration file location may not be the same as ours.
Enable and configure the following items of the PHP configuration file.
Set the correct timezone to your location.
Edit the configuration file named: WWW.CONF.
Enable and configure the following item.
Edit the Nginx configuration file for the default website.
Enable the PHP support for Nginx.
Here is the original file, before our configuration.
Here is the new file with our configuration.
Verify if your Nginx configuration file has no error.
Here is the command output.
Restart the PHP service.
Restart the Nginx service.
Download and install the Moodle application.
Create a required directory named moodledata.
You have finished the Nginx service installation with PHP support.
Tutorial Moodle – Database Configuration
Access the MySQL service command-line.
Create a database named moodle.
Create a MySQl user named moodle.
In our example, the password kamisma123 was set to the MySQl user named moodle.
Give the MySQL user named moodle permission over the database named moodle.
You have finished the moodle database installation.
Tutorial – Moodle Web Installer
Open your browser and enter the IP address of your web server plus /moodle.
In our example, the following URL was entered in the Browser:
• http://192.168.0.10/moodle
The Moodle web installation interface should be presented.
Select the desired language and click on the Next button.
Check the moodle installation URL, directory, data directory and click on the Next button.
Select the Improved MySQL (native/mysqli) and click on the Next button,
Enter the Database information required to connect to the Moodle database.
• Database host: localhost
• Database name: moodle
• Database password: kamisama123
• Tables prefix: mdl_
On the next screen, read the license agreement and click on the the Next button.
Make sure all PHP requirements are met and click on the Continue button.
Wait the moodle installation to finish and click on the Continue button.
On the next screen, perform the following configuration:
• Username – Enter the administrative user account name desired
• Choose an authentication method – default
• New password – Enter the administrative user password
• First name – The administrator’s Name
• Surname – The administrator’s Surname
• email address – The administrator’s email address
• Select a Country – The administrator’s country
• Timezone – Select the desired timezone
Click on the Update Profile button.
Enter a name and a description to your Moodle website.
Select the correct timezone, disable the self registration feature and set an outgoing email address.
Click on the Save changes button to access the Moodle dashboard.
Congratulations! The Moodle installation was finished successfully.