How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

10

description

In this blog we are going to explain you to how to install Joomla with LEMP stack on CentOS 7 VPS very easy way. For complete knowledge for the same please go through the below given link:

Transcript of How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

Page 1: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

How to install Joomlawith LEMP stack on

CentOS 7 VPS (Part 1)

www.cloudminister.com

Page 2: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

Joomla is a popular open source Content Management System(CMS),

which is used to build websites and online application. It is separated into

front-end and back-end templates.

In Joomla CMS the more focused on portal-like websites.

In this tutorial, you are going to learn how to install Joomla with

LEMP(Linux,Nginx,MySQL,and PHP) on CentOS 7 VPS.

Page 3: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

PrerequisitesInstall MySQL 8.0Configure Database in MySQLInstall & Configure PHP 7.2Install NginxConfigure FirewallConfigure Nginx FileInstall Joomla FileTest Joomla

1.2.3.4.5.6.7.8.9.

Table of Content

Page 4: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

1. Prerequisites

Before you start the installation of Joomla with (LEMP) stack on Centos7 VPS, you must have one Centos 7 VPS with root privileges on it or youcan use sudo for non-root user.   You should also run basis command on server to check the followingthings-:

# df -h (To check the disk space on the system.)

# cat /etc/os-release (To verify the version of the VPS.)

# yum -y update (To update all the packages of the VPS)

Page 5: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

2.Install MySQL 8.0

Joomla uses a MySQL database for storage, MySQL is used in stack for storing user details in database.

For installing MySQL on Centos 7 first you need to enable MySQL repository and then you can install MySQL.

# yum localinstall -y https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

The command used for installing MySQL in CentOS 7 VPS is as follows:

# yum install mysql-server -y

Then check the MySQL version by typing following command:

# mysql -V(‘V’ is in uppercase)

After the installation is completed MySQL will start automatically and you can check it’s status by typing:

# systemctl status mysqld

If MySQL is not start automatically you can write the following command:

# systemctl start mysqld

Page 6: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

Before going for the next step you should generate a temporary password to access MySQL root user with the

following command:

# grep ‘temporary password’ /var/log/mysqld.log

Now configure the MySQL secure installation to improve the security by typing the following commands.

# mysql_secure_installation

Login with the temporary password and assign new password, after that in this configuration it ask several

questions you can give Y or N according to your requirement.

Change the password for root ? N

Remove anonymous users? Y

Disallow root login remotely? Y

Remove test database and access to it? Y

Reload privilege tables now? Y

www.cloudminister.com

Page 7: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

3.Configure Database in MySQL

Now create database for Joomla in MySQL for that first login with MySQL server by using the following command:

# mysql -u root -p

And give its password, after that create database in it with the command:

mysql> CREATE DATABASE joomla;

You can also check that database is created or not with the command:

mysql> SHOW DATABASES;

Now create user and assign him password by using command:

mysql> CREATE USER ‘joomla’@’localhost’ IDENTIFIED

BY ‘Password’;

www.cloudminister.com

Page 8: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

After that grant all privileges to the user created under that

database with the command:

mysql> GRANT ALL ON joomla.* TO ‘joomla’@’localhost’;

Then flush all privileges on MySQL server with the command:

mysql> FLUSH PRIVILEGES;

Now exit from the MySQL server you can use commands:

mysql> exit;

mysql> \q;

Note-: In MySQL you must end each command with a semicolon(;).

www.cloudminister.com

Page 9: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

4. Install & Configure PHP 7.2

PHP is used by Joomla to do various functions done by PHP like calling plugin, calling theme, validating

user permissions, checking option, grab from database, etc.

In this Blog we are using PHP 7.2 versionand install it with epel-release with remi repository.

Firstly, install yum-utils packages using the following command:

# yum -y install yum-utils

After that, install epel-release package by using command:

# yum -y install epel-release

# yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

www.cloudminister.com

Page 10: How to install Joomla with LEMP stack on CentOS 7 VPS (Part 1)

Enable the remi repository by typing:

# yum-config-manager –enable remi-php72

After that install PHP and all required modules by using command:

# yum -y install php-fpm php-mysql php-mbstring php-xml      php-gd php-cli php-json php-opcachephp-curl

Now after the installation completed you can check the PHP version with the command:

# php -v (‘v’ is in smallcase)