1:到apache官方网站下载最新版本的apache,然后解压,执行如下命令:
./configure –prefix=/root/soft/apache
提示:
configure: error: APR not found. Please read the documentation.
2.apr not found问题:
提示缺少apr,下载,下载后解压,编译安装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,下载 ,下载后解压,编译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问题:
下载:,解压后开始编译并安装,执行如下命令:
./configure -prefix=/root/soft/pcre
----------------------如果已经有gcc以及g++环境的,可以省略看这一步
说明:在编译pcre的时候,需要你的linux安装gcc以及g++环境,否则提示错误;我在安装的时候提示没有安装g++,由于我的gcc版本是4.4.5-6的
,因此我下载可同样版本的下面3个软件包:
-------------------------------------------------------------------------------------------
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