Problem: the following error message is displayed in the Tomcat log.
Information: the Apache Tomcat native library which allows/webapps/jslngdailybuild/buildoptimal performance in production environments was not found on the java. library. path:/usr/local/JDK/JRE/lib/amd64/Server:/usr/local/JDK/JRE/lib/amd64: /usr/local/JDK/JRE /.. /lib/amd64:/usr/local/APR/lib:/usr/Java/packages/lib/amd64:/lib:/usr/lib 9:47:24 Org. apache. coyote. http11.http11protocol init
Cause Analysis: From tomcat5.5, Tomcat can use Apache apr to accelerate Io access and use OpenSSL. If you do not install Apr, the preceding error occurs.
Installation steps:
0. Required software packages:
-- Apr-1.3.2.tar.gz -- apr-util-1.3.2.tar.gz -- tomcat-native.tar.gz // Tomcat comes with the first two packages: http://apache.mirror.phpchina.com/apr/
1. Install apr-1.3.2.tar.gz
# Tar zxvf apr-1.3.2.tar.gz # cd apr-1.3.2 #./configure # Make # make install // APR installed under/usr/local/APR
2. Install apr-util-1.3.2.tar.gz
# Tar zxvf apr-util-1.3.2.tar.gz # D apr-util-1.3.2 #. /configure -- With-Apr =/usr/local/APR // -- With-Apr =/usr/local/APR specify the APR installation path # Make # make install
3. Install tomcat-native.tar.gz
# cd /usr/local/tomcat/bin# tar zxvf tomcat-native.tar.gz# cd tomcat-native-1.1.10-src/jni/native# ./configure --with-apr=/usr/local/apr --with-java-home=/usr/local/jdk
4. Add Environment Variables
# Vi/etc/profile Add: Export LD_LIBRARY_PATH =/usr/local/APR/lib
5. Restart tomcat to view the result.
# Vi/usr/local/tomcat/logs/Catalina. out Information: loaded Apache Tomcat native library 1.1.10.2008-7-8 10:20:27 Org. apache. catalina. core. aprlifecyclelistener init information: Apr capabilities: ipv6 [True], sendfile [True], accept filters [false], random [True]. 10:20:27 Org. apache. coyote. http11.http11aprprotocol init