因为最近作者指出nginx一直以来都存在一个安全漏洞,因此今天升级了nginx
[root@unixhater ~]# cd /opt/nginx/
[root@unixhater nginx]# sbin/nginx -V #查看版本
nginx version: nginx/0.7.61
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module #注意这里的编译项
[root@unixhater nginx]# wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz #下载
[root@unixhater nginx]# tar xzvf nginx-0.7.62.tar.gz #解压缩
[root@unixhater nginx]# cd nginx-0.7.62
[root@unixhater nginx-0.7.62]# ./configure –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module #按原来的选项configure
[root@unixhater nginx-0.7.62]# make #编译
[root@unixhater nginx-0.7.62]# mv /opt/nginx/sbin/nginx /opt/nginx/sbin/nginx.old #移动旧版本
[root@unixhater nginx-0.7.62]# cp objs/nginx /opt/nginx/sbin/ #复制新版本nginx过去
[root@unixhater nginx-0.7.62]# make upgrade #无缝升级,当前连接不会断
[root@unixhater nginx-0.7.62]# cd ..
[root@unixhater nginx]# sbin/nginx -V
nginx version: nginx/0.7.62
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module
[root@unixhater nginx]# rm -rf nginx-0.7.62 nginx-0.7.62.tar.gz #清理
[root@unixhater ~]# cd /opt/nginx/
[root@unixhater nginx]# sbin/nginx -V #查看版本
nginx version: nginx/0.7.61
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module #注意这里的编译项
[root@unixhater nginx]# wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gz #下载
[root@unixhater nginx]# tar xzvf nginx-0.7.62.tar.gz #解压缩
[root@unixhater nginx]# cd nginx-0.7.62
[root@unixhater nginx-0.7.62]# ./configure –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module #按原来的选项configure
[root@unixhater nginx-0.7.62]# make #编译
[root@unixhater nginx-0.7.62]# mv /opt/nginx/sbin/nginx /opt/nginx/sbin/nginx.old #移动旧版本
[root@unixhater nginx-0.7.62]# cp objs/nginx /opt/nginx/sbin/ #复制新版本nginx过去
[root@unixhater nginx-0.7.62]# make upgrade #无缝升级,当前连接不会断
[root@unixhater nginx-0.7.62]# cd ..
[root@unixhater nginx]# sbin/nginx -V
nginx version: nginx/0.7.62
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-44)
configure arguments: –user=www –group=www –prefix=/opt/nginx –with-http_stub_status_module –with-http_ssl_module
[root@unixhater nginx]# rm -rf nginx-0.7.62 nginx-0.7.62.tar.gz #清理
版权所有:《太阳花工作室》 => 《无缝升级nginx》
本文地址:http://bg.artuion.com/linux/187.html
除非注明,文章均为 《太阳花工作室》 原创,欢迎转载!转载请注明本文地址,谢谢。