Install and Configure Joomla on Rocky Linux 8

This tutorial intends to teach you Install and Configure Joomla on Rocky Linux 8.

Joomla is an open-source content management system(CMS). It helps you build powerful dynamic websites and applications. It has an intuitive interface that helps you use its features and functionality to the fullest.

Install and Configure Joomla on Rocky Linux 8

To install Joomla, you need to log in to your server as a non-root user with sudo privileges and set up a basic firewall. To do this, you can follow our guide the Initial Server Setup with Rocky Linux 8.

Also, you need to have the LAMP stack installed on your server. For this, check our article How To Install LAMP Stack on Rocky Linux 8.

Now follow the steps below to complete this guide.

Install PHP Modules on Rocky Linux 8

We assumed that you have the LAMP stack installed on your server. First, you need to install some additional PHP modules on Rocky Linux 8 with the following command:

sudo dnf install php-curl php-xml php-zip php-mysqlnd php-intl php-gd php-json php-ldap php-mbstring php-opcache

Then, you should make some configuration changes to the php.ini file.

Open the file with your favorite text editor, here we use vi:

sudo vi /etc/php.ini

Find the lines below and set them to the values as shown below:

memory_limit = 256M
output_buffering = Off
max_execution_time = 300
date.timezone = America/New_York

When you are done, save and close the time.

Note: Remember to set a timezone of your own.

Create a Joomla Database on Rocky Linux 8

At this point, you need to create a database for your Joomla. First, log in to your MariaDB shell with the following command:

sudo mysql -u root -p

Then, from your MariaDB shell run the command below to create the database, here we named it joomla_db:

MariaDB [(none)]> CREATE DATABASE joomla_db;

Next, use the command below to create a Joomla user and grant all privileges to it on Rocky Linux 8, here we named it joomla_user and set a strong password for it:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost' IDENTIFIED BY 'password';

Flush the privileges and exit from your MariaDB shell:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Set up Joomla on Rocky Linux 8

Now you can start to install Joomla on your server. First, visit the Joomla Downloads Page and get the Full zip package of the latest version of Joomla.

wget https://downloads.joomla.org/cms/joomla4/4-1-2/Joomla_4-1-2-Stable-Full_Package.zip?format=zip

When your download is completed, unzip your downloaded file to the /var/www/html/joomla directory with the command below:

sudo unzip Joomla_4-1-2-Stable-Full_Package.zip?format=zip -d /var/www/html/joomla

Then, set the correct permissions and ownership to your Joomla directory:

sudo chown -R apache:apache /var/www/html/joomla/
sudo chmod -R 775 /var/www/html/joomla/

Next, you need to configure Apache virtual host file for Joomla on Rocky Linux 8.

Configure Apache virtual host file for Joomla

At this point, you need to create a virtual host file for Joomla, and for that, you need to configure a virtual host file as shown:

sudo vi /etc/httpd/conf.d/joomla.conf

Add the following contents to the file:

Use the server’s Fully Qualified Domain Name (FQDN) or public IP.

<VirtualHost *:80>
   ServerAdmin [email protected]
   DocumentRoot "/var/www/html/joomla"
   ServerName example.com
   ErrorLog "/var/log/httpd/example.com-error_log"
   CustomLog "/var/log/httpd/example.com-access_log" combined

<Directory "/var/www/html/joomla">
   DirectoryIndex index.html index.php
   Options FollowSymLinks
   AllowOverride All
   Require all granted
</Directory>
</VirtualHost>

When you are done, save and close the file.

To apply the changes, restart Apache:

sudo systemctl restart httpd

Now if you don’t allow the HTTP and HTTPS through the firewall, use the following commands:

sudo firewall-cmd --add-service=http --zone=public --permanent
sudo firewall-cmd --add-service=https --zone=public --permanent
sudo firewall-cmd --reload

Access Joomla Web Interface

At this point, you can continue your Joomla installation on Rocky Linux 8 from the Web interface. Enter your server’s IP address or domain name in your web browser:

http://server-ip or domain.com

You will see your Joomla installer. Select your desired language and enter your Joomla site name and click Set up login data.

Joomla site name

Then, you need to enter your login data and click Setup database connection.

Joomla login data on Rocky Linux 8

Next, enter the database credentials that you have provided before on Rocky Linux 8 and click Install Joomla.

Database configuration for joomla

When your installation is completed, you will see the following screen. Click Open Administrator.

Open Joomla administrator

You should enter your Joomla super username and password and click Login.

Joomla login screen

At this point, you will see your Joomla dashboard.

Joomla dashboard on Rocky Linux

From here, you can create and customize your blog or website using various themes and plugins to your preference.

Conclusion

At this point, you learn to Install and Configure Joomla on Rocky Linux 8.

Hope you enjoy it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!