How to Install Joomla with LAMP on AlmaLinux 10

Install Joomla with LAMP Stack on AlmaLinux 10 using PHP 8.4, MariaDB, Apache, firewalld, SELinux-safe permissions, and HTTPS in about 20 minutes.
A glowing server rack, web panel, database cylinder, and blue light trails in a dark navy data center.

Install Joomla with LAMP Stack on AlmaLinux 10 and finish with a working Joomla 6 site behind Apache, MariaDB, PHP 8.4, and HTTPS. Allow about 20 minutes on a fresh VPS, including the browser-based setup.

Prerequisites

  • A fully updated AlmaLinux 10 server with at least 2 GB of RAM and 10 GB of free disk space.
  • Root access or a sudo-enabled user connected over SSH. Every command below uses sudo where it is needed.
  • A public IPv4 address and a domain such as YOUR_DOMAIN pointing to SERVER_IP. Ports 80 and 443 must be reachable for HTTPS.
  • A unique database password, a separate Joomla Super User password, and an email address for certificate notices.
  • A VPSLake Linux VPS with root access is suitable for this Apache and MariaDB deployment.

This guide installs Joomla 6.1.4, the current release at the time of writing. Joomla 6 supports PHP 8.3 or newer and recommends PHP 8.4; it also requires a supported MariaDB/MySQL driver, XML, DOM, GD, and related PHP modules. Review Joomla’s technical requirements when you plan a later major-version upgrade.

Step 1: Install Apache, MariaDB, PHP, and firewalld

AlmaLinux 10’s base repositories provide Apache and MariaDB, while Remi’s PHP 8.4 stream supplies the PHP version Joomla recommends. The package list also includes the modules needed for uploads, XML parsing, database access, and clean URLs.

sudo dnf update -y
sudo dnf install -y dnf-plugins-core
sudo dnf config-manager --set-enabled crb
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-10.rpm
sudo dnf module reset php -y
sudo dnf module enable php:remi-8.4 -y
sudo dnf install -y httpd mariadb-server firewalld php php-cli php-common php-fpm php-gd php-intl php-mbstring php-mysqlnd php-opcache php-xml php-zip unzip curl policycoreutils-python-utils mod_ssl
sudo tee /etc/php.d/90-joomla.ini > /dev/null <<'PHP'
memory_limit = 256M
upload_max_filesize = 32M
post_max_size = 32M
max_execution_time = 60
PHP
sudo systemctl enable --now firewalld httpd mariadb php-fpm

Open only SSH and web traffic. MariaDB remains on the local machine and does not need a public database port.

sudo firewall-cmd --permanent --zone=public --add-service=ssh
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
php -v
sudo systemctl is-active httpd mariadb php-fpm firewalld

The version should begin with PHP 8.4, and each service should print active:

PHP 8.4.x (cli) ...
active
active
active
active

Step 2: Secure MariaDB and create the Joomla database

The MariaDB security script removes default accounts and test data before Joomla receives a dedicated local database account.

sudo mariadb-secure-installation

Remove anonymous users, disallow remote root login, remove the test database, and reload the privilege tables when prompted. The exact root-password questions vary with the MariaDB package, so follow the prompts rather than copying a fixed answer sequence.

Create a database using UTF-8 support and grant access only to a local user. Replace YOUR_DB_PASSWORD with a long, unique password before running this block.

sudo mariadb <<'SQL'
CREATE DATABASE joomla CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'joomla_user'@'localhost' IDENTIFIED BY 'YOUR_DB_PASSWORD';
GRANT ALL PRIVILEGES ON joomla.* TO 'joomla_user'@'localhost';
FLUSH PRIVILEGES;
SQL
sudo mariadb -e "SHOW DATABASES LIKE 'joomla';"

The final command should return one row named joomla. Keep the password because the web installer will ask for it; do not open TCP port 3306 for this local connection.

Step 3: Download Joomla 6.1.4 and apply SELinux-safe permissions

The official full package contains the web installer and all core files. The ownership layout below keeps application code read-only to Apache while allowing Joomla to write its configuration, cache, logs, temporary files, images, and media.

