首页 > 代码库 > centos 6 编译安装httpd-2.4

centos 6 编译安装httpd-2.4

1. 下载源码:
cd /usr/local/src/
wget 
http://mirrors.cnnic.cn/apache/httpd/httpd-2.4.12.tar.bz2

wget http://mirrors.cnnic.cn/apache/apr/apr-1.5.2.tar.bz2

wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.5.4.tar.gz


2. 安装apr
tar jxvf apr-1.5.2.tar.bz2
cd apr-1.5.2

./configure --prefix=/usr/local/apr
make && make install

3. 安装apr-util
tar zxvf apr-util-1.5.4.tar.gz

cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util  --with-apr=/usr/local/apr/
make && make install 

4. 安装httpd
yum install  gcc  make cmake  pcre-devel
./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/

make && make install 


centos 6 编译安装httpd-2.4