ちゃんと覚えておけよ?

忘れちゃいけない事のメモ、覚え書き

CentOS 6.3にソースインストールしたApacheが再起動しないときは

httpd -k restartを下ところ以下のエラーが出た。

(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
何度もインストールを繰り返していたので、以前にインストールしたものがちゃんと終了できていないようだ。

以下を実行し不要なものを終了する

/usr/sbin/lsof -i | grep http

httpd     28480  daemon    4u  IPv6  866729      0t0  TCP *:http (LISTEN)
httpd     28481  daemon    4u  IPv6  866729      0t0  TCP *:http (LISTEN)

※daemonのところがapacheとなっていることもある。httpd.conf次第?

kill 28481
kill 28480

これでまた再起動すると出きるようになった。

覚えておこっと!

 

Comment

*