Install APR for Tomcat in the Linux environment

Source: Internet
Author: User

Install Apr

Get the latest APR installation package:

wget http://mirrors.hust.edu.cn/apache//apr/apr-1.5.2.tar.gz

Unpacking:

TAR-XZVF apr-1.5.2.tar.gz

To configure the installation path:

./configure--prefix=/opt/local/apr

Installation:

Make

Make install

----------------------------------

Installing Apr-util

Get the latest Apr-util

wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz

Unpack

TAR-XZVF apr-util-1.5.4.tar.gz

Configure the installation path, related parameters (note that the--WITH-APR parameter matches the path of the previously installed APR):

./ Configure--prefix=/opt/local/apr-util --WITH-APR=/OPT/LOCAL/APR

Installation:

Make

Make install

----------------------------------

Installing Tomcat-native

The installation package can be found directly in the Tomcat directory

Cd/opt/local/tomcat/bin

TAR-XZVF tomcat-native.tar.gz

CD tomcat-native-1.1.30-src/jni/native

./configure--WITH-APR=/OPT/LOCAL/APR--with-java-home=/opt/local/jdk7

Then install:

Make

Make install

----------------------------------

Installing OpenSSL with Yum

Yum Install openssl*

----------------------------------

Edit the/etc/profile file to add APR to the environment variable

Add the following line:

export ld_library_path= $LD _library_path:/opt/local/apr/lib

Note the path is not wrong, be sure to use the correct path you installed Apr

after you exit the save, remember to use the Source/etc/profile command to make the new environment variable effective

----------------------------------

to modify the JVM parameters of Tomcat, add:

-djava.library.path=/opt/local/apr/lib

Modify the Tomcat Server.xml file to change the connector type to:

Org.apache.coyote.http11.Http11AprProtocol

Restart Tomcat

See the log appears: Info:starting protocolhandler ["http-apr-8080"]

indicates that APR is enabled.

Install APR for Tomcat in the Linux environment

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.