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

启动tomcat问题日志:
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]

这是由于APR环境问题引起。解决方案如下:
安装编译工具:yum -y groupinstall Development tools 如果已安装忽略,./configure  make make install命令需要
安装apr openssl:yum -y install apr-devel openssl-devel
进入tomcat目录:cd $CATALINA_HOME/bin
解压native:tar -xvf tomcat-native.tar.gz

依次执行以下命令:
cd tomcat-native-1.2.21-src/native
./configure --with-apr=/usr/bin/apr-1-config --with-java-home=/soft/jdk1.8.0_144/ --with-ssl=yes --prefix=/soft/apache-tomcat-8.5.40/
make && make install

参数解释:
--with-apr  安装的apr文件的路径
--with-java-home jdk的路径
--with-ssl=yes 配置ssl,或者路径
--prefix=tomcat路径

参考文档:http://tomcat.apache.org/native-doc/

遇到问题:

1.checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
没有安装apr,就配置了路径

2.configure: error: C compiler cannot create executables
没有安装编译开发工具

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值