系统环境:centos6.5
当前软件的版本:nginx-1.6.1.tar.gz
升级软件的版本:nginx-1.9.9.tar.gz
-
wget -c http://nginx.org/download/nginx-1.9.9.tar.gz
-
tar xzf nginx-1.9.9.tar.gz
-
cd nginx-1.9.9
-
#查看之前编译nginx的参数
-
/usr/local/nginx/sbin/nginx -v
-
nginx version: ws
built by gcc 4.4.7 20120313 (red hat 4.4.7-16) (gcc)
tls sni support enabled
configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
-
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
-
make
-
/usr/local/nginx/sbin/nginx -s stop
-
#备份nginx二进制文件
-
mv /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.1.6.1
-
#拷贝最新版本的nginx二进制文件
-
cp objs/nginx /usr/local/nginx/sbin/nginx
-
#查看升级后的nginx版本
-
/usr/local/nginx/sbin/nginx -v
-
nginx version: nginx/1.9.9
-
#启动升级后的nginx
-
/usr/local/nginx/sbin/nginx
-
阅读(1063) | 评论(0) | 转发(0) |