How to update my Nginx with Yum in Centos 7

I used yum install nginx on my ECS server, but the version is not high enough to support http2. After Google search, I added a configuration file:

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

With content:

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

Then I ran yum update nginx and it gave me version 1.8.1, which is still not high enough and does not support http2.

Can anyone help me update my nginx to 1.9. 5 or higher?

Update the configuration file to this

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

You need the mainline repository

I used yum install nginx on my ECS server, but the version is not high enough to fail Support http2. After Google search, I added a configuration file:

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

With content:

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

Then I ran yum update nginx, and it gave me version 1.8.1, which is still not high enough and does not support http2.< /p>

Can anyone help me update my nginx to version 1.9.5 or higher?

Update the configuration file to this

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

You Mainline repository required

Leave a Comment

Your email address will not be published.