How to Install Joomla with LAMP Stack on Rocky Linux 10

Update the System

sudo dnf update -y

Install LAMP Stack

Install Apache, MariaDB, PHP, and required extensions

sudo dnf install httpd mariadb-server php php-mysqlnd php-dom php-mbstring php-json php-common php-xml php-gd php-zip unzip wget -y

Enable and start services

sudo systemctl enable httpd --now
sudo systemctl enable mariadb --now

Configure firewall to allow HTTP and HTTPS

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

Secure MariaDB Installation

sudo mysql_secure_installation

Follow the prompts to set root password and remove insecure defaults.

Create Joomla Database

Log into MariaDB

sudo mysql -u root -p

Inside the MariaDB shell

CREATE DATABASE joomla_db;
CREATE USER 'joomla_user'@'localhost' IDENTIFIED BY 'StrongPassword123!';
GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Download and Extract Joomla

cd /tmp
wget https://downloads.joomla.org/cms/joomla5/5-3-1/Joomla_5-3-1-Stable-Full_Package.zip?format=zip -O joomla.zip
unzip joomla.zip

Create a Joomla directory and move the extracted files

sudo mkdir -p /var/www/html/joomla
sudo mv administrator api cache cli components files htaccess.txt images includes index.php installation language layouts libraries LICENSE.txt media modules plugins README.txt robots.txt.dist templates tmp /var/www/html/joomla/

Set Correct Permissions

sudo chown -R apache:apache /var/www/html/joomla
sudo find /var/www/html/joomla -type d -exec chmod 755 {} \;
sudo find /var/www/html/joomla -type f -exec chmod 644 {} \;

Configure Apache Virtual Host

Create a new virtual host configuration

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

Paste the following

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/html/joomla

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

    ErrorLog /var/log/httpd/joomla_error.log
    CustomLog /var/log/httpd/joomla_access.log combined
</VirtualHost>

Replace yourdomain.com with your server's domain or IP.

Enable .htaccess Overrides

Edit Apache main config

sudo nano /etc/httpd/conf/httpd.conf

Ensure this line is present and not commented

AllowOverride All

Restart Apache

sudo systemctl restart httpd

Fix: Insufficient permission to create configuration.php

If Joomla displays:

"Insufficient permission to create configuration.php"

Run the following:

sudo touch /var/www/html/joomla/configuration.php
sudo chmod 664 /var/www/html/joomla/configuration.php
sudo chown apache:apache /var/www/html/joomla/configuration.php

# For SELinux-enabled systems
sudo chcon -t httpd_sys_rw_content_t /var/www/html/joomla/configuration.php
sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/joomla

Access Joomla Web Installer

Open your browser and go to:

http://your-server-ip/joomla

Follow the Joomla installer to complete site setup, database connection, and create your admin user.

Now you have successfully installed Joomla with LAMP Stack on Rocky Linux 10.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS