Installing Apache Tomcat Native on Linux Ubuntu

05-09-2015

1. Apache Tomcat native library needs APR package, so we must install before Tomcat

Install the APR package (Downloaded from http://apr.apache.org/)

tar -xzf apr-1.4.6.tar.gz
cd apr-1.4.6/
sudo ./configure
sudo make
sudo make install

2. Download Tomcat binary from Tomcat 7.0.64

3. Extract tar file and move to /opt/ folder:

tar -xvzf apache-tomcat-7.0.64.tar.gz
sudo mv apache-tomcat-7.0.64 /opt/

4. Extract tomcat-native.tar.gz in /opt/apache-tomcat-7.0.64/bin folder:

tar -xvzf tomcat-native.tar.gz

5. Go to native folder:

cd tomcat-native-1.1.33-src/jni/native

6. Run following command

./configure && make && make install --with-apr=/usr/local/apr

After running this command, it tries to automatically find JAVA_HOME directory. If not specified you get an error. If you want to specify JAVA_HOME directory location run following command instead of above:

JAVA_HOME=/usr/lib/jvm/jdk1.7.0_21/
./configure && make && make install --with-apr=/usr/local/apr --with-java-home=$JAVA_HOME

After these steps, Tomcat native library will be installed.

© 2019 All rights reserved. Codesenior.COM