apache重启的时候可能会出现以下错误:
#service httpd start
httpd:(98)Address already in use: make_sock: could not bind to address [::]:80
(98)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
查看占用80端口的程序列表
#netstat -lnp|grep 80
返回:
tcp 0 0 :::80 :::* LISTEN 14860/httpd
或者ps -aux | grep apache查看所有apache的进程
查看14860进程ID所对应的程序
#ps 14860
杀死这个进程ID
#kill -9 14860
或这个杀死所有的httpd进程,更绝.
#pkill -9 httpd
然后就可以重启httpd服务了