Greenwebpage Community Blog Tutorials How to Install Joomla on Ubuntu 24.04
Tutorials

How to Install Joomla on Ubuntu 24.04

Joomla is a powerful content management system (CMS) for building web content. It supports many modern extensions and templates for the customization of your content. Moreover, Joomla has a strong community for support and resources.

Discover how to install Joomla on your Linux systems like Ubuntu 24.04, through this post.

How to Install Joomla on Ubuntu 24.04?

The following topics will be illustrated in this comprehensive post:

How to Install the Prerequisites for Joomla on Ubuntu 24.04?

Install Apache2 Server for Joomla on Ubuntu 24.04 System

Install PHP for Joomla on Ubuntu 24.04 System

Install MySQL Database Server for Joomla on Ubuntu 24.04

How to Install Joomla on Ubuntu 24.04?

How to Configure Joomla Web Installer on Ubuntu 24.04?

How to Install the Prerequisites for Joomla on Ubuntu 24.04?

In the first part of this article, you will learn about the primary prerequisites for Joomla and how it can be installed on Ubuntu 24.04.

Step 1: Update Ubuntu Packages

Check for the new updates on your Ubuntu 24.04 with the attached command:

sudo apt update && sudo apt upgrade -y

This command is essential for installing updates to your packages and improving your system’s functionality.

Install Apache for Joomla on the Ubuntu 24.04 System

The below commands can be utilized to install Apache2 Server for Joomla on your Ubuntu 24.04 system.

Step 1: Install Apache2

The Joomla package requires Apache2 to run smoothly. You can operate the command to install Apache2 on your Ubuntu system:

sudo apt install apache2 -y

If Apache2 is already installed on your system, a confirmation message will be displayed on your terminal.

Step 2: Verify Apache2 Status

Ensure that Apache2 is properly running on your Ubuntu machine. This command will show the current status of Apache2:

sudo systemctl status apache2

If you find that the apache2 services are active on your machine, you can proceed to the next step.

Note: The Apache2 service on Ubuntu 24.04 can be enabled and started with the following one-line command:

sudo systemctl start apache2 && sudo systemctl enable apache2

The script will easily start the Apache2 services on your machine.

Install PHP for Joomla on the Ubuntu 24.04 System

These are a few commands to install PHP and its necessary components for the Joomla package on your Ubuntu machine.

Step 1: Install PHP for Joomla

Run this command to install all the necessary PHP components to ensure that Joomla runs smoothly on your Ubuntu machine:

sudo apt install php libapache2-mod-php php-mysql php-xml php-mbstring php-curl php-zip php-intl -y

The confirmation message will be printed on your terminal after installing the PHP components.

Step 2: Check PHP Version

You can confirm the installed version of PHP on your system via this command:

php --version

As shown, we have the latest stable version of PHP (i.e. 8.3.6) on Ubuntu 24.04.

Install MySQL Database Server for Joomla on Ubuntu 24.04

MySQL server is an essential package to manage your Joomla database. You can install it on your Ubuntu system through the following commands.

Step 1: Install MySQL Database Server

To manage the database for Joomla, you will need a reliable database server, such as MySQL on your Ubuntu 24.04 system:

sudo apt install mysql-server -y

The above output confirms that we have already installed the newest version of MySQL server on the Ubuntu machine.

Step 2: Check MySQL Status

The attached command will confirm the running status of MySQL:

sudo systemctl status mysql

If the status is active, you can proceed to the next step.

Step 3: Create MySQL Database for Joomla

To create a database for Joomla, you need to log in to the MySQL shell:

sudo mysql -u root -p

Once you have logged in to the MySQL shell, type your script to create a database, for example:

CREATE DATABASE joomla_gwp_db;
CREATE USER 'joomla_gwp'@'localhost' IDENTIFIED BY 'Pass@135';
GRANT ALL PRIVILEGES ON joomla_gwp_db.* TO 'joomla_gwp'@'localhost';
FLUSH PRIVILEGES;

