Install nginx in centos7 yum mode

There is no rpm package of nginx by default in the centos7 system library, so we need to update the rpm dependency library first.

 

(1) To install nginx using yum, you need to include the Nginx library, and install the Nginx library

#rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm

(2) Use the following command to install nginx

#yum install nginx

(3) Start Nginx

#service nginx start

or

#systemctl start nginx.service

 
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326179125&siteId=291194637