tomcat 安装APR
APR安装教程, Tomcat官网文档
http://tomcat.apache.org/tomcat-7.0-doc/apr.html http://tomcat.apache.org/native-doc/
1. Tomcat Native下载及安装
http://tomcat.apache.org/download-native.cgi
Windows系统,下载DLL文件,解压到bin目录即可。
http://www-us.apache.org/dist/tomcat/tomcat-connectors/native/1.2.10/binaries/tomcat-native-1.2.10-win32-bin.zip
Linux系统,下载源文件并编译
http://www-us.apache.org/dist/tomcat/tomcat-connectors/native/1.2.10/source/tomcat-native-1.2.10-win32-src.zip
必要条件
- APR
- OpenSSL
- JAVA SE
apt-get install libapr1.0-dev libssl-dev
yum install apr-devel openssl-devel
unzip tomcat-native-1.2.10-win32-src.zip
cd tomcat-native
./configure --with-apr=$HOME/APR \
--with-java-home=$JAVA_HOME \
--with-ssl=$HOME/OPENSSL \
--prefix=$CATALINA_HOME
make && make install
#编译的文件会安装在 $CATALINA_HOME/lib
重启 tomcat 会看到日志开头部分提示, 表示APR已经安装并且被加载。
INFO: Loaded APR based Apache Tomcat Native library 1.x.y.