Tuesday, June 25, 2019

How to install Nginx on CentOS 7 | SecuredHost

About Nginx

Nginx is a high performance web server software. It is a much more flexible and lightweight program than Apache HTTP Server.
This tutorial will teach you how to install and start Nginx on your CentOS 7 server. You can use sudo if  you are login with some different user rather then root or sudo user. "sudo yum install epel-release"
To add the CentOS 7 EPEL repository, open terminal and use the following command:
yum install epel-release
Now that the Nginx repository is installed on your server, install Nginx using the following yum command
yum install nginx
Nginx does not start on its own. To get Nginx running 
systemctl start nginx
If you are running a firewall, run the following commands to allow http(80) and https(443) traffic:
sudo firewall-cmd --permanent --zone=public --add-service=http 
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload
Enable Nginx service to start when your  system boots, To do so, enter the following command::
systemctl enable nginx

No comments:

Post a Comment