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

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


問題1:

httpd:apr_sockaddr_info_get()failedforcrushlinux1.com

httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,using127.0.0.1forServerName

httpdnotrunning,tryingtostart


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

[root@crushlinux1conf]#vihttpd.conf

97#ServerNamewww.example.com:80

98ServerNamelocalhost:80


重新啓動apache

[root@crushlinux1conf]#/usr/local/httpd/bin/apachectlstart

[root@crushlinux1conf]#ps-aux|grephttpd

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


問題2:

/usr/local/apache/bin/httpd:errorwhileloadingsharedlibraries:libiconv.so.2:cannotopensharedobjectfile:Nosuchfileordirectory

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


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

/usr/local/lib

[root@crushlinux1conf]#/sbin/ldconfig-v

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

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

[root@crushlinux1conf]#/usr/local/httpd/bin/apachectlstart


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