码迷,mamicode.com
首页 > 其他好文 > 详细

nginx1.5 升级到1.14

时间:2018-06-14 18:07:14      阅读:478      评论:0      收藏:0      [点我收藏+]

标签:stat   tar   down   拷贝   /usr   image   strong   重点   AC   

wget http://nginx.org/download/nginx-1.14.0.tar.gz
tar xf nginx-1.14.0.tar.gz
cd nginx-1.14.0
./configure --user=www --group=www --prefix=/alidata/server/nginx --with-http_stub_status_module --without-http-cache --with-http_ssl_module --with-http_gzip_static_module
make

不要make install

2.拷贝之前的nginx执行文件

cp  /usr/local/nginx/sbin/nginx /usr/local/bak

3.停止nginx服务,升级nginx

nginx -s stop
cp /objs/nginx /usr/local/nginx/sbin

4.查看版本

./nginx -v

5.重点

./nginx -c /usr/local/nginx/conf/nginx.conf 之前旧版本的nginx配置文件路径
执行下来可能会报错
nginx: [emerg] getpwnam("www") failed
打开nginx配置文件 /usr/local/nginx/conf/nginx.conf
需要把#user  nobody;这段注视 释放开来。

这就可以用新版本用就的配置文件了。

技术分享图片

 

###

如果在./configure报

./configure: error: SSL modules require the OpenSSL library.

可以执行

yum -y install openssl openssl-devel  

 

nginx1.5 升级到1.14

标签:stat   tar   down   拷贝   /usr   image   strong   重点   AC   

原文地址:https://www.cnblogs.com/sz-jack/p/9183184.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!