Software Environment: ubuntu14.04 virtual machine vmware software: http://httpd.apache.org/httpd-2.2.29.tar.gz does not need to download apr separately.
1. Extracting Apache Source code
# tar Xvzf httpd-2.2.29.gz
# CD Httpd-2.2.29
2. Install Apr
# CD SRCLIB/APR
#./configure--PREFIX=/USR/LOCAL/APR//configuration to the specified directory
# make
# make install//need to run the front plus sudo in root mode
3. Installing Apr-util
# CD: /apr-util/
#./configure--prefix=/usr/local/apr-util
--with-apr=/usr/local/apr
# make
# make install//require root permission to precede with sudo
# CD: /.. /
4. Installing Apache
#./configure--prefix=/usr/local/apache2--enable-modules=so--enable-mods-shared=all--enable-proxy-- Enable-proxy-connect--enable-proxy-ftp--enable-proxy-http--ENABLE-PROXY-AJP--enable-proxy-balancer-- Enable-rewrite--enable-status--WITH-APR=/USR/LOCAL/APR
Mod_deflate have been requested but can is built due to prerequisite failures (Ubuntu centent) that is not installed Zlib pack. The Yum install Zlib-devel can be used under CentOS, and Apt-get install Zlib1g-dev can be used under Ubuntu.
# make
# make Install ditto
5. Installation tomcat-native.tar.gz//temporarily not equipped
# Cd/opt/tomcat/bin
# tar ZXVF tomcat-native.tar.gz
# CD Tomcat-native-src/jni/native
#./configure--WITH-APR=/USR/LOCAL/APR
6. Add Environment Variables
# Vim/etc/profile
Add: Export Ld_library_path=/usr/local/apr/lib
Configure Apache and Apr under Ubuntu