The Apache Tomcat Native Library is an optional component for use with Apache Tomcat that allows Tomcat to use certain native resources for performance, compatibility, etc.
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.
Summary
=============
1) Download Softwares APR library, OpenSSL libraries & Tomcat Native Library
2) Install APR library
3) Install OpenSSL libraries
4) Install Tomcat Native Library
5) Add the Libraries Path to tomcat CLASSPATH
6) Restart Tomcat Server & Validate Libraries Loaded or Not at Run time.
Steps:
=====
1) Download Softwares APR library, OpenSSL libraries & Tomcat Native Library
Use Below links for downloading software's
Tomcat Native Libraries ==> http://www-eu.apache.org/dist/tomcat/tomcat-connectors/native/1.2.10/source/tomcat-native-1.2.10-src.tar.gz
Copy all setup files to remote machine using WinSCP
2) Install APR library
Extract the file apr-1.5.2.tar.gz using below command.
tar -zxvf apr-1.5.2.tar.gz
cd /home/tomcat/native/apr-1.5.2
./configure
--prefix= /home/tomcat/native/apr
make
make
install
/home/tomcat/native/apr/bin/apr-1-config
3) Install OpenSSL libraries
Extract the file openssl-1.0.2j.tar.gz using below command.
tar -zxvf openssl-1.0.2j.tar.gz
cd /home/tomcat/native/openssl-1.0.2j
./config
--prefix=/home/tomcat/native/openssl -fPIC
make
make
install
Extract the file tomcat-native-1.2.10-src.tar.gz using below command.
tar -zxvf tomcat-native-1.2.10-src.tar.gz
Use below commands for installation
cd /home/tomcat/native/tomcat-native-1.2.10-src/native
./configure --with-apr=/home/tomcat/native/apr/bin/apr-1-config --with-java-home=/home/tomcat/java/jdk1.8.0_112 --with-ssl=/home/tomcat/native/openssl --prefix=/home/tomcat/instance1/apache-tomcat-8.5.9
make
make install
Output
=============
--------------------------------------------------------------------
Libraries have been installed in:
/home/tomcat/instance1/apache-tomcat-8.5.9/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
--------------------------------------------------------------------
cd /home/tomcat/instance1/apache-tomcat-8.5.9/bin
vi setenv.sh
-Djava.library.path=/home/tomcat/instance1/apache-tomcat-8.5.9/lib
6) Restart Tomcat Server & Validate Libraries Loaded or Not at Run time.
cd /home/tomcat/instance1/apache-tomcat-8.5.9/bin
./shutdown.sh
./startup.sh
cd /home/tomcat/instance1/apache-tomcat-8.5.9/logs
vi catalina.out
22-Dec-2016 20:28:27.801 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.10 using APR version 1.5.2.
No comments:
Post a Comment