Tomcat 8 supports APR
1. openssl must be 1.0.2
Pay special attention to one problem. Do not delete the openssl of the Local Machine. Otherwise, ssh will not be able to log on. More serious services depend on openssl.
2. apr, apr-util, apr-util
3. Compile Parameters
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
In this way, the lib directory of apr and usr will appear
-Rw-r -- 1 root 1810848 June 3 2016 libtcnative-1.a
-Rwxr-xr-x 1 root 1052 June 3 2016 libtcnative-1.la
Lrwxrwxrwx 1 root 22 June 3 2016 libtcnative-1.so-> libtcnative-1.so.0.2.5
Lrwxrwxrwx 1 root 22 June 3 2016 libtcnative-1.so.0-> libtcnative-1.so.0.2.5
-Rwxr-xr-x 1 root 1031071 June 3 2016 libtcnative-1.so.0.2.5
4. tomcat server. xml settings
<! --
<Connector executor = "tomcatThreadPool"
Port = "8080" protocol = "HTTP/1.1"
ConnectionTimeout = "20000"
RedirectPort = "8443" type = "regxph" text = "yourobjectname"/>
<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" type = "regxph" text = "yourobjectname"/>
<! -- <Connector port = "8009" protocol = "AJP/1.3" redirectPort = "8443"/> -->
5. start 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. log on to the manager page for verification.
For more Tomcat tutorials, see the following:
Install and configure the Tomcat environment in CentOS 6.6
Install JDK + Tomcat in RedHat Linux 5.5 and deploy Java Projects
Tomcat authoritative guide (second edition) (Chinese/English hd pdf + bookmarks)
Tomcat Security Configuration and Performance Optimization
How to Use Xshell to view Tomcat real-time logs with Chinese garbled characters in Linux
Install JDK and Tomcat in CentOS 64-bit and set the Tomcat Startup Procedure
Install Tomcat in CentOS 6.5
Tomcat details: click here
Tomcat: click here
This article permanently updates the link address: