Skip to content

Instructions for Setting Up Moodle Learning Management System on Ubuntu Server Version 24.04

Discover the process of setting up Moodle Learning Management System on Ubuntu 24.04 Server to establish digital learning environments. Follow this tutorial step by step to complete the installation.

Guide to Setting Up Moodle Learning Management System on Ubuntu 24.04 System Server
Guide to Setting Up Moodle Learning Management System on Ubuntu 24.04 System Server

Instructions for Setting Up Moodle Learning Management System on Ubuntu Server Version 24.04

Welcome to our guide on installing Moodle LMS, the open-source learning platform, on an Ubuntu 24.04 LTS server. This article outlines the process of preparing the server, installing and configuring the LAMP stack (Apache, MariaDB, PHP), securing the environment, and finally installing Moodle itself.

1. Initial Server Preparation

To get started, you'll need an Ubuntu 24.04 LTS server with sudo or root access. Begin by updating package lists and upgrading existing packages:

Next, install essential utilities:

2. Install and Configure Apache Web Server

Install Apache2:

Enable Apache to start on boot and start the service:

(Optional) Configure Apache to allow .htaccess overrides if needed:

Ensure the section has .

Reload Apache after configuration changes:

3. Install and Configure MariaDB (MySQL compatible)

Install MariaDB server and client:

Start and enable MariaDB:

Secure MariaDB installation:

  • Set root password, remove anonymous users, disallow root login remotely, remove test database.

Login to MariaDB and create Moodle database and user:

Then inside MariaDB console:

4. Install PHP and Required Extensions

Moodle 5.0 requires PHP 8.1 or newer with several extensions. Install PHP and necessary extensions:

Enable PHP modules if necessary and restart Apache:

Verify PHP version:

5. Download and Configure Moodle

Navigate to the web root or preferred directory:

Download the latest stable Moodle release (5.0 or current stable):

Create Moodle data directory outside web root, e.g., :

6. Configure Apache Virtual Host for Moodle

Create a new Apache site config file, e.g., :

```

```

Enable new site and rewrite module:

7. Configure Firewall (ufw)

Allow OpenSSH and HTTP/HTTPS:

8. Finalize Moodle Installation via Web Installer

Open a browser and navigate to:

Follow the Moodle web installation wizard:

  • Choose language
  • Confirm paths: Moodle code directory and Moodle data directory ()
  • Provide the database details created earlier (, , password)
  • Create admin user
  • Configure site settings

Optionally, configure HTTPS by obtaining an SSL certificate (e.g., via Let's Encrypt).

This step-by-step approach follows the official Moodle installation guide for Ubuntu 24 LTS and incorporates server setup, LAMP stack components, and firewall configuration for a secure and functional Moodle LMS system on your server.

Deploy Moodle LMS on Shape.Host Linux SSD VPS using this link: our website.host

Choose Ubuntu 24.04 to set up your online learning platform. During the installation, select your default language for Moodle and input your MariaDB database details. In Step 10, install Certbot and generate an SSL certificate.

[1] Moodle documentation: https://docs.moodle.org/39/en/Installing_Moodle

  1. Technology plays an essential role in this guide, as we'll be installing and configuring the LAMP stack, which comprises Apache (web server), MariaDB (MySQL compatible database system), and PHP, to run Moodle, a popular open-source learning platform.
  2. The Moodle installation process involves downloading the latest stable Moodle release and then using technology such as PHP, Apache, and MariaDB to set up the learning management system.

Read also:

    Latest