How to install tomcat in Linux???

Installing Tomcat from a binary release (tar file) requires manual creation of the Tomcat user account. This is not necessary if you install the Tomcat RPM package on a Linux system that supports RPMs.

For security reason I create a user account with no login shell for running tomcat server.

#groupadd tomcat
#useradd -g tomcat -s /usr/sbin/nologin -m -d /home/tomcat tomcat

Now I extracted tar file to /var/lib and change ownership of all files and directories to tomcat:

#cd /var/lib
#tar -zxvf apache-tomcat-6.0.28.tar.gz
#chown -R tomcat:tomcat apache-tomcat-6.0.28

Download latest version tomcat from http://tomcat.apache.org/download-60.cgi

Starting and Stopping tomcat:-

# export CATALINA_HOME=/var/lib/apache-tomcat-6.0.28
# export CATALINA_BASE=/var/lib/apache-tomcat-6.0.28

# su -p -s /bin/bash tomcat $CATALINA_HOME/bin/startup.sh
Using CATALINA_BASE: /var/lib/apache-tomcat-6.0.28
Using CATALINA_HOME: /var/lib/apache-tomcat-6.0.28
Using CATALINA_TMPDIR: /var/lib/apache-tomcat-6.0.28/temp
Using JRE_HOME: /usr/Java/jdk1.7.0
Using CLASSPATH: /var/lib/apache-tomcat-6.0.28/bin/bootstrap.jar

#su -p -s /bin/bash tomcat $CATALINA_HOME/bin/shutdown.sh
Using CATALINA_BASE: /var/lib/apache-tomcat-6.0.28
Using CATALINA_HOME: /var/lib/apache-tomcat-6.0.28
Using CATALINA_TMPDIR: /var/lib/apache-tomcat-6.0.28/temp
Using JRE_HOME: /usr/Java/jdk1.7.0
Using CLASSPATH: /var/lib/apache-tomcat-6.0.28/bin/bootstrap.jar

Comments

Post a Comment

Popular posts from this blog

Few tips for Linux User related to MAN page

SEND Mail Using JAVA Mail API