-
openssl必须是1.0.2
有一个问题需要特别注意,本机的openssl千万不要删掉,不然ssh会无法登陆,更严重的很多服务都依赖openssl
2.apr,apr-util,apr-util
3.编译参数
cd /opt/tomcat/bin
tar xvzf tomcat-native.tar.gz
cd tomcat-native-1.2.5-src
./configure --prefix=/usr --with-apr=/usr/local/apr --with-java-home=/usr/java/jdk --with-ssl=/usr/local/ssl
这样apr和usr的lib目录会出现
-rw-r--r-- 1 root root 1810848 6月 3 2016 libtcnative-1.a
-rwxr-xr-x 1 root root 1052 6月 3 2016 libtcnative-1.la
lrwxrwxrwx 1 root root 22 6月 3 2016 libtcnative-1.so -> libtcnative-1.so.0.2.5
lrwxrwxrwx 1 root root 22 6月 3 2016 libtcnative-1.so.0 -> libtcnative-1.so.0.2.5
-rwxr-xr-x 1 root root 1031071 6月 3 2016 libtcnative-1.so.0.2.5
4.tomcat server.xml设置
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8080" protocol="org.apache.coyote.http11.Http11AprProtocol"
URIEncoding="UTF-8"
minSpareThreads="25"
maxSpareThreads="75"
enableLookups="false"
disableUploadTimeout="true"
connectionTimeout="20000"
acceptCount="300"
maxThreads="300"
maxProcessors="1000"
minProcessors="5"
useURIValidationHack="false"
redirectPort="8443" />
<!-- <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" /> -->
5.启动tomcat
INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.5 using APR version 1.5.2.
[main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
6.自己可以登陆manager页面验证
本文转自 liqius 51CTO博客,原文链接:http://blog.51cto.com/szgb17/1785663,如需转载请自行联系原作者