akandandy 发表于 2013-9-7 17:57:36

CentOS安装LNMP nginx无法启动

安装完LNMP后,可以访问欢迎界面。只要系统重启,nginx就会无法启动,重启LNMP服务,其他均正常,NGINX就是无法启动。昨天安装了3次,最后发现,好像是YUM的时候,有一些组件没有安装上,请问官方是否有解决办法

licess 发表于 2013-9-7 20:16:53

可能nginx没启动,可以尝试在/etc/rc.local 里加入/usr/local/nginx/sbin/nginx 试试看

akandandy 发表于 2013-9-7 20:53:03

手动启动时,提示这样的错误

# /etc/init.d/nginx start
Starting nginx daemon: nginxnginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: still could not bind()
nginx already running.

akandandy 发表于 2013-9-7 20:53:32

回复 2# 的帖子

手动启动时,提示这样的错误

# /etc/init.d/nginx start
Starting nginx daemon: nginxnginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: still could not bind()
nginx already running.

licess 发表于 2013-9-8 09:46:20

nginx 已经启动 或其他程序占用80端口才会提示上面的信息

akandandy 发表于 2013-9-8 12:36:45

回复 5# 的帖子

# lsof -i:80
COMMANDPID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
nginx   2326 root    6uIPv412607      0t0TCP *:http (LISTEN)
nginx   2327www    6uIPv412607      0t0TCP *:http (LISTEN)

nginx占用了80啊~~纠结
页: [1]
查看完整版本: CentOS安装LNMP nginx无法启动