Joomla is a widely used and highly regarded content management system (CMS) that allows users to create and manage websites and blogs without any programming knowledge. It is an open-source platform written in PHP and offers a variety of features, including multi-language support, media management, SEO tools, contact management, and more. In this comprehensive guide, we will walk you through the process of installing Joomla CMS on Alma Linux 8 with Apache and Let’s Encrypt SSL.
Prerequisites
Before we begin, make sure you have the following prerequisites in place:
- A server running Alma Linux 8.
- A valid domain name pointed to your server’s IP address.
- A root password configured on the server.
Step 1: Install LAMP Server
Joomla relies on a LAMP (Linux, Apache, MySQL, PHP) stack to function properly. To install the LAMP server on your Alma Linux 8 system, open a terminal and run the following command:
dnf install httpd mariadb php php-curl php-xml php-zip php-mysqlnd php-intl php-gd php-json php-ldap php-mbstring php-opcache unzip curl wget -y
Once the installation is complete, you need to edit the PHP configuration file to modify some default settings. Open the file using a text editor:
nano /etc/php.ini
Within the file, locate the following lines and make the necessary changes:
memory_limit = 256M output_buffering = Off max_execution_time = 300 date.timezone = UTC
Save and close the file. Then, start the Apache and MariaDB services and enable them to start automatically on system boot:
systemctl start httpd mariadb systemctl enable httpd mariadb
Step 2: Configure MariaDB Database
Next, we need to create a database and user for Joomla CMS to utilize. Start by accessing the MariaDB shell:
mysql
Once you are logged in to the MariaDB shell, execute the following commands to create a database and a user:
CREATE DATABASE joomla; GRANT ALL PRIVILEGES ON joomla.* TO 'joomla'@'localhost' IDENTIFIED BY "securepassword";
After creating the database and user, reload the privileges to apply the changes:
FLUSH PRIVILEGES;
Exit the MariaDB shell:
EXIT;
Step 3: Download Joomla CMS
The next step is to download the latest version of Joomla CMS from the official download page. At the time of writing this tutorial, the latest version is Joomla 4.1.2. Use the following command to download the package:
wget https://downloads.joomla.org/cms/joomla4/4-1-2/Joomla_4-1-2-Stable-Full_Package.zip?format=zip -O joomla.zip
Once the download is complete, unzip the package and move it to the Apache web root directory:
unzip joomla.zip -d /var/www/html/joomla
Change the ownership and permissions of the Joomla directory:
chown -R apache:apache /var/www/html/joomla/ chmod -R 775 /var/www/html/joomla/
Step 4: Configure Apache for Joomla
To configure Apache for Joomla, we need to create a virtual host configuration file. Use the following command to create the file:
nano /etc/httpd/conf.d/joomla.conf
Inside the file, add the following code:
<VirtualHost *:80>
ServerAdmin test@example.com
DocumentRoot "/var/www/html/joomla"
ServerName joomla.example.com
ErrorLog "/var/log/httpd/example.com-error_log"
CustomLog "/var/log/httpd/example.com-access_log" combined
<Directory "/var/www/html/joomla">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Save and close the file. Then, restart the Apache service to apply the configuration changes:
systemctl restart httpd
To verify the status of the Apache web server, run the following command:
systemctl status httpd
You should see a similar output indicating that the Apache service is active and running.
Step 5: Configure Firewall for Joomla
Ensure that HTTP and HTTPS services are allowed through the firewall. Use the following commands to open the necessary ports:
firewall-cmd --add-service=http --zone=public --permanent firewall-cmd --add-service=https --zone=public --permanent
Reload the firewall to apply the changes:
firewall-cmd --reload
Step 6: Access Joomla Web Installation Wizard
Now, open your web browser and access the Joomla installation wizard using the URL http://joomla.example.com
. Replace joomla.example.com
with your own domain name. You will be redirected to the Joomla language selection screen. Choose your preferred language and click on the “Next” button.
On the next screen, provide a name for your website and click on the “Next” button. You will then be prompted to set up the administrator account. Enter a desired username and password, and click on the “Next” button.
Next, provide the database details you created earlier – database name, database username, and password. Click on the “Install Joomla” button to proceed with the installation.
Once the installation is complete, click on the “Open Administrator” button to access the Joomla dashboard. Enter your admin username and password, and click on the “Log in” button. You should now be logged in to the Joomla CMS.
Step 7: Secure Joomla CMS with Let’s Encrypt SSL
To enhance the security of your Joomla website, it is recommended to install an SSL certificate. We will use Let’s Encrypt, a free and widely trusted certificate authority, for this purpose.
To install the Certbot client, which is used to obtain and install Let’s Encrypt SSL certificates, run the following commands:
dnf install epel-release -y dnf install certbot python3-certbot-apache -y
Once the installation is complete, obtain and install an SSL certificate for your domain using the following command:
certbot --apache -d joomla.example.com
Replace joomla.example.com
with your actual domain name. You will be prompted to provide an email address and agree to the terms of service. Follow the on-screen instructions to complete the SSL installation process.
Congratulations! You have successfully installed Joomla CMS with Apache and Let’s Encrypt SSL on Alma Linux 8. You can now leverage the power of Joomla to create and manage your website effortlessly. If you have any further questions or need assistance, feel free to reach out to our support team.
For reliable and scalable cloud hosting solutions, consider Shape.host. Shape.host offers Cloud VPS services to help businesses achieve optimal performance and security for their websites. Visit Shape.host to learn more about our hosting solutions.
Conclusion
Joomla CMS is a versatile and user-friendly platform for building and managing websites. By following the step-by-step instructions in this guide, you have successfully installed Joomla CMS on Alma Linux 8 with Apache and Let’s Encrypt SSL. You can now harness the power of Joomla’s features and functionalities to create a dynamic and engaging website. Remember to regularly update your Joomla installation and plugins to ensure the security and stability of your website. Happy Joomla-ing!