1:到apache官方網站http://httpd.apache.org/download.cgi#apache24下載最新版本的apache,然后解壓,執行如下命令:
./configure –prefix=/root/soft/apache
提示:
configure: error: APR not found. Please read the documentation.
2.apr not found問題:
提示缺少apr,下載http://archive.apache.org/dist/apr/apr-1.4.5.tar.gz ,下載后解壓,編譯安裝apr工具,執行如下命令:
./configure -prefix=/root/soft/apr
make
make install
繼續編譯apche,執行如下命令:
./configure -prefix=/root/soft/apache -with-apr=/root/soft/apr
提示:
configure: error: APR-util not found. Please read the documentation
3.Apr-util not found問題:缺少apr-util,下載http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz ,下載后解壓,編譯apr-util,執行如下命令:
./configure -prefix=/root/soft/apr-util -with-apr=/root/soft/apr
make
make install
繼續編譯apche,執行如下命令:
./configure -prefix=/root/soft/apache -with-apr=/root/soft/apr -with-apr-util=/root/soft/apr-util
提示:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
4.pcre問題:
下載:http://sourceforge.net/projects/pcre/files/pcre/,解壓后開始編譯並安裝,執行如下命令:
./configure -prefix=/root/soft/pcre
----------------------如果已經有gcc以及g++環境的,可以省略看這一步
說明:在編譯pcre的時候,需要你的linux安裝gcc以及g++環境,否則提示錯誤;我在安裝的時候提示沒有安裝g++,由於我的gcc版本是4.4.5-6的
,因此我下載可同樣版本的下面3個軟件包:
gcc-c++-4.4.5-6.el6.x86_64.rpm
libstdc++-4.4.5-6.el6.x86_64.rpm
libstdc++-devel-4.4.5-6.el6.x86_64.rpm
-------------------------------------------------------------------------------------------
make
make install
5.繼續配置安裝apche ab
./configure -prefix=/root/soft/apache -with-apr=/root/soft/apr -with-apr-util=/root/soft/apr-util -with-pcre=/root/aoft/pcre
make
make install