以centos6.5 为例
1 登录Nginx下载页面
http://nginx.org/en/download.html
2
下拉点击stable version跳转
Linux packages for stable version
Linux packages for mainline version
3
vim /etc/yum.repos.d/nginx.repo
[nginx] name=nginx repo baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/ gpgcheck=0 enabled=1
将OS 换成centos
OSRELEASE 换成 6 即可
原文地址:http://11176257.blog.51cto.com/11166257/1910800