源代碼安裝示例-----Apache服務器
1、
登錄www.apache.org 網站下載linux版,檔案名 httpd-version.tar.gz(version為版本號,有 tar.bz2和tar.gz兩個版本)
2、
httpd-2.4.43.tar.gz http://httpd.apache.org/download.cgi#apache24

3、 apr-1.7.0.tar.gz https://apr.apache.org/download.cgi

4、apr-util-1.6.1.tar.gz http://us.mirrors.quenda.co/apache//apr/

5、 pcre-8.44.tar.gz https://ftp.pcre.org/pub/pcre/

6、安裝apr:
#tar -zxvf apr-1.7.0.tar.gz
#cd apr-1.7.0
#./configure --prefix=/usr/local/apr
#make
#make install

7、安裝apr-util:
#tar -zxvf apr-util-1.6.1.tar.gz
#cd apr-util-1.6.1
#./configure --with-apr=/usr/local/apr
#make
#make install
問題:
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
yum install expat-devel

8、安裝pcre:
#tar -zxvf pcre-8.4.4.tar.gz
#cd pcre-8.4.4
#./configure --prefix=/usr/local/pcre
#make
#make install


9、安裝apache2.4:
#tar -zxvf httpd-2.4.43.tar.gz
#cd httpd-2.4.43
#./configure --prefix=/usr/local/apache24 --enable-so
–with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr/
–with-pcre=/usr/local/pcre/
#make
#make install


Apache安裝成功!
10、啟動Apache
cd /usr/local/apache24/bin
sudo ./apachectl start

ldd httpd //查看httpd所依賴的庫
sudo ldconfig
ldd httpd
sudo ./apachectl
在瀏覽器中輸入localhost,顯示如下界面:

碼字不易:求一小贊
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/75805.html
標籤:其他
上一篇:cocosbuilder圖片加載
