排错集锦2 nginx安装开启失败
Posted 遙遙背影暖暖流星
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了排错集锦2 nginx安装开启失败相关的知识,希望对你有一定的参考价值。
问题:对安装对启动路径进行了优化,现在可以利用systemctl进行管理,但发现启动不了
如图
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] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
解决方法:
lsof -i:80 #查看80端口被哪些进程占用,可以看到是httpd
重新启动,依旧失败
lsof -i:80却这是占用进程改变,再杀,并把httpd 关闭且不自动开启
systemctl stop httpd ,systemctl disable httpd
再开启,成功
以上是关于排错集锦2 nginx安装开启失败的主要内容,如果未能解决你的问题,请参考以下文章
排错集锦3:nginx重启Warning: nginx.service changed on disk. Run ‘systemctl daemon-reload‘ to reload units
排错集锦:在MHA 的配置过程中masterha_check_repl -conf=/etc/masterha/app1.cnf 失败