nginx开启失败nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

[root@myp ~]# /etc/init.d/nginx start
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to [::]: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 [::]: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 [::]: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 [::]:80 failed (98: Address already in use)

80端口被占用了,查出是哪些进程被占用,Kill就行

[root@myp ~]# lsof -i :80
COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
httpd   10856   root    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10859 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10860 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10861 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10862 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10863 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10864 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10865 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)
httpd   10866 apache    4u  IPv6  67121      0t0  TCP *:http (LISTEN)

猜你喜欢

转载自blog.csdn.net/myydebk666/article/details/86475359