httpd/Apache默认占用的是80端口,有时候你使用apache自带的重启脚本会出现
Address already in use: make_sock: could not bind to address [::]:80
Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
这会导致你的apache无法启动,你需要查找下你的机器看看是否有哪个线程已经占用了80端口。
netstat -lnp|grep 80 #tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 13957/httpd #查看该进程 (13957是动态的) ps 13975 #结束该进程 kill -9 13975 #启动httpd/Apache service httpd start
apache启动完毕。