Saturday, 5 May 2018

How to install Nginx web server in Centos 7



Nginx is a free and open source high-performance web server and also it is use for reverse proxy. This article will describe installation of Nginx server on a CentOS 7 using EPEL repository.

Setup EPEL repository: Follow tutorial How to install EPEL repository on Centos7


Nginx Installation: Run the following command to install Nginx using yum:

[root@linuxcnf ~]# yum install nginx

Syntax Check: Run the following command to check configuration file syntax:

[root@linuxcnf ~]# nginx -t

If syntax is OK then

Start nginx service: run the following command to start Nginx service:

[root@linuxcnf ~]# systemctl start nginx

Enable the service on server reboot: Run the following command to enable the service on server reboot:

[root@linuxcnf ~]# systemctl enable nginx

Test/Verify installation: Now you can see an Nginx test page by using server’s IP address in browser.

No comments:

Post a comment