How to install Joomla CMS on Rocky Linux 9.2

To Install Joomla CMS On Rocky Linux 9.2

Introduction:

Joomla is a free, open-source, and one of the most popular Content Management System (CMS) around the world which allows users to create or build their own website and applications. It is built on PHP and stores its data on an SQL-based database engine on the backend such as MySQL/MariaDB.

Procedure :

Step 1: Check the OS version by using the below command

[root@Linuxhelp ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.2 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"

Step 2: Install Apache web server by using the below command

[root@Linuxhelp ~]# dnf install httpd* -y
Last metadata expiration check: 0:01:18 ago on Wednesday 14 February 2024 12:44:58 PM.
Dependencies resolved.
=============================================================================================================================================================================================================
Installed:
 apr-1.7.0-12.el9_3.x86_64                 apr-devel-1.7.0-12.el9_3.x86_64      apr-util-1.6.1-23.el9.x86_64               apr-util-bdb-1.6.1-23.el9.x86_64       apr-util-devel-1.6.1-23.el9.x86_64
 apr-util-openssl-1.6.1-23.el9.x86_64      cyrus-sasl-2.1.27-21.el9.x86_64      cyrus-sasl-devel-2.1.27-21.el9.x86_64      expat-devel-2.5.0-1.el9.x86_64         httpd-2.4.57-5.el9.x86_64
 httpd-core-2.4.57-5.el9.x86_64            httpd-devel-2.4.57-5.el9.x86_64      httpd-filesystem-2.4.57-5.el9.noarch       httpd-manual-2.4.57-5.el9.noarch       httpd-tools-2.4.57-5.el9.x86_64
 libdb-devel-5.3.28-53.el9.x86_64          mod_http2-1.15.19-5.el9.x86_64       mod_lua-2.4.57-5.el9.x86_64                openldap-devel-2.6.3-1.el9.x86_64      rocky-logos-httpd-90.14-2.el9.noarch
Complete!

Step 3: Start and Enable Apache service by using the below command

[root@Linuxhelp ~]# systemctl start httpd
[root@Linuxhelp ~]# systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.

Step 4: Check the status of the Apache service by using the below command

 [root@Linuxhelp ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
     Active: active (running) since Wed 2024-02-14 12:46:39 IST; 15s ago
       Docs: man:httpd.service(8)
   Main PID: 119707 (httpd)
     Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec:   0 B/sec"
      Tasks: 213 (limit: 22877)
     Memory: 29.4M
        CPU: 261ms
     CGroup: /system.slice/httpd.service
             ├─119707 /usr/sbin/httpd -DFOREGROUND
             ├─119708 /usr/sbin/httpd -DFOREGROUND
             ├─119709 /usr/sbin/httpd -DFOREGROUND
             ├─119710 /usr/sbin/httpd -DFOREGROUND
             └─119711 /usr/sbin/httpd -DFOREGROUND

Feb 14 12:46:38 Linuxhelp systemd[1]: Starting The Apache HTTP Server...
Feb 14 12:46:39 Linuxhelp httpd[119707]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::20c:29ff:fe61:4e66%ens160. Set the 'ServerName' directive global>
Feb 14 12:46:39 Linuxhelp systemd[1]: Started The Apache HTTP Server.
Feb 14 12:46:39 Linuxhelp httpd[119707]: Server configured, listening on: port 80

Step 5: Install PHP and dependencies modules by using the below command

[root@Linuxhelp ~]# dnf install php  php-bcmath php-intl php-soap php-zip php-curl php-mbstring php-mysqlnd php-gd php-xml -y
Last metadata expiration check: 0:02:09 ago on Wednesday 14 February 2024 12:44:58 PM.
Dependencies resolved.
=============================================================================================================================================================================================================
Installed:
 libzip-1.7.3-7.el9.x86_64              nginx-filesystem-1:1.20.1-14.el9_2.1.noarch      php-8.0.30-1.el9_2.x86_64          php-bcmath-8.0.30-1.el9_2.x86_64      php-cli-8.0.30-1.el9_2.x86_64
 php-common-8.0.30-1.el9_2.x86_64       php-fpm-8.0.30-1.el9_2.x86_64                    php-gd-8.0.30-1.el9_2.x86_64       php-intl-8.0.30-1.el9_2.x86_64        php-mbstring-8.0.30-1.el9_2.x86_64
 php-mysqlnd-8.0.30-1.el9_2.x86_64      php-opcache-8.0.30-1.el9_2.x86_64                php-pdo-8.0.30-1.el9_2.x86_64      php-pecl-zip-1.19.2-6.el9.x86_64      php-soap-8.0.30-1.el9_2.x86_64
 php-xml-8.0.30-1.el9_2.x86_64
Complete!

Step 6: Check the version of the PHP by using the below command

 [root@Linuxhelp ~]# php -v
PHP 8.0.30 (cli) (built: Aug  3 2023 17:13:08) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.30, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.30, Copyright (c), by Zend Technologies

Step 7: Install MariaDB server by using the below command

 [root@Linuxhelp ~]# dnf install mariadb-server -y
Last metadata expiration check: 0:02:33 ago on Wednesday 14 February 2024 12:44:58 PM.
Dependencies resolved.
=============================================================================================================================================================================================================
Install  13 Packages
Total download size: 18 M
Installed size: 109 M
Downloading Packages:
Installed:
  mariadb-3:10.5.22-1.el9_2.x86_64                       mariadb-backup-3:10.5.22-1.el9_2.x86_64        mariadb-common-3:10.5.22-1.el9_2.x86_64               mariadb-connector-c-3.2.6-1.el9_0.x86_64
  mariadb-connector-c-config-3.2.6-1.el9_0.noarch        mariadb-errmsg-3:10.5.22-1.el9_2.x86_64        mariadb-gssapi-server-3:10.5.22-1.el9_2.x86_64        mariadb-server-3:10.5.22-1.el9_2.x86_64
  mariadb-server-utils-3:10.5.22-1.el9_2.x86_64          mysql-selinux-1.0.5-1.el9_0.noarch             perl-DBD-MariaDB-1.21-16.el9_0.x86_64                 perl-File-Copy-2.34-480.el9.noarch
  perl-Sys-Hostname-1.23-480.el9.x86_64
Complete!

Step 8: Start and Enable MariaDB by using the below command

[root@Linuxhelp ~]# systemctl start mariadb
[root@Linuxhelp ~]# systemctl enable mariadb
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.

Step 9: Check the status of the MariaDB by using the below command

[root@Linuxhelp ~]# systemctl status mariadb
● mariadb.service - MariaDB 10.5 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
     Active: active (running) since Wed 2024-02-14 12:48:01 IST; 15s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 121915 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 13 (limit: 22877)
     Memory: 75.3M
        CPU: 884ms
     CGroup: /system.slice/mariadb.service
             └─121915 /usr/libexec/mariadbd --basedir=/usr

Feb 14 12:48:01 Linuxhelp mariadb-prepare-db-dir[121871]: The second is mysql@localhost, it has no password either, but
Feb 14 12:48:01 Linuxhelp mariadb-prepare-db-dir[121871]: you need to be the system 'mysql' user to connect.
Feb 14 12:48:01 Linuxhelp mariadb-prepare-db-dir[121871]: After connecting you can set the password, if you would need to be
vibrant community:
Feb 14 12:48:01 Linuxhelp mariadb-prepare-db-dir[121871]: https://mariadb.org/get-involved/
Feb 14 12:48:01 Linuxhelp systemd[1]: Started MariaDB 10.5 database server.

Step 10: Login to the MySQL console by using the below command

[root@Linuxhelp ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 10.5.22-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Step 11: Create a database by using the below command

MariaDB [(none)]> create database joomla_db;
Query OK, 1 row affected (0.001 sec)

Step 12: Create a user with password by using the below command

MariaDB [(none)]> create user 'joomla_user'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.001 sec)

Step 13: Grant privileges to the user for that database by using the below command

MariaDB [(none)]> grant all on joomla_db.* to 'joomla_user'@'localhost';
Query OK, 0 rows affected (0.001 sec)

Step 14: Flush the privileges and exit from the MariaDB console by using the below command

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> \q
Bye

Step 15: Download the Joomla package by using wget command

[root@Linuxhelp ~]# wget https://downloads.joomla.org/cms/joomla4/4-1-5/Joomla_4-1-5-Stable-Full_Package.zip 
--2024-02-14 12:49:15--  https://downloads.joomla.org/cms/joomla4/4-1-5/Joomla_4-1-5-Stable-Full_Package.zip 
Resolving downloads.joomla.org (downloads.joomla.org)... 104.26.14.15, 104.26.15.15, 172.67.74.86, ...
Connecting to downloads.joomla.org (downloads.joomla.org)|104.26.14.15|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: https://s3-us-west-2.amazonaws.com/joomla-official-downloads/joomladownloads/joomla4/Joomla_4.1.5-Stable-Full_Package.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA6LXDJLNUINX2AVMH%2F20240214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20240214T071915Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=ead7ef4e46d81bcb1c2f366e3f94229884f2dd1ee6dfb720c80f38e871d7765c [following]
--2024-02-14 12:49:16--  https://s3-us-west-2.amazonaws.com/joomla-official-downloads/joomladownloads/joomla4/Joomla_4.1.5-Stable-Full_Package.zip?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA6LXDJLNUINX2AVMH%2F20240214%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20240214T071915Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=ead7ef4e46d81bcb1c2f366e3f94229884f2dd1ee6dfb720c80f38e871d7765c
Resolving s3-us-west-2.amazonaws.com (s3-us-west-2.amazonaws.com)... 52.218.222.32, 52.218.132.152, 52.218.178.80, ...
Connecting to s3-us-west-2.amazonaws.com (s3-us-west-2.amazonaws.com)|52.218.222.32|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27361136 (26M) [application/zip]
Saving to: ‘Joomla_4-1-5-Stable-Full_Package.zip’

Joomla_4-1-5-Stable-Full_Package.zip                100%[================================================================================================================>]  26.09M  6.71MB/s    in 4.7s

2024-02-14 12:49:22 (5.54 MB/s) - ‘Joomla_4-1-5-Stable-Full_Package.zip’ saved [27361136/27361136]

Step 16: Extract the package into the directory by using the below command

[root@Linuxhelp ~]# unzip Joomla_4-1-5-Stable-Full_Package.zip -d /var/www/html/joomla
Archive:  Joomla_4-1-5-Stable-Full_Package.zip
   creating: /var/www/html/joomla/administrator/
   creating: /var/www/html/joomla/administrator/cache/
  inflating: /var/www/html/joomla/administrator/cache/index.html
   creating: /var/www/html/joomla/administrator/components/
  inflating: /var/www/html/joomla/administrator/components/com_actionlogs/forms/filter_actionlogs.xml
   creating: /var/www/html/joomla/administrator/components/com_actionlogs/services/
  inflating: /var/www/html/joomla/administrator/components/com_actionlogs/services/provider.php
   creating: /var/www/html/joomla/administrator/components/com_actionlogs/src/
   creating: /var/www/html/joomla/administrator/components/com_actionlogs/src/Controller/
  inflating: /var/www/html/joomla/administrator/components/com_actionlogs/src/Controller/ActionlogsController.php
  inflating: /var/www/html/joomla/administrator/components/com_actionlogs/src/Controller/DisplayController.php
   creating: /var/www/html/joomla/administrator/components/com_actionlogs/src/Field/
  inflating: /var/www/html/joomla/administrator/components/com_actionlogs/src/Field/ExtensionField.php

Step 17: Change the ownership and give the correct permissions to the Joomla directory by using the below command

[root@Linuxhelp ~]# chown -R apache: /var/www/html/joomla
[root@Linuxhelp ~]# chmod -R 755 /var/www/html/joomla

Step 18: Create a joomla.conf file in the apache document directory location by using the below command

[root@Linuxhelp ~]# vim /etc/httpd/conf.d/joomla.conf
Insert the following lines
<VirtualHost *:80>

ServerName linuxhelp1.com
DocumentRoot /var/www/html/joomla

<Directory /var/www/html/joomla/>
    Options -Indexes +FollowSymlinks
    AllowOverride All
</Directory>

ErrorLog /etc/httpd/blog.domainhere.info-error.log
CustomLog /etc/httpd/blog.domainhere.info-access.log combined

</VirtualHost>

Step 19: Disable the default Apache welcome page by using the below command

[root@Linuxhelp ~]# setenforce 0

Step 20: Restart the Apache service by using the below command

[root@Linuxhelp ~]# systemctl restart httpd

Now go to the web browser and search our server ip address then you will see a following page, Enter your site name and click Setup Logon Data as shown in the below image

Create a user and set password for the user and click Setup Database Connection as shown in the below image

Enter the database credentials and click Install Joomla as shown in the below image

Next the congratulation page is displayed here click the Open Administrator button to enter into your site as shown in the below image

Now enter your Admin credentials and click Log in button as shown in the below image

Finally you will see the following Joomla CMS Dashboard

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Installation of Joomla CMS on Rocky Linux 9.2. Your feedback is much welcome.

FAQ
Q
How do I uninstall Joomla if needed?
A
To uninstall Joomla, remove the files from your server, drop the database, and delete the associated database user. Make sure to keep a backup before uninstalling to avoid data loss.
Q
Can I migrate from an older version of Joomla to the latest one?
A
Yes, Joomla provides migration tools for upgrading from older versions. Follow the upgrade instructions in the official documentation.
Q
What should I do if I encounter issues during installation?
A
Check the Joomla documentation and forums for solutions. Common issues include incorrect file permissions, database connection problems, or server configuration issues.
Q
How do I download Joomla?
A
Visit the official Joomla website (https://www.joomla.org/download.html) and choose the latest stable version. Download the installation package.
Q
What is Joomla CMS?
A
Joomla is a free and open-source content management system (CMS) for publishing web content.