The APR based Apache Tomcat Native library which allows optimal performance in production ...解决方案
在安装好jdk与tomcat之后,会在tomcat启动log信息里提示:
27-Aug-2018 08:59:49.191 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent 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]
tar.gz版本的tomcat不会安装好apr,需要单独编译安装。
去这里下载
丢到服务器上面去
解压,安装
tar -zxvf apr-1.6.3.tar.gz
./configure && make && make install
去tomcat的bin目录下,解压tomcat-native.tar.gz
tar -zxvf tomcat-native.tar.gz
去刚才解压好的目录下的native中
cd apache-tomcat-8.5.33/bin/tomcat-native-1.2.17-src/native/
./configure --with-apr=/usr/local/apr --with-java-home=$JAVA_HOME
make && make install
修改环境变量
vim /etc/profile
在最后增加
export LD_LIBRARY_PATH=/usr/local/apr/lib
source /etc/profile