tomcat7优化io模式为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://mirrors.cnnic.cn/apache//apr/apr-iconv-1.2.1.tar.gz
tar -zxvf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make
make install
tar -zxvf apr-iconv-1.2.1.tar.gz
cd apr-iconv-1.2.1
./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr
make
make install
tar -zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
make
make install
转到tomcat7所在目录,进入bin
tar -zxvf tomcat-native.tar.gz
cd tomcat-native-1.1.32-src/
cd jni/native
./configure --with-apr=/usr/local/apr --with-java-home=/webservers/jdk7
make
make install
vi /etc/profile
增加:
export LD_LIBRARY_PATH=/usr/local/apr/lib
保存后source /etc/profile
修改 /etc/init.d/tomcat7ad
在jsvc的启动参数中增加:-Djava.library.path=/usr/local/apr/lib
- Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster(2018-08-23)
- 从头开始配置一台tomcat+nginx环境的阿里云ecs(2016-01-12)
- java及tomcat使用http正向代理的几种方法(2015-03-08)
- 使用阿里云OCS来存储tomcat的session实现tomcat多机负载均衡(2015-01-04)
- linux下tomcat7的安装及服务配置(2014-10-04)