Jul 12, 2017
Fedora下为Tomcat编译安装APR
The Apache Tomcat Native Library is an optional component for use with Apache Tomcat that allows Tomcat to use certain native resources for performance, compatibility, etc.
Specifically, the Apache Tomcat Native Library gives Tomcat access to the Apache Portable Runtime (APR) library’s network connection (socket) implementation and random-number generator. See the Apache Tomcat documentation for more information on how to configure Tomcat to use the APR connector.
准备工作
解压位于tomcat/bin目录下的apr源码
tar xzf tomcat-native.tar.gz
下载编译安装所需的依赖
dnf install apr-devel openssl-devel
Ubuntu
apt-get install libapr1.0-dev libssl-dev
CentOS
yum install apr-devel openssl-devel
配置编译参数
在tomcat-native/native目录下执行
|
|
执行成功后make && make install
编译后的文件会放到$CATALINA_HOME/lib下
如果Tomcat启动时还是找不到APR的话,在bin/setenv.sh中添加
|
|