cd /tmp
curl -fL -o Joomla_6-1-4-Stable-Full_Package.zip 'https://downloads.joomla.org/cms/joomla6/6-1-4/Joomla_6-1-4-Stable-Full_Package.zip?format=zip'
sudo mkdir -p /var/www/joomla
sudo unzip -q Joomla_6-1-4-Stable-Full_Package.zip -d /var/www/joomla
sudo chown -R root:apache /var/www/joomla
sudo find /var/www/joomla -type d -exec chmod 0750 {} +
sudo find /var/www/joomla -type f -exec chmod 0640 {} +
sudo install -o apache -g apache -m 0660 /dev/null /var/www/joomla/configuration.php
sudo mkdir -p /var/www/joomla/cache /var/www/joomla/administrator/cache /var/www/joomla/images /var/www/joomla/media /var/www/joomla/tmp /var/www/joomla/administrator/logs
sudo chown -R apache:apache /var/www/joomla/cache /var/www/joomla/administrator/cache /var/www/joomla/images /var/www/joomla/media /var/www/joomla/tmp /var/www/joomla/administrator/logs
sudo find /var/www/joomla/cache /var/www/joomla/administrator/cache /var/www/joomla/images /var/www/joomla/media /var/www/joomla/tmp /var/www/joomla/administrator/logs -type d -exec chmod 0770 {} +
sudo find /var/www/joomla/cache /var/www/joomla/administrator/cache /var/www/joomla/images /var/www/joomla/media /var/www/joomla/tmp /var/www/joomla/administrator/logs -type f -exec chmod 0660 {} +

Persist the SELinux contexts instead of disabling SELinux. The first rule labels the site as readable web content; the more specific rules allow writes only where Joomla needs them.

sudo semanage fcontext -a -t httpd_sys_content_t '/var/www/joomla(/.*)?'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/joomla/configuration.php'
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/joomla/(cache|administrator/cache|images|media|tmp|administrator/logs)(/.*)?'
sudo restorecon -Rv /var/www/joomla

Step 4: Configure the Apache virtual host

This virtual host sends the domain to Joomla and enables .htaccess overrides, which Joomla uses for Search Engine Friendly URLs and front-controller routing. Replace YOUR_DOMAIN and ADMIN_EMAIL before running the block.

sudo tee /etc/httpd/conf.d/joomla.conf > /dev/null <<'APACHE'
<VirtualHost *:80>
    ServerName YOUR_DOMAIN
    ServerAdmin ADMIN_EMAIL
    DocumentRoot /var/www/joomla

    <Directory /var/www/joomla>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    DirectoryIndex index.php index.html
    ErrorLog /var/log/httpd/joomla-error.log
    CustomLog /var/log/httpd/joomla-access.log combined
</VirtualHost>
APACHE
sudo apachectl configtest
sudo apachectl -M | grep rewrite_module
sudo systemctl reload httpd

apachectl configtest should say Syntax OK, and the module check should show rewrite_module (shared). If the domain is not yet live, you can still validate Apache with curl -I http://SERVER_IP/ before requesting a certificate.

Step 5: Enable HTTPS with Let’s Encrypt

TLS protects the Super User password and the database credentials entered in the installer. Run Certbot only after the domain’s DNS A record resolves to this VPS and port 80 is reachable from the internet.

sudo dnf install -y certbot python3-certbot-apache
sudo certbot --apache --redirect --agree-tos --no-eff-email -m ADMIN_EMAIL -d YOUR_DOMAIN
sudo certbot renew --dry-run

Replace ADMIN_EMAIL with an address that receives renewal notices. Certbot adds the HTTPS virtual host and redirects HTTP requests; the dry run should report that simulated renewal succeeded.

Step 6: Complete the Joomla web installer

The browser wizard creates Joomla’s configuration and initial tables after the server-side stack is ready. Open https://YOUR_DOMAIN/ and use these values on the database page:

  • Database type: MySQLi
  • Database host: localhost
  • Database name: joomla
  • Username: joomla_user
  • Password: the value used for YOUR_DB_PASSWORD
  • Table prefix: leave the generated value
  • Connection encryption: use the default unless your MariaDB policy requires a specific setting

Continue with a site name, an email address, and a unique Super User name and password. Joomla should report a successful installation and remove its temporary installation directory. Sign in at https://YOUR_DOMAIN/administrator.

After the wizard finishes, make the generated configuration file read-only to Apache. Joomla can still write to the application directories prepared in Step 3.

sudo chown root:apache /var/www/joomla/configuration.php
sudo chmod 0640 /var/www/joomla/configuration.php
sudo semanage fcontext -d '/var/www/joomla/configuration.php'
sudo restorecon -v /var/www/joomla/configuration.php

Verify the Joomla LAMP installation

Run these checks from SSH, then load the site and administrator URL in a separate browser. They confirm the daemons, Apache syntax, required PHP modules, database, public HTTPS response, and generated configuration.

