Pages

Monday, October 14, 2013

Installing Apache Portable Runtime (APR) For Tomcat

The Apache Portable Runtime (APR) is a supporting library for the Apache web server. It provides a set of APIs that map to the underlying operating system (OS). Where the OS doesn't support a particular function, APR will provide an emulation. Thus programmers can use the APR to make a program truly portable across platforms.

In this document we will see how we can install APR for Tomcat on a Linux Machine.

1. Install Apache APR from here
2. tar -xvf apr-1.5.0.tar.gz
 3. cd apr-1.5.0
 4. ./configure
 5. make
 6. make install

1. Install Tomcat Connectors from Here
2. tar -xvf tomcat-native-1.1.29-src.tar.gz 
3. cd  tomcat-native-1.1.29-src 
4. cd jni/
 5. cd native/
 6. ./configure --with-apr=/usr/local/apr(a dot before says to execute in current location)
 7.make
 8.make install
 9.export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
 10 cd /usr/local/apr/


Now we can go to /usr/local/apr to see that Runtime portable is installed.

Start the Tomcat and see the following message in Cataline.out file

Nov 21, 2013 4:42:53 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.29 using APR version 1.5.0.
Nov 21, 2013 4:42:53 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

More to Come. Happy learning