Home Joomla How to Install Joomla CMS in RHEL 8 Linux

How to Install Joomla CMS in RHEL 8 Linux

Joomla is an open-source CMS (Content Management System) primarily written in PHP programming language due to its scripting prowess.

It is characterized as free and open source to imply that any user who wishes to benefit from its usage has full control. Therefore, if you are interested in creating a blog/news/content site for a business or as a personal project, Joomla is an ideal candidate.


Ensure you have root/sudoer user privileges on the RHEL 8 system you are using.

Installing Apache Web Server in RHEL

Make sure the RHEL 8 system you are using is up-to-date for it to meet the needed performance requirements.

$ sudo dnf update && sudo dnf upgrade -y

Your Joomla CMS site will need to be served under a performant web server like Apache. Proceed and install it with the following command:

$ sudo dnf install httpd httpd-tools
Install Apache in RHEL Linux
Install Apache in RHEL Linux

Once installed, you can start, enable, and check on the status of your web server.

$ sudo systemctl start httpd
$ sudo systemctl enable httpd
$ sudo systemctl status httpd
Check Apache Status in RHEL
Check Apache Status in RHEL

Installing PHP in RHEL

To install the most recent version of PHP 8, you need to enable EPEL and Remi repositories as shown.

$ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
$ sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm

Next, you need to list, reset and enable the latest PHP module as shown.

$ sudo dnf module list php
$ sudo dnf module reset php
$ sudo dnf module enable php:remi-8.1

Finally, install PHP 8 along with its extensions.

$ sudo dnf install php php-opcache php-gd php-curl php-mysqlnd php-mbstring php-xml php-pear php-fpm php-mysql php-pdo php-json php-zip php-common php-cli php-xmlrpc php-xml php-tidy php-soap php-bcmath php-devel 
Install PHP in RHEL Linux
Install PHP in RHEL Linux

Once installed, you can start, enable, and check on the status of your php-fpm service.

$ sudo systemctl start php-fpm
$ sudo systemctl enable php-fpm
$ sudo systemctl status php-fpm
Check PHP-FPM Status
Check PHP-FPM Status

Enable Selinux for PHP execution.

$ sudo setsebool -P httpd_execmem 1

Installing MariaDB in RHEL

A database server is critical for storing user and system-generated data.

$ sudo yum install mariadb-server 
Install MariaDB in RHEL
Install MariaDB in RHEL

Once installed, you can start, enable, and check on the status of your MariaDB database server.

$ sudo systemctl start mariadb
$ sudo systemctl enable mariadb
$ sudo systemctl status mariadb
Check MariaDB Status in RHEL
Check MariaDB Status in RHEL

Next, you need to secure your MariaDB installation using the following security script.

$ sudo mysql_secure_installation 

It is through this command that you can choose to set the database root password and other pre-configurations.

Secure MariaDB in RHEL Linux
Secure MariaDB in RHEL Linux

Creating Joomla Database in RHEL

Login to the MariaDB database and create a Joomla user, database, and grant the user the required database permissions.

$ mysql -u root -p
MariaDB [(none)]> CREATE USER joomla@localhost IDENTIFIED BY "Your_preferred_joomla_user_password";
MariaDB [(none)]> CREATE DATABASE joomla_db;
MariaDB [(none)]> GRANT ALL ON joomla_db.* TO joomla@localhost;
MariaDB [(none)]> exit 
Create Joomla Database
Create Joomla Database

Install Joomla CMS in RHEL

Download the latest version of Joomla CMS from its official site or use the following wget command.

$ wget https://downloads.joomla.org/cms/joomla4/4-1-0/Joomla

Next, extract joomla to /var/www/html/joomla folder/directory and set directory ownership and permission.

$ sudo mkdir -p /var/www/html/joomla
$ sudo tar -xvf joomla.tar.gz -C /var/www/html/joomla
$ sudo chown -R apache:apache /var/www/html/joomla/
$ sudo chmod -R 755 /var/www/html/joomla/ 

Next, create and configure Joomla virtual host on Apache.

$ sudo nano /etc/httpd/conf.d/joomla.conf

Add the following virtual host configuration.

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /var/www/html/joomla/
    ServerName linuxshelltips.network
    ServerAlias www.linuxshelltips.network
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

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

Save and close the file and then check the apache configuration file’s syntax for errors.

$ sudo apachectl -t 

Configure Selinux to allow execution of PHP scripts of Joomla.

$ sudo semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/html/joomla(/.*)?" 
$ sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/joomla/installation/configuration.php-dist
$ sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/joomla/installation'  
$ sudo restorecon -Rv /var/www/html/joomla
$ sudo restorecon -v /var/www/html/joomla/installation/configuration.php-dist
$ sudo restorecon -Rv /var/www/html/joomla/installation
$ sudo chown -R apache:apache /var/www/html/joomla

Finally, restart the Apache webserver.

$ sudo systemctl restart httpd
Start Apache Web Server
Start Apache Web Server

Finalize Joomla CMS Installation

Access the domain name you configured for Joomla from your browser.


The first step is to set up your site name:

Set Joomla Site Details
Set Joomla Site Details

Enter your Joomla login data on the next screen capture:

Set Joomla Login Details
Set Joomla Login Details

The next screen will require you to set up a database connection based on the MariaDB credentials you created earlier.

Set Joomla Database Details
Set Joomla Database Details

Hit the install button and your Joomla CMS site should start installing.

Joomla Site Installation
Joomla Site Installation

Be patient as the installation process might take some time to complete. You can afterward log in to your new Joomla CMS site and configure it to your liking.

Joomla Installation Finishes
Joomla Installation Finishes

Your RHEL 8 machine is now ready to embrace Joomla CMS.

Ravi Saive
I am an Experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies. Founder of TecMint.com, LinuxShellTips.com, and Fossmint.com. Over 150+ million people visited my websites.

Each tutorial at UbuntuMint is created by a team of experienced writers so that it meets our high-quality standards.

Was this article helpful? Please add a comment to show your appreciation and support.

1 thought on “How to Install Joomla CMS in RHEL 8 Linux”

Got something to say? Join the discussion.

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published or shared. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.