代码改变世界

apache ab的安装步骤

2015-05-15 15:15  在云端漫步  阅读(4500)  评论(0编辑  收藏  举报

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