What is Moodle ?
Moodle is a learning management system.
Essentially, it's an easy way for schools and teachers to give students marks, check their own work and keep track of their grades.
And it's all online. If you've ever worked with something like an online whiteboard or taken part in a course, then you know what we're talking about.
Moodle is distributed under the GNU GPL license and is completely free to use without user limits. It can be scaled to support thousands of users depending on server resources and system optimization.
Extensive communication is one of the strengths of moodle:
- The system supports the exchange of files in different formats.
- The newsletter service allows all course participants or individual groups to be informed promptly about current events.
- Course users can also communicate with one another by email, forum, chat, messaging, and webinar.
- A large selection of blocks (calendar, latest news, upcoming events etc. ) expand the functionality and usability of the system.
Additional function modules can be installed as needed. Moodle can be used for:
- Distance learning, where the teacher and learner do not meet in person most of the time;
- Distance support for face-to-face education, where the student can receive and submit assignments via moodle;
- Support for face-to-face education, allowing individual practical assignments, tests in moodle to be completed during face-to-face classes.
Preparing Ubuntu 20.04 for Moodle Installation
To run Moodle on Ubuntu 20.04, you need a web server, PHP, and a database server. In this guide, Apache is used as the web server.
this step will be skipped as we use an out-of-the-box solution when we set up the server. On our website we have instructions on how to install and configure apache.
Apache can be installed manually or preinstalled during server deployment, depending on your hosting provider.
Because apache was installed during the creation of the server, we can access our ip address in the webstring and we will see this message that apache is up and running.
Update our machine using the commands below:
It is required to install mysql client and server library, also don't forget php library to communicate with apache.
After this, additional software will need to be installed.
This will take longer because you need to install the multi-layered compatibility of the php, mysql,
prerequisite libraries to make them work together.
Do not forget to restart the apache web server:
To check the status of the web server, type the command below:
Go to the "opt" directory and clone what we need:
Cloning data to our server:
Once installed, navigate to the folder where we will download the desired files.(When we're done, we will simply move the folder to the directory we want)
List available branches, if needed:
After that, select a particular branch and install it:
Check the installed version of Moodle on our server:
Copy the directory where we downloaded all the data (in our case /opt/moodle, to the apache directory.
Example command:
Let's create a folder where the moodle data will be stored:
Do not forget to give it certain permissions:
sudo chmod -R 777 /var/moodledata
chmod ugoa=rwx /var/moodledata
sudo chmod -R 0755 /var/www/html/moodle
This folder will store lesson documents, not configuration files!
Preparing the MySQL Database for Moodle
The following configuration is only for those with MySQL version below 8.0, you can check the MySQL version with the command:
Configure the MySQL configuration file
Fore configure config you could use any text editor as you like, in our case it will be "nano".
It's required to add 3 lines of code at the end of the configuration file,
see how it's implemented in our case:
innodb_file_per_table = 1
innodb_file_format = Barracuda
Save the configuration file and restart the database.
Creating a database
The command below we connects to mysql:
Turn on support for 4 byte UTF 8:
Create a user for the database:
Grant full rights for our user:
Exit MySQL:
Grant access rights to the "moodle" folder:
Restart your server:
Completing the installation, setting up Moodle
After restarting, further configuration can be done from within the web interface:
If you have done everything correctly,
open your browser and type the ip address of your server into the web interface,
after it add the following "http://SERVER_IP/moodle/install.php".
You should get a window like this:
Then follow the instructions on the screen and set it up the way you want it!
Don't forget to change the path to your data folder:
In the following screenshot, specify the login and password for your created database.
Next you will need to wait for the installation to complete.
After the correct installation you will have the admin panel open.
Conclusion
This guide showed how to install and configure Moodle on an Ubuntu 20.04 server, including web server setup, PHP configuration, database preparation, and completing the installation via the web interface. Moodle is a flexible and scalable LMS suitable for educational and corporate learning platforms.