How to install Joomla on CentOS7

In this article, we will show you how to install Joomla on a CentOS server.

Login to your server via SSH or KVM, via root.
Disable selinux;

setenforce 0
sed -i ‘s/enforcing/disabled/g’ /etc/selinux/config

Run the following command to install all the required packages for your LAMP stack, which will host the Joomla site;

yum install epel-release httpd php php-common php-mysqlnd php-mbstring php-gd mariadb-server mod_ssl zip wget unzip -y

Update the Apache config to allow for htaccess to be used;

sed -i ‘s/AllowOverride none/AllowOverride all/g’ /etc/httpd/conf/httpd.conf

Start Apache & MySQL on the server;

systemctl start httpd && systemctl start mariadb

You should now be able to confirm that Apache is started by going to either your server IP address or the domain name you have pointed to the server, in this example we will use the server IP address.

Create the MySQL user and database for Joomla, enter the mysql command to get to a prompt (choose a different password to the below one, just make sure it is secure!)

mysql
CREATE DATABASE joomla;
GRANT ALL PRIVILEGES ON joomla.* TO ‘joomla’@’localhost’ IDENTIFIED BY ‘Eh4wph8WItSO’;

Download and put into place the latest version of Joomla (at the time of writing this is 3.6.4);

wget https://github.com/joomla/joomla-cms/releases/download/3.6.4/Joomla_3.6.4-Stable-Full_Package.zip
unzip Joomla_3.6.4-Stable-Full_Package.zip -d /var/www/html/

Update the permissions so that we can upload files through the Joomla control panel;

chown -R apache:apache /var/www/html

You can now go to your site URL or IP address in the browser to complete the Joomla installation, below are the following pages you should go through to complete the install;

On the following page you should enter the details that you used earlier when creating the MySQL database;

9. Your site is now setup and ready to login to, if you go to your URL or server IP address you should see a basic Joomla installation. You can login to your Joomla admin control panel at http://IP-ADDRESS/administrator/.

Rate This Article

(90 out of 229 people found this article helpful)

Leave A Comment?

You must be logged in to post a comment.