2015年(68)
分类: 系统运维
2015-08-31 17:20:25
简单记录nginx升级步骤
由0.7.61升级到0.8.29
#/usr/local/nginx/sbin/nginx -V
nginx version:nginx/0.7.61
built by gcc 4.1.220080704 (Red Hat 4.1.2-44)
configure arguments:--user=www --group=www --prefix=/usr/local/nginx/--with-http_stub_status_module --with-http_ssl_module --with-md5=/usr/lib--with-sha1=/usr/lib
[root@nagios]tar zxvf nginx-0.8.29.tar.gz
[root@nagios]cd nginx-0.8.29
[root@nagiosnginx-0.8.29]# --prefix=/usr/local/nginx --with-http_stub_status_module--with-http_gzip_static_module --with-http_realip_module --with-http_flv_module--without-http_browser_module --without-mail_pop3_module--without-mail_imap_module --without-mail_smtp_module --with-http_perl_module--with-http_image_filter_module--add-module=/opt/agentzh-headers-more-nginx-module-db9913e
[root@nagiosnginx-0.8.29]# make
[root@nagios nginx-0.8.29]# mv /usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx.old
[root@nagiosnginx-0.8.29]# cp objs/nginx /usr/local/nginx/sbin/
[root@nagiosnginx-0.8.29]# /usr/local/nginx/sbin/nginx -t
the configurationfile /usr/local/nginx//conf/nginx.conf syntax is ok
configuration file/usr/local/nginx//conf/nginx.conf test is successful
[root@nagiosnginx-0.8.29]# kill -USR2 `cat /usr/local/nginx/nginx.pid`
nginx.pid nginx.pid.oldbin
[root@nagiosnginx-0.8.29]# kill -QUIT `cat /usr/local/nginx/nginx.pid.oldbin`
[root@nagiosnginx-0.8.29]# /usr/local/nginx/sbin/nginx -v
nginx version:nginx/0.8.29