CentOS安装Tomcat配置APR

下载

wgethttps://archive.apache.org/dist/tomcat/tomcat-7/v7.0.55/bin/apache-tomcat-7.0.55.tar.gz

解压

tar-zxvfapache-tomcat-7.0.55.tar.gz

安装APR

cd/home/web/apache-tomcat-7.0.55/bin

tar-zxvftomcat-native.tar.gz

cdtomcat-native-1.1.31-src/jni/native

yum-yinstallgcc

yum-yinstallapr-devel

./configure--with-apr=/usr/bin/apr-1-config--with-java-home=/usr/java/jdk1.8.0_161

make

makeinstall

配置APR

vi/etc/profile

增加exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib

source/etc/profile

cd/home/web/apache-tomcat-7.0.55/conf

viserver.xml

修改<Listenerclassname="org.apache.catalina.core.AprLifecycleListener"SSLEngine="off"/>

修改<Connectorport="8080"protocol="org.apache.coyote.http11.Http11AprProtocol"

JAVA_OPTS="$JAVA_OPTS-server-Xms35152m-Xmx35152m-XX:NewSize=512m-XX:MaxNewSize=512m-XX:+UseConcMarkSweepGC-XX:+UseParNewGC-XX:+CMSParallelRemarkEnabled"

相关推荐