Soubriquet
Soubriquet

Reputation: 3350

Upgrading nginx on Centos 6.8

I'm trying to update Nginx on Centos 6.8. I tried

sudo vi /etc/yum.repos.d/nginx.repo

and then changing the nginx.repo to

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

and then ran:

sudo yum update && sudo yum install nginx

But when I check the version with nginx -v, it's still version 1.9.2. I also tried quitting and reloading, but neither did anything. Also tried:

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

Could someone point me in the right direction?

Upvotes: 1

Views: 1498

Answers (1)

Nehal J Wani
Nehal J Wani

Reputation: 16619

Download the latest epel-release rpm from http://dl.fedoraproject.org/pub/epel/6/x86_64/

Install epel-release rpm:

# rpm -Uvh epel-release*rpm

Install nginx rpm package:

# yum --enablerepo=epel-testing install nginx

Upvotes: 2

Related Questions