平滑升级Nginx到新版本v1.12.1修复Nginx最新漏洞CVE-2017-7529
来源自己博客地址:http://www.51geeks.com/?p=1526
升级实施步骤
一 查看版本及配置
# nginx -V
nginx version: nginx/1.8.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/usr --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx/nginx.pid --lock-path=/var/lock/nginx.lock --user=nginx --group=nginx --with-http_ssl_module --with-http_flv_module --with-http_stub_status_module --with-http_gzip_static_module --http-client-body-temp-path=/var/tmp/nginx/client/ --http-proxy-temp-path=/var/tmp/nginx/proxy/ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi --http-scgi-temp-path=/var/tmp/nginx/scgi --with-pcre
二 查看nginx所在目录,并备份下
# find / -name nginx
/run/nginx
find: ‘/run/user/42/gvfs’: 权限不够
/etc/nginx
/var/log/nginx
/var/spool/mail/nginx
/var/tmp/nginx
/var/software/nginx-1.8.1/objs/nginx
/usr/sbin/nginx
/usr/local/nginx
/home/nginx
三 编译安装
3.1解压 nginx-1.12.1
# tar xf nginx-1.12.1.tar.gz
3.2进入nginx-1.12.1/ 目录
#cd nginx-1.12.1/
3.3编译配置
# ./configure --pre