sudo systemctl is-active httpd mariadb php-fpm firewalld
sudo apachectl configtest
php -m | grep -Ei 'dom|gd|mbstring|mysqli|pdo_mysql|SimpleXML|xml|zip'
sudo mariadb -e "SHOW DATABASES LIKE 'joomla';"
test -f /var/www/joomla/configuration.php && echo configuration.php-present
curl -fsSI https://YOUR_DOMAIN/

Expected results include four active lines, Syntax OK, the listed PHP modules, one joomla database row, configuration.php-present, and an HTTP 200 or normal Joomla redirect:

active
active
active
active
Syntax OK
configuration.php-present
HTTP/2 200

Troubleshooting

No matching module streams for php:remi-8.4

The Remi repository, EPEL, or CRB was not enabled, or DNF is using stale metadata. Refresh the repositories and confirm that the 8.4 stream appears before installing PHP again.

sudo dnf clean all
sudo dnf makecache
sudo dnf module list php
sudo dnf module reset php -y
sudo dnf module enable php:remi-8.4 -y

If the stream is listed but packages are partially installed, rerun the Step 1 package command and restart php-fpm and httpd.

Insufficient permission to create configuration.php

Apache cannot write the file, or SELinux has the wrong label. Temporarily give the installer ownership of only this file, reapply its writable SELinux context, and run the browser installer again; harden it with Step 6 after success.

sudo chown apache:apache /var/www/joomla/configuration.php
sudo chmod 0660 /var/www/joomla/configuration.php
sudo semanage fcontext -d '/var/www/joomla/configuration.php' 2>/dev/null || true
sudo semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/joomla/configuration.php'
sudo restorecon -v /var/www/joomla/configuration.php

403 Forbidden or a 500 Internal Server Error

Check the Apache error log, vhost syntax, and SELinux labels. A missing AllowOverride All, a typo in DocumentRoot, or a mislabeled writable directory is more likely than a need to turn SELinux off.

sudo tail -n 40 /var/log/httpd/joomla-error.log
sudo apachectl -S
sudo apachectl configtest
sudo restorecon -Rv /var/www/joomla
sudo systemctl restart php-fpm httpd

Certbot reports a failed HTTP-01 challenge

The hostname may still point to another server, or a firewall outside the VPS may block port 80. Confirm the public DNS record, allow HTTP in firewalld, and check the vhost before trying Certbot again.

sudo firewall-cmd --zone=public --list-services
curl -I http://YOUR_DOMAIN/
sudo certbot --apache --redirect --agree-tos --no-eff-email -m ADMIN_EMAIL -d YOUR_DOMAIN

Hardening

  • Keep configuration.php at 0640 and owned by root:apache; back up it, the Joomla directory, and the joomla database before core or extension updates.
  • In the Joomla administrator area, enable automatic core-update notifications and remove extensions you do not maintain.
  • Keep MariaDB bound to localhost and do not add port 3306 to firewalld.
  • For a repeatable SSH baseline, use VPSLake’s SSH hardening generator after confirming that your account and alternate SSH port work.

FAQ

Which PHP version does Joomla 6 need?

Joomla 6 supports PHP 8.3 or newer and recommends PHP 8.4. This guide enables AlmaLinux 10’s Remi PHP 8.4 stream so the server meets the recommended version without using an end-of-life PHP release.

Can I install Joomla using only the server IP address?

You can open the installer over an IP address for a short test, but Let’s Encrypt certificates require a domain name. Point YOUR_DOMAIN at the VPS before entering real administrator credentials or publishing the site.

Where is the Joomla administrator login?

Open https://YOUR_DOMAIN/administrator after the installer completes. Use the Super User account created in the browser wizard, not the MariaDB username.

Why is port 3306 not open?

PHP connects to MariaDB through the server’s local socket or loopback interface, so Joomla does not need a public database listener. Keeping port 3306 closed reduces the attack surface and avoids exposing the database to password-guessing attempts.

Samrat Ghosh
Written by

Samrat Ghosh

Founder & Infrastructure Engineer

Samrat Ghosh is the founder of VPSLake, where he builds and runs the remote desktop and VPS hosting infrastructure the company is built on. He writes hands-on guides about RDP, Windows Server, VPS management and secure remote access - the practical documentation he wishes had…

Previous Article

Best VPS for Coolify in 2026: Requirements and Costs

Next Article

Dedicated Server for Minecraft Network: Specs and Cost

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