LNMP环境搭建之Nginx服务启动失败
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LNMP环境搭建之Nginx服务启动失败相关的知识,希望对你有一定的参考价值。
错误提示:
Starting nginx:nginx:[emerg]bind()to 0.0.0.0:80 failed(98:Address alreadr in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
根据错误判断应该是80端口的问题,于是我查看了一下80端口占用情况。
#lsof -i:80
[[email protected] sbin]# lsof -i:80
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
nginx 4005 root 6u IPv4 14957 0t0 TCP *:http (LISTEN)
nginx 4013 nobody 6u IPv4 14957 0t0 TCP *:http (LISTEN)
然后将这两个进程kill。
[[email protected] sbin]# kill -9 4005
[[email protected] sbin]# kill -9 4013
最后启动成功!
[[email protected] sbin]# service nginx start
Starting Nginx: [ OK ]
本文出自 “SenLinux” 博客,请务必保留此出处http://chensenlin.blog.51cto.com/10559465/1761026
以上是关于LNMP环境搭建之Nginx服务启动失败的主要内容,如果未能解决你的问题,请参考以下文章