nginx平滑升级make upgrade出错的解决办法

为nginx平滑升级在make upgrate那一步除了点小状况

 

 

1
2
3
4
5
6
7
8
9
[root@web01 nginx-1.0.5] # make upgrade
/usr/local/nginx/sbin/nginx  -t
nginx: the configuration  file  /usr/local/nginx/conf/nginx .conf syntax is ok
nginx: configuration  file  /usr/local/nginx/conf/nginx .conf  test  is successful
kill  -USR2 ` cat  /usr/local/nginx/logs/nginx .pid`
sleep  1
test  -f  /usr/local/nginx/logs/nginx .pid.oldbin
make : *** [upgrade] 错误 1
[root@web01 nginx-1.0.5] #

 

找不到进程文件出错,无法进行下一步

 

再次启动脚本,有如下提示

 

1
2
3
4
5
6
7
[root@web01 sbin] # ./nginxold
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already  in  use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already  in  use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already  in  use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already  in  use)
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already  in  use)
[emerg]: still could not bind()

这步是说80端口被使用

 

我也不清楚为什么nginx启动了却没有进程文件。

所以先把nginx kill掉,重新启动

 

1
2
3
[root@web01 sbin] # pkill -int nginx
[root@web01 sbin] # ./nginxold  
[root@web01 sbin] #

 

 

接着make upgrate就成功了升级

 

1
2
3
4
5
6
7
8
9
10
[root@web01 nginx- 1.0 . 5 ]# make upgrade
/usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax  is  ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test  is  successful
kill -USR2 `cat /usr/local/nginx/logs/nginx.pid`
sleep  1
test -f /usr/local/nginx/logs/nginx.pid.oldbin
kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
[root@web01 nginx- 1.0 . 5 ]#
[root@web01 nginx- 1.0 . 5 ]#

 

 

希望对大家有帮助

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值