平滑升级nginx遇到的问题

今天正式环境网站宕机,根据nginx的错误日志是因为nginx本身版本太低的问题,是nginx自身的bug

error.log报的错误信息如下:

2017/11/02 16:59:49 [crit] 68660#0: *34431 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while closing request, client: 10.2.21.75, server: 0.0.0.0:443
2017/11/02 16:59:54 [crit] 68661#0: *36315 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while closing request, client: 222.221.169.145, server: 0.0.0.0:443
2017/11/02 16:59:54 [crit] 68661#0: *36316 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while closing request, client: 222.221.169.145, server: 0.0.0.0:443
2017/11/02 16:59:54 [crit] 68661#0: *36314 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while closing request, client: 222.221.169.145, server: 0.0.0.0:443
2017/11/02 16:59:55 [crit] 68661#0: *36388 SSL_shutdown() failed (SSL: error:140E0197:SSL routines:SSL_shutdown:shutdown while in init) while closing request, client: 222.172.244.195, server: 0.0.0.0:443

据网上搜索,可以确定应该是nginx的问题,于是决定升级nginx,解压后执行./configure时报错如下:

 ./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option. 

于是安装pcre-devel解决问题
yum -y install pcre-devel  但是提示

 在网上搜的类似yum命令均提示已安装并且是最新版本 ,但是安装新版本nginx依旧提示缺少pcre

于是自己下载pcre-8.37.tar.gz 、安装、成功 , 再执行安装nginx、成功了..........

经过仔细研究终于发现问题所在,原来pcre和pcre-devel是两个包,安装失败并非是yum命令的原因,相反安装的时候能用yum尽量用yum安装

所以正确的yum命令应该是 yum install pcre pcre-devel  要安装这两个包

 

其过程中值得注意的点:1、执行make && make install 时不要少打&(这里很坑!总忘!唉!)

转载于:https://www.cnblogs.com/zhouhao666/p/7773581.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值