首页 > 代码库 > tomcat(apr)模式

tomcat(apr)模式

1、首先安装TOMCAT与JDK

2、下载APR所需要用的安装包

apr-1.5.2.tar.gz,apr-iconv-1.2.1.tar.gz,apr-util-1.5.4.tar.gz

4、安装gcc

yum install gcc -y

5、解压安装

tar zxvf /root/apr-1.5.2.tar.gz -C /usr/local/  

cd /usr/local/apr-1.5.2

./configure  &&make  && make install


tar zxvf /root/apr-iconv-1.2.1.tar.gz -C /usr/local/

cd /usr/local/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 -C /usr/local/

cd /usr/local/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


cd /tomcat/bin  找你到tomcat服务的bin目录

tar zxvf tomcat-native.tar.gz

cd tomcat-native-1.1.31-src/jni/native/

./configure --with-apr=/usr/local/apr --with-java-home=/jdk &&make &&make install


6、

vi /etc/profile  

# 后面添加以下内容  

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib  

# 使profile生效  

source /etc/profile


7、重启tomcat,查看catalina.out日志

出现

2016-10-21 14:46:17 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["http-apr-8080"]

2016-10-21 14:46:17 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["ajp-apr-8009"]

2016-10-21 14:46:17 org.apache.catalina.startup.Catalina start

信息: Server startup in 17502 ms


tomcat的APR模式搭建成功!!!!!!!!!!!!!










tomcat(apr)模式