How to Install Joomla Server on CentOS 8. This article will introduce what Joomla server is with its features (Pros) and we will move to installation steps on CentOS 8 with installation of LAMP server, creation of Apache virtual host for Joomla and securing Joomla with Let’s encrypt SSL. Let’s start.
What is Joomla?
Joomla is a free and open source content management system used for publishing content on the internet. It offers thousands of features, plugins and designs that helps you to host several web applications including, discussion forums, photo galleries, e-Commerce and user communities on the web. It is built on PHP and uses MySQL and MariaDB as a database backend. Joomla server provides several high end templates and most of them are free to use. However, there is also an option to use paid themes that come with support. Templates are used to get different types of user interfaces, which allow us to change the colors, font style, layouts and features, etc.
Before starting, you will need to install the LAMP server including required PHP extensions to your server. You can install all of them by running the following command:
In this post, we will use MariaDB as a database backend. Before creating the database, you will need to secure the MariaDB first. You can secure it by running the following command:
mysql_secure_installation
Answer all the questions as shown below to secure the MariaDB:
Enter current password for root (enter for none): Just Press Enter
Set root password? [Y/n] Y
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y
Next, log in to the MariaDB shell using the command given below:
mysql -u root -p
Once you are log in, create a database and user for Joomla with the following command:
MariaDB [(none)]> CREATE DATABASE joomla;
MariaDB [(none)]> GRANT ALL ON joomla.* TO 'joomla'@'localhost' IDENTIFIED BY 'password';
Next, flush the privileges and exit from the MariaDB shell with the following command:
Next part about how to Install Joomla Server on CentOS 8 we will need to create an Apache virtual host configuration file to host Joomla on the web. You can create it using the following command:
Save and close the file then restart the Apache service to apply the changes:
systemctl restart httpd
You can also check the status of the Apache using the following command:
systemctl status httpd
You will get the following output:
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Tue 2022-01-18 11:20:23 EST; 6s ago
Docs: man:httpd.service(8)
Main PID: 7105 (httpd)
Status: "Started, listening on: port 80"
Tasks: 213 (limit: 25014)
Memory: 32.9M
CGroup: /system.slice/httpd.service
├─7105 /usr/sbin/httpd -DFOREGROUND
├─7106 /usr/sbin/httpd -DFOREGROUND
├─7107 /usr/sbin/httpd -DFOREGROUND
├─7108 /usr/sbin/httpd -DFOREGROUND
└─7109 /usr/sbin/httpd -DFOREGROUND
Jan 18 11:20:22 centos8 systemd[1]: Stopped The Apache HTTP Server.
Jan 18 11:20:22 centos8 systemd[1]: Starting The Apache HTTP Server...
Configure Firewall
If firewalld firewall is installed on your server then you will need to allow ports 80 and 44 through the firewall. You can allow them by running the following command:
At this point, Joomla is installed and configured. Now, open your web browser and access the Joomla web installation wizard using the URL http://joomla.exampledomain.com. You will be redirected to the following screen:
Select your language and click on the Setup Login Data. You should see the Joomla admin user creation screen:
Provide your admin username, password, email and click on the Setup Database Connection button. You should see the following screen:
Provide your database credentials and click on the Install Joomla button. Once the Joomla is installed, you should see the following screen:
Click on the Open Administrator button. You will be redirected to the Joomla login screen:
Provide your Joomla admin username, password and click on the Log in button. You should see the Joomla dashboard on the following screen:
Next steps about how to Install Joomla Server on CentOS 8 is to install the Certbot client to install the Let’s Encrypt SSL for the Joomla website. You can install it with the following command:
Next, obtain and install an SSL certificate for your domain with the following command:
certbot --apache -d joomla.exampledomain.com
You will be asked to provide your email address and accept the term of service:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): hitjethva@gmail.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Account registered.
Requesting a certificate for joomla.exampledomain.com
Performing the following challenges:
http-01 challenge for joomla.exampledomain.com
Waiting for verification.
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/httpd/conf.d/joomla.conf
Redirecting all traffic on port 80 to ssl in /etc/httpd/conf.d/joomla.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://joomla.exampledomain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to the EFF mailing list (email: hitjethva@gmail.com).
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/joomla.exampledomain.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/joomla.exampledomain.com/privkey.pem
Your certificate will expire on 2022-04-09. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again with the "certonly" option. To non-interactively
renew *all* of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
You can now access your website securely using the URL https://joomla.exampledomain.com.
How to Install Joomla Server on CentOS 8 Conclusion
Congratulations! you have successfully installed Joomla CMS on CentOS 8. YOu can now explore the Joomla features and host your own website using the Joomla platform. For more information, visit the Joomla documentation page.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.