CentOS 6 compile and install httpd-2.4
The Centos6yum installation of the APR version is no longer available for the httpd-2.4 version. Therefore, the source code is required to compile APR and Apr-util
1. Download the source code:
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. Install 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. Installing 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. Installing 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 Compiling and installing