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

[root@localhost html]#  /usr/sbin/nginxnginx: [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)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] still could not bind()

出现这种情况,一般是80端口被占用,关闭80端口就好

[root@localhost html]# docker psCONTAINER ID   IMAGE     COMMAND       CREATED        STATUS        PORTS                                     NAMES2f7c08c71bba   centos    “/bin/bash”   23 hours ago   Up 23 hours   0.0.0.0:49154->80/tcp, :::49154->80/tcp   nginx

[root@localhost html]# fuser -k 80/tcp80/tcp:              58656 58657 58658

————————

[root@localhost html]#  /usr/sbin/nginxnginx: [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)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] still could not bind()

出现这种情况,一般是80端口被占用,关闭80端口就好

[root@localhost html]# docker psCONTAINER ID   IMAGE     COMMAND       CREATED        STATUS        PORTS                                     NAMES2f7c08c71bba   centos    “/bin/bash”   23 hours ago   Up 23 hours   0.0.0.0:49154->80/tcp, :::49154->80/tcp   nginx

[root@localhost html]# fuser -k 80/tcp80/tcp:              58656 58657 58658