出现错误日志:The APR based Apache Tomcat Native library which allows optimal performance in production env

Posted 浆糊jun

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了出现错误日志:The APR based Apache Tomcat Native library which allows optimal performance in production env相关的知识,希望对你有一定的参考价值。

 
tomcat6出现错误日志:
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
 
 
如何解决:通过安装和配置apr解决。
 
Tomcat Native 可以让 Tomcat 使用 Apache 的 apr 包来处理包括文件和网络IO操作,以提升性能。
 
1.安装:yum -y install openssl-devel
 
2.下载:apr-1.4.6.tar.gz、apr-util-1.4.1.tar.bz2、tomcat-native-1.1.19-src.tar.gz
(下载地址:http://archive.apache.org/dist/tomcat/tomcat-connectors/native/) 
 
3.安装apr:
tar -xzf apr-1.4.6.tar.gz 
cd apr-1.4.6
./configure && make && make install
 
tar -xjf apr-util-1.4.1.tar.bz2
cd apr-util-1.4.1

./configure --with-apr=/usr/local/apr   && make  && make install 

 
tar -xzf tomcat-native-1.1.19-src.tar.gz
cd /opt/tomcat-native-1.1.19-src/jni

./configure --with-apr=/usr/local/apr --with-java-home=/opt/jdk && make && make install

 
4.设置apr的环境变量:
vi /etc/profile
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
保存退出
source /etc/profile
 
再查看catalina.out日志,发现不再报错了:

信息: An older version 1.1.19 of the APR based Apache Tomcat Native library is installed, while Tomcat recommends a minimum version of 1.1.22

以上是关于出现错误日志:The APR based Apache Tomcat Native library which allows optimal performance in production env的主要内容,如果未能解决你的问题,请参考以下文章

解决:The APR based Apache Tomcat Native library which allows optimal performance in production...(示例代码

解决Tomcat启动时出现的The APR based Apache Tomcat Native library异常

The APR based Apache Tomcat Native library which allows optimal performance in production 问题的解决

IDEA搭建ssm框架测试衍生出的问题The APR based Apache Tomcat Native library which allows optimal performance in pr

The APR based Apache Tomcat Native library which allows optimal performance in production environmen

信息: The APR based Apache Tomcat Native library which allows optimal performance in production enviro