Joomla is an open-source and PHP-based content management system used for creating different types of websites including blogs, eCommerce storefronts, and marketing sites. It is simple, user-friendly, and provides an easy way to build dynamic and powerful websites. You can use Joomla to host your website on the Internet easily without the need to learn how to read and write complicated codes and scripts.

In this post, we will show you how to install Joomla with Nginx on Rocky Linux 10.

Step 1 – Install Nginx and MariaDB

First, install the Nginx and MariaDB database servers with the following command:

dnf install nginx mariadb-server -y

Once both packages are installed, start the Nginx and MariaDB services and enable them to start at system reboot:

systemctl start nginx mariadb
systemctl enable nginx mariadb

Step 2 – Install PHP and PHP-FPM

Next, you will need to install PHP, PHP-FPM, and other PHP extensions on your server.

You can install PHP with other extensions using the following command:

dnf install php php-fpm php-curl php-xml php-zip php-mysqlnd php-intl php-gd php-json php-ldap php-mbstring php-opcache unzip -y

Once all the packages are installed, edit the php.ini file and tweak some settings:

nano /etc/php.ini

Change the following values:

memory_limit = 256M
output_buffering = Off
max_execution_time = 300
date.timezone = Europe/London

Save and close the file when you are done.

Next, edit the PHP-FPM configuration file:

nano /etc/php-fpm.d/www.conf

Change the user and group from apache to nginx:

user = nginx
group = nginx

Save and close the file, then set proper permissions to the PHP library directory:

chown -R nginx:nginx /var/lib/php/

Next, start the PHP-FPM service and enable it to start at system reboot:

systemctl start php-fpm
systemctl enable php-fpm

Step 3 – Create a Joomla Database

Joomla uses MySQL/MariaDB as a database backend, so you will need to create a database and user for Joomla.

First, log in to the MariaDB shell with the following command:

mysql

Once you are connected, create a database and user with the following command:

CREATE DATABASE joomladb;
GRANT ALL PRIVILEGES ON joomladb.* TO 'joomla'@'localhost' IDENTIFIED BY 'password';

Next, flush the privileges and exit from the MariaDB shell with the following command:

FLUSH PRIVILEGES;
EXIT;

Step 4 – Download Joomla

Next, go to the Joomla download and download the latest version of Joomla using the following command:

wget https://downloads.joomla.org/cms/joomla6/6-0-0/Joomla_6-0-0-Stable-Full_Package.zip

Next, create a directory for Joomla and extract the downloaded file inside the joomla directory:

mkdir -p /var/www/html/joomla 
unzip Joomla*.zip -d /var/www/html/joomla

Next, set proper permissions and ownership to the joomla directory:

chown -R nginx:nginx /var/www/html/joomla
chmod -R 755 /var/www/html/joomla

Step 5 – Configure Nginx for Joomla

Next, you will need to create an Nginx virtual host configuration file for Joomla. You can create it with the following command:

nano /etc/nginx/conf.d/joomla.conf

Add the following lines:

server { 
   listen 80; 
   root /var/www/html/joomla; 
   index  index.php index.html index.htm; 
   server_name  joomla.example.com;

   location / { 
       try_files $uri $uri/ /index.php?$args; 
   } 

   location ~ [^/]\.php(/|$) { 
   fastcgi_split_path_info  ^(.+\.php)(/.+)$; 
   fastcgi_index            index.php;  
   fastcgi_pass             unix:/run/php-fpm/www.sock; 
   include                  fastcgi_params; 
   fastcgi_param   PATH_INFO       $fastcgi_path_info; 
   fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name; 
   } 

}

Save and close the file, then restart the Nginx service to apply the changes:

systemctl restart nginx

Step 6 – Access Joomla Website

Now, Joomla is installed and configured on your server. You can now access the Joomla website using the URL http://joomla.example.com. You should see the following screen:

Provide your site information and click on Setup Login Data. You should see the database configuration page:
Provide your admin username, password, email and click on Setup Database Connection. You will see the following page.

Provide your database information and click on the Install Joomla button. Once the installation has been finished, you should see the following page:

 

Now, open a new tab in your web browser and access the Joomla administrator console using the URL http://joomla.example.com/administrator/.

Provide your admin username and password, then click on the Login button. You should see the following page:

Conclusion

In this guide, we explained how to install Joomla with Nginx on Rocky Linux 10. You can now use your dedicated server hosting account to start creating your blog or website using Joomla.