Tomcat Installation Reference

Tomcat Installation Reference
Download tar file: wget http://www-us.apache.org/dist/tomcat/tomcat-7/v7.0.82/bin/apache-tomcat-7.0.82.tar.gz

copy tar to folder optional softwares location

tar zvfx .tar.gz

User permissions
In case of Mifos installation need to follow the step here before starting the server.
 * groupadd tomcat
 * useradd -r -g tomcat tomcat
 * cd tomcat
 * chown -R tomcat.
 * chgrp -R tomcat.

Opening tomcat port
Refer here for more info.
 * 1) sudo ufw allow port_number
 * 2) sudo ufw enable

In case of using IP Tables command
 * sudo iptables -nvL
 * sudo iptables
 * netstat
 * netstat -l
 * sockstat -l
 * netstat -lntu
 * sudo iptables -A INPUT -p tcp --dport  -j ACCEPT
 * sudo iptables -A INPUT -p tcp --dport  -j ACCEPT

Error Note
In case of errors on shared object:

Set the path to the .so files in the lib folder


 * 1) set path to system so library files

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib/:/usr/lib/

In case of library errors for the below given libraries

sudo apt-get install libxrender1 libxtst6 libxi6

(apt-get install libxrender1:i386 libxtst6:i386 libxi6:i386)

Production Server Settings
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib

To fix the above error follow the steps [|here].

In summary run the below command:"apt-get install libapr1-dev libssl-dev"In case libapr library is not found can search for it by using the command: sudo apt-cache search libapr