tomcat-native安装

1)、安装apr
tar zxvf apr-1.4.6.tar.gz
cd apr-1.4.6
./configure --prefix=/usr/local/apr
make
make install
2)、安装apr-iconv
tar -zxvf apr-iconv-1.2.1.tar.gz
cd apr-iconv-1.2.1
./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
make
make install
3)、安装apr-util
tar zxvf apr-util-1.4.1.tar.gz
cd apr-util-1.4.1
./configure --prefix=/usr/local/apr-util --with- apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
make
make install
4)、安装tomcat-native(tomcat在/usr/local/tomcat)
cp tomcat-native-1.1.24-src.tar.gz /usr/local/tomcat/bin/
cd /usr/local/tomcat/bin
tar zxvf tomcat-native-1.1.24-src.tar.gz
cd tomcat-native-1.1.24-src/jni/native
./configure --with-apr=/usr/local/apr --with-java-home=/usr/java/jdk1.6.0_37
make
make install
5)、设置 apr 的环境变量:
vi /etc/profile
后面添加以下内容
export LD_LIBRARY_PATH=/usr/local/apr/lib

source /etc/profile
启动 tomcat 后, 看日志:
more /usr/local/tomcat/logs/catalina.out
Dec 5, 2009 3:25:39 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.24.

你可能感兴趣的:(tomcat)