问题:对安装对启动路径进行了优化,现在可以利用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
再开启,成功