You can also check newly created databases, such as “joomla_gwp_db”:

SHOW DATABASES;
EXIT;

Exit from the MySQL shell with “EXIT;”.

How to Install Joomla on Ubuntu 24.04?

In this part, you will see a practical demonstration of how to install Joomla on Ubuntu 24.04.

Step 1: Download Joomla Package

Visit the official Joomla website to download the latest release of Joomla:

https://downloads.joomla.org/

Download the Joomla Package via “wget”

You can download the Joomla package using the “wget” command:

wget https://downloads.joomla.org/cms/joomla5/5-1-2/Joomla_5-1-2-Stable-Full_Package.zip

The wget command will fetch and download the Joomla package to your directory.

Step 2: Unzip the Joomla File to Root Directory

You will need the following command to extract the Zip file to the root directory “/var/www/html/joomla”:

sudo unzip Joomla_5-1-2-Stable-Full_Package.zip -d /var/www/html/joomla

Confirm the Joomla folder after extraction:

ls /var/www/html/

You will find a new directory, such as “joomla” in the root directory.

Step 3: Change Ownership of the Joomla Directory

Operate the following script to change the ownership of all files within the Joomla installation directory “/var/www/html/joomla”:

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

If the command returns an empty output, it means that you have changed the ownership of all files within “/var/www/html/joomla”.

Step 4: Set Necessary Permission

The below command will set the necessary permissions for the Joomla directory “/var/www/html/joomla”:

sudo chmod -R 755 /var/www/html/joomla

The above command will set permissions for the Joomla directory to be readable and executable by the owner and readable by others.

Step 5: Create Apache Configuration File for Joomla

Create an Apache configuration file (i.e. “joomla.conf”) for the Joomla package:

sudo nano /etc/apache2/sites-available/joomla.conf

Type your script for the Joomla virtual host. For instance, copy the following script for localhost:

<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot /var/www/html/joomla
ServerName localhost

<Directory /var/www/html/joomla>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/joomla_error.log
CustomLog ${APACHE_LOG_DIR}/joomla_access.log combined
</VirtualHost>

After configuring the Apache virtual host file, save and close the file.

Step 6: Enable the Joomla Site

The following command is used to enable the Joomla site configuration in Apache2:

sudo a2ensite joomla.conf

Step 7: Enable Rewrite Module

Execute this command to enable the “rewrite” module in Apache2:

sudo a2enmod rewrite

Step 8: Reboot Apache2 Server

After executing the commands as mentioned above, restart your Apache2 server to incorporate and apply the changes:

sudo systemctl restart apache2

So far you have successfully installed and configured the required software for Joomla.

Now, let’s proceed to the next step to complete the Joomla installation.

How to Configure Joomla Web Installer on Ubuntu 24.04?

You can easily configure the Joomla Web Installer to complete the installation by performing these steps.

Step 1: Access the Joomla Web Installer

Your Joomla site is now ready to be accessed through your web browser at your domain name, such as “http://localhost”:

http://localhost

Enter the relevant details in the following required fields:

Step 2: Specify Log-In Data

In the required fields below, enter the user data for the super user:

Step 3: Install Joomla

Enter the database name you created in the MySQL database server, for instance, “joomla_gwp_db”. Click on the “Install Joomla” button to complete the installation process:

Step 4: Open Site/Administrator

A greeting message on your screen indicates that the Joomla package has been installed on your system successfully. You can either open the site or open it as administrator from this page:

Step 5: Log in as a Joomla Administrator

To log in as a Joomla administrator, enter your credentials:

Here, you can see your Joomla Home Dashboard. You can utilize Joomla according to your needs:

Conclusion

Ubuntu 24.04 allows you to install the latest release of Joomla using simple steps. Joomla depends on the required software packages, Apache2, PHP, and MySQL. Ensure that you have installed these packages before installing the Joomla package. You can get the latest Joomla from its official website.

Exit mobile version