http://apache.org/
apache 官网下载 httpd apr apr-util 的bz2源码包
wget http://archive.apache.org/dist/apr/apr-1.4.5.tar.bz2
wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.bz2
下载pcre源码包
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip
安装apr-1.4.5
进入安装目录
cd /opt/apr-1.4.5/
安装及编译
./configure --prefix=/usr/local/apr
make && make install
安装apr-util-1.3.12
进入安装目录
cd /opt/apr-util-1.3.12/
安装及编译
./configure --prefix=/usr/local/apr-util -with- apr=/usr/local/apr/bin/apr-1-config
make && make install
安装pcre-8.10
进入安装目录
cd /opt/pcre-8.10/
安装及编译
./configure --prefix=/usr/local/pcre
make && make install
安装apache
进入安装目录
cd /opt/httpd-2.4.10/
安装及编译
需要用--with参数指定我们刚才安装的依赖包位置
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre
make && make install