新增 nginx.repo
vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
安裝Nginx
yum install nginx
啟動服務
service nginx start
chkconfig --levels 235 nginx on
vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
yum install nginx
service nginx start
chkconfig --levels 235 nginx on