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

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


問題1:apache

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 ServerNamedom

httpd not running, trying to startide


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

[root@crushlinux1 conf]# vi httpd.confget

97 #ServerName www.example.com:80it

98 ServerName localhost:80編譯


從新啓動apacheclass

[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

相關文章
相關標籤/搜索