yum升级nginx或安装最新版本nginx

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

yum update nginx

yum install -y nginx

如果出现
13536#13536: module "/usr/lib64/nginx/modules/ngx_http_geoip_module.so" version 1012002 instead of 1015008 in /usr/share/nginx/modules/mod-http-geoip.conf:1

原因在于nginx模块版本之间的冲突

yum remove nginx-mod*

yum install nginx-module-*

systemctl start nginx

相关推荐