centos下yum安装nginx最新版本

配置nginx源

1
2
3
4
5
6
7
vim /etc/yum.repos.d/nginx.repo  
#nginx.repo  
[nginx]  
name=nginx repo  
baseurl=http://nginx.org/packages/centos/6/$basearch/  
gpgcheck=0  
enabled=1

查看nginx版本信息

1
yum list | grep nginx

我的还安装了epel,后面有显示来源

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[root@localhost nginx]# yum list | grep nginx 
collectd-nginx.x86_64                      4.10.9-1.el6                 epel    
munin-nginx.noarch                         2.0.25-11.el6                epel    
nginx.x86_64                               1.10.1-1.el6.ngx             nginx   
nginx-debug.x86_64                         1.8.0-1.el6.ngx              nginx   
nginx-debuginfo.x86_64                     1.10.1-1.el6.ngx             nginx   
nginx-filesystem.noarch                    1.0.15-12.el6                epel    
nginx-module-geoip.x86_64                  1.10.1-1.el6.ngx             nginx   
nginx-module-image-filter.x86_64           1.10.1-1.el6.ngx             nginx   
nginx-module-njs.x86_64                    1.10.1.0.0.20160414.1c50334fbea6-1.el6.ngx
                                                                        nginx   
nginx-module-perl.x86_64                   1.10.1-1.el6.ngx             nginx   
nginx-module-xslt.x86_64                   1.10.1-1.el6.ngx             nginx   
nginx-nr-agent.noarch                      2.0.0-9.el6.ngx              nginx   
nginx16.x86_64                             1.6.3-1.w6                   webtatic
nginx18.x86_64                             1.8.1-1.w6                   webtatic
pcp-pmda-nginx.x86_64                      3.10.9-6.el6                 base

开始安装

1
yum install nginx.x86_64

添加评论