CentOS Install, configure APR and tomcat-native

Source: Internet
Author: User
Tags gz file openssl library apache tomcat





APR:Apache Portable run-time Libraries,apache Portable Runtime Library
In earlier versions of Apache, the application itself must be able to handle the details of a variety of specific operating system platforms and invoke different processing functions for different platforms. With the further development of Apache, the Apache organization decided to separate and develop these universal functions into a new project. In this way, the development of APR is isolated from Apache, and Apache uses only Apr.
Tomcat Native:This project allows Tomcat to use Apache's APR package to handle including file and network IO operations to improve performance.
Website Introduction:The Apache Tomcat Native Library is a optional component for use with Apache Tomcat This allows Tomcat to use certain NAT Ive resources for performance, compatibility, etc. (presumably it means Tomcat can use some native resources to improve performance and compatibility.) )
Specifically, the Apache Tomcat Native Library gives Tomcat access to the Apache portable Runtime (APR) library ' s network Connection (socket) implementation and Random-number generator. (Specifically, the network connection implementation and the random number generator in the APR library are utilized.) )


Features of the APR connector:


    • non-blocking I/O for keep-alive requests (between requests)
    • Uses OpenSSL for TLS/SSL capabilities (if supported by linked APR library)
    • FIPS 140-2 support for TLS/SSL (if supported by linked OpenSSL library)

under Linux, Tomcat requires three components to enable APR:
    • Apr
    • Apr-util
    • Tomcat-native.tar.gz (Tomcat comes with, in the bin directory)
1. See if Apr and Apr-util are installed# Rpm-qa Aprapr-1.4.8-3.el7.x86_64
# Rpm-qa Apr-utilapr-util-1.5.2-6.el7.x86_64
2. Check if you have the latest version of Apr and Apr-util# Yum List |                         grep aprapr.x86_64 1.4.8-3.el7 @anacondaapr-util.x86_64 1.5.2-6.el7 @anaconda
3. If not installed, install with Yum:# yum Install apr-devel Apr apr-util

4, installation tomcat-native:Search Tomcat-native Install package: # Yum List | grep tomcat-native
If it already exists, install it directly: # Yum install tomcat-native ... Installing: Tomcat-native-1.1.30-1.el7.x86_64 1/1 in verification: tomcat-native-1.1.30-1.el7.x86_64 1/1
Installed: tomcat-native.x86_64 0:1.1.30-1.EL7 Complete!
To see if the installation was successful: # RPM-QA tomcat-nativetomcat-native-1.1.30-1.el7.x86_64
Configure related global variables: # vi/etc/profile add: Export ld_library_path= $LD _library_path:/usr/local/apr/lib# source/etc/profile
5. Restart Tomcat to see if you can successfully use AprIf everything works:Apr Start:[main] Org.apache.coyote.AbstractProtocol.start starting Protocolhandler ["http-Apr-18080 "][Main] Org.apache.catalina.startup.Catalina.start Server startup in 13617 MsFaster than the start of the NIO mode (~15%):NiO Startup:[main] Org.apache.coyote.AbstractProtocol.start starting Protocolhandler ["http-NiO-18080 "][main] Org.apache.catalina.startup.Catalina.start Server startup in 15671 Ms
If an exception log is found, for example:06-AUG-2015 14:46:04.949 SEVERE [main] org.apache.catalina.core.AprLifecycleListener.init an incompatible version 1.1.30 of the APR based Apache Tomcat Native Library is installedMCAT requires version 1.1.32
Indicates that the system comes with a tomcat-native version that is too low. Delete: # Yum Erase tomcat-native
check with Yum for the latest version:# Yum Update tomcat-native if Yum cannot find the latest version, thenDownload or unzip the installation from the Tomcat/bin.
From the Tomcat/bin directory, unzip the tomcat-native.tar.gz file:
# TAR-ZXVF tomcat-native.tar.gz
Get folder: Tomcat-native-1.1.33-src# CD tomcat-native-1.1.33-src/jni/native/#./configure--WITH-APR=/USR/LOCAL/APR (the other parameters in the official website are not required, will be automatically found)# Make && make install
Reference:Installation Guide of official website: http://tomcat.apache.org/native-doc/Tomcat connector comparison and optimization of three operating modes (BIO, NIO, APR): http://blog.csdn.net/clementad/article/details/47045673





(Original article, reprint please specify the blog from Clement-xu)



Copyright NOTICE: This article is the original article, reprint please indicate the CSDN blog which is transferred from Clement-xu.



CentOS installation, configuring Apr and Tomcat-native


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.