問題描述:
啓動 Apache 時報錯:
[root@localhost sh]# service httpd start
Starting httpd: httpd: Could not reliably determine the server‘s fully qualified domain name, using localhost.localdomain for ServerName
(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
問題分析:啓動apache時,apache配置文件默認使用的80端口,被其他程序所佔用。
解決方法1:查詢佔用 80 端口的進程,然後殺掉該進程:
查詢80端口占用的進程
[root@localhost sh]# netstat -tulnp | grep ":80"
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1327/ngi