(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

Posted 防空洞123

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80相关的知识,希望对你有一定的参考价值。

问题说明80端口被占用,用netstat -nlp |grep :80命令看看有什么进程占用了80端口,发现是httpd进程。

没想到安装了两个apache,我安装apache2.4的时候删除了2.2的apache啊,

可能是安装php memcache扩展的时候莫名其妙的安装了上了。

总之要卸载它

rpm -qa|grep -i httpd 

rpm -e --nodeps httpd-2.2.15-59.el6.centos.x86_64

rpm -e --nodeps httpd-tools-2.2.15-59.el6.centos.x86_64

然后需要注册到系统服务 才能使用service httpd start

 httpd: unrecognized service

cd /usr/local/apache2/bin

cp apachectl /etc/rc.d/init.d/httpd

增加环境变量 :

export PATH=$PATH:/usr/local/apache2/bin

后才可以使用 httpd -v 查看版本

http://blog.csdn.net/waitig1992/article/details/47949669

以上是关于(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80的主要内容,如果未能解决你的问题,请参考以下文章

socketserver OSError:[Errno 98] Address already in use

Swoole计一次swoole_server配合laravel5启动报错:Address already in use[98]

修改nignx报错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)

Linux 启动 Apache 时报错:(98)Address already in use: make_sock: could not bind to address [::]:80

unable to bind listening socket for address '127.0.0.1:9090': Address already in use (98)(示例