CentOS use the official source nginx yum install the latest version

CentOS use the official source nginx yum install the latest version

1. Create nginx.repo

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

2. Add Content
# If CentOS6, document reads as follows:

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

# If CentOS7, document reads as follows:

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

3, start the installation nginx

yum install nginx

As shown above, the system default source or sources 163 installed version 1.10.2, using the source can be upgraded to an official nginx 1.16.0

 

Guess you like

Origin www.cnblogs.com/fjping0606/p/11016116.html