Introduction
In this post we will show you how to install Joomla 3 on CentOS 7, with MariaDB 10.2, PHP-FPM 7.1 and Nginx. Joomla is an award-winning content management system (CMS) for publishing web content and online apps. Joomla is one of the most popular CMSs and it is used all over the world to power millions of websites and applications of all shapes and sizes. Joomla is a free and open-source, php-based CMS system with wide range of features for publishing content. This guide should work on other RedHat-based systems as well but was tested and written for an CentOS 7 VPS. The process of installing Joomla 3 on CentOS 7 is fairly easy and it shouldn’t take more then 10 minutes.
Prerequisites
- Virtual server running CentOS 7 as an operating system
- sudo priviledges user (non-root)
- Around 10 minutes of your time
1. Update the system and install requeired packages
sudo yum update
sudo yum install yum-utils unzip wget
2. Install MariaDB 10.2
If you already have MySQL or MariaDB installed you can skip this step and move to the next section.
To add the MariaDB repository and install the latest MariaDB server, create an new file under /etc/yum.repos.d/
:
and add the folowing lines:
Once the repo file is created you can install MariaDB with the following command:
During the installation YUM will prompt you to install the MariaDB GPG Signing key.
3. Secure MariaDB
When the installation is complete, run the following command to secure your installation:
4. Create new database
Create a new database and user for the Joomla installation using the following commands:
5. Install and configure Nginx
If you don’t have Nginx installed on your server, you can install the latest stable version from the official Nginx repositories:
First, create an new file under /etc/yum.repos.d/
:
and add the following configuration:
Once you enable the Nginx repository you can proceed and install Nginx using the following command:
Next, create a new Nginx server block:
Test the Nginx configuration and restart nginx:
6. Install PHP 7.1
PHP version 7.1 is not available in the default CentOS 7 repositories so we will use the Remi repository.
To install and enable both EPEL and Remi repositories run the following command:
You can now proceed and install PHP 7.1 and all necessary PHP modules using the following commands:
During the installation YUM will prompt you to install the Remi GPG Signing key.
Once the installation you’ll need to open the PHP FPM poll configuration file and change the user from apache to nginx:
and fix the session and cache directories permissions:
Finally, restart the PHP FPM service with:
7. Install Joomla 3 on CentOS 7
Installing Joomla is pretty easy and straightforward, first download the Joomla zip archive from the Joomla download page:
Once the download is completed, unzip the archive and move the extracted files to the /var/www/my.joomla.site
directory, which will be the root directory of your new Joomla site:
Finally change the ownership of the /var/www/my.joomla.site
directory to the nginx
user:
8. Complete the installation via web browser installer
Open http://my.joomla.site/
in your favorite web browser and follow the on-screen instructions to complete the Joomla installation.
That’s it. You have successfully installed Joomla on CentOS 7. For more information about how to manage your Joomla installation, please refer to the official Joomla documentation.
Of course you don’t have to install Joomla on CentOS 7, if you use one of our managed VPS hosting services, in which case you can simply ask our expert Linux admins to install Joomla 3 CMS on your CentOS 7 server for you. They are available 24×7 and will take care of the Joomla 3 installation immediately.
PS. If you liked this post on how to install Joomla 3 on CentOS 7, please share it with your friends on the social networks using the buttons on the left or if you have any question, simply leave a reply below and our system administrators will reply it, as quickly as possible. Thanks.