首页 > 代码库 > apache-httpd2.4编译安装

apache-httpd2.4编译安装

centos 6 编译安装httpd-2.4
centos6yum安装的apr版本已经不适用httpd-2.4版本了。所以,需要源码编译apr以及apr-util
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
mkdir /usr/local/apr
./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
mkdir /usr/local/apr-util
./configure \
--prefix=/usr/local/apr-util \
--with-apr=/usr/local/apr
make && make install
4. 安装httpd
yum install gcc make cmake pcre-devel
mkdir /usr/local/apache
./configure \
--prefix=/usr/local/apache \
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util
make && make install

apache-httpd2.4编译安装