1nginx -v
1cat /etc/redhat-release
1vim /etc/yum.repos.d/nginx.repo
2
3[nginx]
4name=nginx repo
5baseurl=http://nginx.org/packages/centos/7/$basearch/
6gpgcheck=0
7enabled=1
1yum list | grep nginx
1yum update nginx -y
1nginx -v
2nginx -t # 测试配置文件是否检查通过
1nginx -s reload # 完成重新启动
2# 或
3systemctl restart nginx # 重启都可以
1nginx: [emerg] module "/usr/lib64/nginx/modules/ngx_http_image_filter_module
原因:不匹配 解决:
1yum remove nginx-mod*
1yum install nginx-module-*
1nginx -s reload