I. Introduction
APR: Apache Portable Run-time libraries, Apache Portable Runtime library. In earlier versions of Apache, the application itself must be able to deal with the specific details of the operating system platform and calling different handlers for different platforms. With the further development of the Apache, Apache decided to organize these generic functions independent and develop into a new project. Thus, APR development on independence out from Apache, Apache is only using the APR only.
Tomcat Native: This project allows the use of Apache Tomcat package to deal with the apr including file and network IO operations to improve performance.
II. you need to install the program
The latest version of apr
The latest version of the apr-util
tomcat-native.tar.gz
The first two can be downloaded from http://apr.apache.org/, the last one in the bin directory under tomcat.
III, the installation
1 install apr
The latest installer apr apr-1.5.2.tar.gz downloaded to any directory, such as / root / directory.
cd / root /
wget http://apr.apache.org/apr-1.5.2.tar.gz
tar zxvf apr-1.5.2.tar.gz
cd apr-1.5.2 /
./ configure --prefix = / usr / local / apr
make
make install
Note that the prefix parameter is used to specify the installation path.
2 installation apr-util
cd / root /
wget http://apr.apache.org/apr-util-1.5.4.tar.gz
tar zxvf apr-util-1.5.4.tar.gz
cd apr-util-1.5.4 /
./ configure --prefix = / usr / local / apr-util --with-apr = / usr / local / apr
make
make install
3 installation tomcat-native
The author of tomcat directory /usr/local/apache-tomcat-7.0.63
cd /usr/local/apache-tomcat-7.0.63/bin /
tar zxvf tomcat-native.tar.gz
cd tomcat-native-1.1.33-src / jni / native /
./ configure --with-apr = / usr / local / apr --with-java-home = / etc / alternatives / java_sdk_1.7.0
make
make install
IV. apr set environment variables
Add the following in the / etc / profile in
export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: / usr / local / apr / lib
Once saved so that profile to take effect
source / etc / profile
V. verify
cd /usr/local/apache-tomcat-7.0.63/bin /
./ catalina.sh run
In the vicinity of the 35th row to see if the log output following the installation was successful
INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.2 .
Jan 30, 2016 4:46:57 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true] . |