系统环境: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
-
阅读(1300) | 评论(0) | 转发(0) |