nginx增加官方yum源

  sre

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

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

[root@mini ~]# yum list |grep nginx
nginx.x86_64 1:1.12.0-1.el7.ngx @nginx
nginx-debug.x86_64 1:1.8.0-1.el7.ngx nginx
nginx-debuginfo.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-geoip.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-geoip-debuginfo.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-image-filter.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-image-filter-debuginfo.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-njs.x86_64 1:1.12.0.0.1.10-1.el7.ngx nginx
nginx-module-njs-debuginfo.x86_64 1:1.12.0.0.1.10-1.el7.ngx nginx
nginx-module-perl.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-perl-debuginfo.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-xslt.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-module-xslt-debuginfo.x86_64 1:1.12.0-1.el7.ngx nginx
nginx-nr-agent.noarch 2.0.0-12.el7.ngx nginx
pcp-pmda-nginx.x86_64 3.11.3-4.el7 base

One Reply to “nginx增加官方yum源”

  • 增加官方源后,可热更新nginx
    echo “[nginx]”>>/etc/yum.repos.d/nginx.repo && echo “name=nginx repo”>>/etc/yum.repos.d/nginx.repo && echo “baseurl=http://nginx.org/packages/centos/releasever/basearch/”>>/etc/yum.repos.d/nginx.repo && echo “gpgcheck=0″>>/etc/yum.repos.d/nginx.repo && echo “enabled=1″>>/etc/yum.repos.d/nginx.repo && yum update -y nginx* nginx-*

LEAVE A COMMENT

Captcha Code