Before you start the installation, please make sure that you have LAMP stack installed on your server. If not, follow our excellent tutorial about installing LAMP (Linux Apache, MariaDB & PHP) on a CentOS 7 VPS
Requirements
We are using our SSD 1 VPS hosting plan for this tutorial.
Update the system
First make sure your Linux VPS is fully up-to-date using the command below:
# yum update
Configure Your Firewall
Before we proceed you should customize your Firewall to allow external access to port 80 (http) and 443 (https). To do this please enter the following commands:
# firewall-cmd --permanent --zone=public --add-service=http # firewall-cmd --permanent --zone=public --add-service=https # firewall-cmd --reload
Install Joomla on CentOS 7
Enter a directory by your choice and download Joomla. For our purpoces we are using the /tmp directory.
# cd /tmp
Install wget
Install wget and unzip using yum:
# yum install wget unzip
Download and unzip Joomla
Now download the latest Joomla version:
# wget https://github.com/joomla/joomla-cms/releases/download/3.4.2/Joomla_3.4.2-Stable-Full_Package.zip
Then create a directory /var/www/html/joomla and unzip the Joomla zip file in the newly created folder:
# mkdir -p /var/www/html/joomla # unzip -q Joomla_3.4.2-Stable-Full_Package.zip -d /var/www/html/joomla
Configure web server
Give the appropriate permissions:
# chown -R apache:apache /var/www/html/joomla # chmod -R 755 /var/www/html/joomla
Create MySql database
Enter MySQL as root:
# mysql -u root -p mysql> CREATE DATABASE joomla; mysql> GRANT ALL PRIVILEGES on joomla.* to 'joomlauser'@'localhost' identified by 'your_password'; mysql> FLUSH PRIVILEGES;
Restart MySql
Restart MySQL service in order for changes to take effect
# systemctl restart mysqld.service
Finalize the installation via web browser
Now you can finish your Joomla installation by opening your favorite web browser and navigate to: http://your_ip_address/joomla