How to Install Joomla on AlmaLinux, Rocky Linux, Debian, and Ubuntu

Joomla is a powerful and flexible content management system (CMS) used to build websites and online applications. In this guide, we’ll show you how to install Joomla on AlmaLinux, Rocky Linux, Debian, and Ubuntu. The steps are quite similar across these Linux distributions.


Prerequisites:

Before you begin, ensure the following:

  • A server running AlmaLinux, Rocky Linux, Debian, or Ubuntu.
  • Root or sudo access to your server.
  • A LAMP stack (Linux, Apache, MySQL/MariaDB, PHP) installed.
  • A domain or subdomain pointing to your server.

Step 1: Update the System

Start by updating the server to make sure all system packages are up-to-date:

 
sudo apt update && sudo apt upgrade -y # For Ubuntu/Debian sudo dnf update -y # For AlmaLinux/Rocky Linux

Step 2: Install Required Software

For Joomla, you need a web server, a database, and PHP. Below are the commands for installing Apache, MariaDB, and PHP.

  • On Ubuntu/Debian:
 
sudo apt install apache2 mariadb-server php libapache2-mod-php php-mysql php-xml php-cli php-gd php-mbstring php-json unzip wget -y
  • On AlmaLinux/Rocky Linux:
 
sudo dnf install httpd mariadb-server php php-mysqlnd php-xml php-cli php-gd php-mbstring php-json unzip wget -y

Step 3: Configure the Database

Next, create a database and user for Joomla.

  1. Log in to MariaDB:
 
sudo mysql -u root -p
  1. Create a Joomla database and user:
sql
 
CREATE DATABASE joomla_db; CREATE USER 'joomla_user'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost'; FLUSH PRIVILEGES; EXIT;

Step 4: Download and Extract Joomla

Now download the latest Joomla package and extract it to the web directory.

  1. Go to the Joomla download page and grab the latest release link: Joomla Download.

  2. Download Joomla:

 
wget https://downloads.joomla.org/latest # Replace with the actual link if necessary
  1. Extract Joomla:
 
unzip joomla.zip -d /var/www/html/
  1. Set permissions for the Joomla folder:
 
sudo chown -R www-data:www-data /var/www/html/joomla # For Ubuntu/Debian sudo chown -R apache:apache /var/www/html/joomla # For AlmaLinux/Rocky Linux

Step 5: Configure Apache (for AlmaLinux/Rocky Linux)

  1. Create a virtual host configuration for Joomla:
 
sudo nano /etc/httpd/conf.d/joomla.conf
  1. Add the following content:
 
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/joomla ServerName yourdomain.com ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log combined </VirtualHost>
  1. Restart Apache:
 
sudo systemctl restart httpd

Step 6: Configure Apache (for Ubuntu/Debian)

  1. Create a virtual host configuration for Joomla:
 
sudo nano /etc/apache2/sites-available/joomla.conf
  1. Add the following content:
 
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot /var/www/html/joomla ServerName yourdomain.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
  1. Enable the new site and restart Apache:
 
sudo a2ensite joomla.conf sudo systemctl restart apache2

Step 7: Complete the Joomla Web Installation

  1. Open your web browser and visit your domain (e.g., http://yourdomain.com).

  2. Follow the on-screen instructions to complete the Joomla installation. Enter the database information:

    • Database Type: MySQLi
    • Host: localhost
    • Database Name: joomla_db
    • Username: joomla_user
    • Password: your_password
  3. After completing the installation, delete the installation folder for security purposes:

 
sudo rm -rf /var/www/html/joomla/installation

Step 8: Final Configuration

Ensure your server has the correct permissions to run Joomla without issues.

  1. Set proper permissions:
 
sudo chmod -R 755 /var/www/html/joomla
  1. Enable the Apache rewrite module if it’s not already enabled:
 
sudo a2enmod rewrite # For Ubuntu/Debian sudo systemctl restart apache2

Conclusion

You have successfully installed Joomla on your AlmaLinux, Rocky Linux, Debian, or Ubuntu server. You can now log in to the Joomla backend by visiting http://yourdomain.com/administrator and start building your website.

Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution