1.进入某一个目录

cd /usr/local

2.下载apr和apr-utils最新版

1 wget  http://apache.fayea.com/apache-mirror//apr/apr-1.5.0.tar.gz 
2 wget  http://apache.fayea.com/apache-mirror//apr/apr-util-1.5.3.tar.gz

3.解压文件

1 tar -zxvf apr-1.5.0.tar.gz 
2 tar -zxvf aor-util-1.5.3.tar.gz

4.安装apr和apr-utils

cd apr-1.5.0

./configure --prefix=/usr/local/apr

make

make install

cd ..

cd apr-util-1.5.3

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

make

make insatll

5.安装 tomcat-native

1 cd /usr/local/tomcat/bin
2 tar -zxvf tomcat-native.tar.gz
3 cd tomcat-native-1.1.29-src/jni/native
4 ./configure --with-apr=/usr/local/apr --with-java-  home=/usr/java/jdk1.7.0_25
5 make
6 make install

6.设置apr的环境变量

vi /etc/profile

#在文本的最后面添加以下内容

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib

#使profile生效,

source /etc/profile

7.启动tomcat并查看catalina.out

1 ./startup.sh 
2 cat catalina.out