我试图在Centos 6.8上更新Nginx。我试过了
sudo vi /etc/yum.repos.d/nginx.repo
然后将nginx.repo更改为
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
然后跑了:
sudo yum update && sudo yum install nginx
但是当我用nginx -v
检查版本时,它仍然是版本1.9.2。
我也试过戒烟和重装,但都没有做任何事情。
还尝试过:
cd /opt
wget http://nginx.org/packages/centos/6/x86_64/RPMS/nginx-1.10.1-1.el6.ngx.x86_64.rpm
yum update nginx-1.10.1-1.el6.ngx.x86_64.rpm
有人能指出我正确的方向吗?
答案 0 :(得分:2)
从http://dl.fedoraproject.org/pub/epel/6/x86_64/
下载最新的epel-release rpm安装epel-release rpm:
# rpm -Uvh epel-release*rpm
安装nginx rpm包:
# yum --enablerepo=epel-testing install nginx