Install Moodle 4.3 on Ubuntu 23.10
Moodle, an acronym for Modular Object-Oriented Dynamic
Learning Environment, is a robust open-source platform designed to facilitate
online learning and course management. Developed by Martin Dougiamas in 2002,
Moodle has evolved into one of the most widely used Learning Management Systems
(LMS) globally.
Whether you are an educator, administrator, or
learner, Moodle offers a robust and flexible environment for creating and
participating in online courses. In this tutorial, we will learn how to install
Moodle 4.3 with the following specifications:
· Virtual Cloud Server: 1 CPU, 1 GB RAM, 32 GB Storage
·
Operating System: Ubuntu 22.04 LTS
·
Subdomain: admission.sherubtse.edu.bt
·
SSL: Let’s Encrypt
·
Web Server: Apache
·
PHP: PHP v8.2
·
Database: MariaDB v10.6
·
Moodle: Moodle v4.3.2
Step 1: update system packages
sandip@admission:~# sudo
apt update
sandip@admission:~# sudo apt upgrade
Step 2: Install dependencies – install the required dependencies for Moodle, Apache web server, PHP and MariaDB database:
sandip@admission:~# sudo apt install apache2 libapache2-mod-php
php-mysql php-mbstring php-curl php-tokenizer php-xmlrpc php-soap php-zip
php-gd php-xml php-intl mariadb-server -y
sandip@admission:~# sudo vim
/etc/php/8.2/apache2/php.ini
Note: Some ubuntu doesn’t have preinstalled vim
editor. To download vim use the
command: apt install vim
Max_input_vars
= 5000
Step 3: Create a Database
Log in to
MariaDB
sandip@admission:~# mysql
Creating a
database for Moodle:
>CREATE DATABASE database_name;
>GRANT ALL PRIVILEGES ON database_name.*
TO ‘vle’@’localhost’ IDENTIFIED BY ‘password’;
>FLUSH PRIVILEGES;
> EXIT
Step 4: Download Moodle – download Moodle
v4.3.2 from https://download.moodle.org:
sandip@admission:~# sudo wget https://packaging.moodle.org/stable403/moodle-4.3.2.tgz
Extract moodle-4.3.2.tgz:
sandip@admission:~#
sudo tar xzvf moodle-4.3.2.tgz
Move the moodle directory to /var/www/sherubtse_vle/moodle-app:
sandip@admission:~# mkdir
/var/www/sherubtse_vle
sandip@admission:~# mv moodle /var/www/sherubtse_vle/moodle-app
Create the moodle-data directory
sandip@admission:~#
mkdir
/var/www/sherubtse_vle/moodle-data
Change user-group and permissions for the sherubtse_vle directory
sandip@admission:~#
chown -R www-data:www-data
/var/www/sherubtse_vle
Step
5:
Configure Virtual Host
Create a virtual host configuration for the
subdomain admission.sherubtse.edu.bt:
sandip@admission:~# sudo vim /etc/apache2/sites-available/sherubtse_vle.conf
<VirtualHost *:80>
ServerName admission.sherubtse.edu.bt
DocumentRoot
/var/www/sherubtse_vle/moodle-app
<Directory
/var/www/sherubtse_vle/moodle-app>
Options -Indexes +FollowSymLinks
+MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog
/var/log/apache2/sherubtse_vle_error.log
CustomLog
/var/log/apache2/sherubtse_vle_access.log combined
</VirtualHost>
Enable the rewrite module, virtual host and restart
Apache:
sandip@admission:~#
sudo a2enmod rewrite
sandip@admission:~#
sudo a2dissite 000-default.conf
sandip@admission:~#
sudo a2ensite sherubtse_vle
sandip@admission:~#
sudo systemctl restart apache2
check the status of the UFW firewall:
sandip@admission:~#
sudo ufw enable
sandip@admission:~#
sudo ufw status
If UFW is active, allow HTTP and HTTPS
sandip@admission:~#
sudo ufw allow http
sandip@admission:~#
sudo ufw allow https
Step 7: Web installation
Continue the installation in the web browser. Choose
the language, for example English (en), and then click
the Next.
Enter the path for the Moodle Data
directory, which is /var/www/sherubtse_vle/moodle-data,
then click the Next:
Database driver, choose MariaDB (native/mariadb), then click Next.
Enter database settings. Input Database
name, Database user, and Database password. Then click Next:
Copyright notice, click Continue to confirm.
Checking if the server environment meets all the requirements. Click Continue if everything is OK:
The installation is in progress, click Continue when it’s finished:
Creating an admin account, then click Update profile.
Configure Site home settings, then click Save changes:
Congratulations! We have successfully installed Moodle 4.3 on Ubuntu 22.04. Let’s explore the platform’s features, customize our courses, and embark on a journey of seamless online learning with Moodle.
Reference:
https://vle.sherubtse.edu.bt/









Comments
Post a Comment