源代碼編譯安裝apache啓動報錯

源代碼編譯安裝apache啓動報錯


問題1:

httpd: apr_sockaddr_info_get() failed for crushlinux1.com

httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

httpd not running, trying to start


[root@crushlinux1 local]# cd /usr/local/httpd/conf/

[root@crushlinux1 conf]# vi httpd.conf

97 #ServerName www.example.com:80

98 ServerName localhost:80


重新啓動apache

[root@crushlinux1 conf]# /usr/local/httpd/bin/apachectl start

[root@crushlinux1 conf]# ps -aux |grep httpd

[root@crushlinux1 conf]# netstat -anptu |grep "httpd"


問題2:

/usr/local/apache/bin/httpd: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

有很多so模塊在/usr/local/lib目錄下,所以在/etc/ld.so.conf中加入/usr/local/lib這一行


[root@crushlinux1 conf]# vi /etc/ld.so.conf

/usr/local/lib

[root@crushlinux1 conf]# /sbin/ldconfig -v

現在您已經將 Apach安裝在 /usr/local/apache。本安裝支持可裝載模塊

和標準的 MPM prefork。之後,可以使用如下命令啓動 Apache 服務器:

[root@crushlinux1 conf]# /usr/local/httpd/bin/apachectl start


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章