Now most of the enterprise platform is still using the CentOS6 version, but want to install httpd-2.4, it will be a lot of trouble,
Since the APR version installed by CentOS6 Yum is not available for httpd-2.4, we can only compile and install Apr and apr-in source code.
Util
1. Download Apr and Apr-util installation package from official website
wget http://mirrors.cnnic.cn/apache/apr/apr-1.5.2.tar.gz
wget http://mirrors.cnnic.cn/apache/apr/apr-util-1.5.4.tar.gz
2. Decompression
Tar xzvf apr-1.5.2.tar.gz
Tar xzvf apr-util-1.5.4.tar.gz
3. Install Apr
cd/usr/local/src/apr-1.5.2
./configure--PREFIX=/USR/LOCAL/APR
Note: In this step it is easy to make a mistake, after compiling will prompt rm:cannot remove ' libtoolt ': No such file or
Directory, after this prompt, if you use the command echo $? To see if the compilation was successful, 0 (success) is displayed, but
It's time to compile Apache and repeat the error, and that's because of the bug when compiling Apr.
WORKAROUND: Open the Configure file in the APR-1.5.2/directory, locate " $RM "$cfgfile"
" and comment out this line
It is time to recompile.
Make
Make install
4, Installation Apr-util
cd/sur/local/src/apr-util-1.5.4
./configure--prefix=/usr/local/apr-util--WITH=/USR/LOCAL/APR
Make
Make install
5, installation httpd
Note that in order to prevent the subsequent compilation error, here in advance to install some source packages, of course, you can also compile, and then according to the compilation
The results of the translation are dealt with accordingly.
Yum install-y gcc make cmake pcre-devel
Generally installed these packages will not error, if there are other errors, I do not collect here, you can find other information
./configure--prefix=/usr/local/apache--WITH-APR=/USR/LOCAL/APR--with-apr-util=/usr/local
/apr-util
Make
Make install
This article is from "The Miracle Teenager" blog, please be sure to keep this source http://raffaelexr.blog.51cto.com/8555551/1711487
Installation and error analysis of the apache2.4 version