Issue
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?
Solution
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
Answered By - Nehal J Wani Answer Checked By - Pedro (WPSolving Volunteer)