tomcat apr配置
下载安装包
wget http://mirrors.cnnic.cn/apache//apr/apr-1.5.2.tar.gz
wget http://mirrors.cnnic.cn/apache//apr/apr-util-1.5.4.tar.gz
wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-connectors/native/1.1.33/source/tomcat-native-1.1.33-src.tar.gz
第一步:
tar -zxvf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/home/xx/apr
make
make install
第二步:
tar -zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --with-apr=/home/xm_portal/apr --prefix=/home/xm_portal/apr-util
make
make install
第三步:
tar -zxvf tomcat-native-1.1.33-src.tar.gz
cd tomcat-native-1.1.33-src/jni/native
./configure --with-apr=/home/xm_portal/apr --prefix=/home/xx/tomcat-native
make
make install
第四步:修改tomcat bin目录catalina.sh
增加
JAVA_OPTS="$JAVA_OPTS -Djava.library.path=/home/xx/tomcat-native/lib"
第五步:修改tomcat bin目录 conf/server.xml
<Connector port="8201" protocol="HTTP/1.1"
connectionTimeout="20000"
URIEncoding="UTF-8"
maxPostSize="20971520"
redirectPort="8108"
minSpareThreads="100" maxConnections="8192" asyncTimeout="10000" maxThreads="1000" maxHttpHeaderSize="8192" acceptorThreadCount="2" acceptCount="1000"
/>
各属性,查tomcat官方文档 。
maxConnections:最大并发连接数。maxThreads:最大线程数