Lamp搭建---apache的安裝

1.下載apache httpd-2.4.tar.gz文件  apache

2.解壓 tar -zxvf httpd-2.4.tar.gz瀏覽器

3. ./configure --enable-module=allide

//如出現錯誤  Checking for APR :noui

解決以下  :下載apr http:httpd.apache.org   apr.1.5.1.tar.gzspa

解壓  :tar -zxvf apr.1.5.1.tar.gzorm

cd apr-1.5.1rem

./configure prefix=usr/local/aprit

make編譯

make installform



//如出現Checking apr-util:no

解決以下: 下載apr-util

解壓 tar -zxvf apr-util.1.3.8

cd apr-util.1.3.8

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make

make install


//從新編譯apache  

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

#make

make install


//若是遇到提示cofigure error:pcre-config for libpcre not found.PCRE is required and availble form http://pcre.org/

//解決 下載pcre  地址:http://ftp.exim.llorien.org/pcre/

tar -zxvf pcre-8.36.tar.gz

cd pcre-8.36

./configure prefix=/usr/local/pcre

make

make install


4.make

5make install


默認狀況下,會安裝到/usr/local/apace2目錄下

啓動apache  /usr/local/apache2/bin/apachectl start

//若是在瀏覽器裏沒有正常的顯示 It works 的話,而是看到一個 test page頁面,處理以下,輸入以下的命令

yum remove httpd

而後重啓apache,再次輸入http://localhost就能夠看到正常的It works 頁面了

相關文章
相關標籤/搜索