Archive

Posts Tagged ‘Apache Tomcat’

CentOS Tomcat install quick guide

March 20th, 2012

Prerequisite: Java/JDK has been installed.

Download your preferred Tomcat version from http://tomcat.apache.org/

The mapping between the specifications and the respective Apache Tomcat versions is:

Servlet/JSP Spec Apache Tomcat version Actual release revision Minimum Java Version
3.0/2.2 7.0.x 7.0.26 1.6
2.5/2.1 6.0.x 6.0.35 1.5
2.4/2.0 5.5.x 5.5.35 1.4
2.3/1.2 4.1.x (archived) 4.1.40 (archived) 1.3
2.2/1.1 3.3.x (archived) 3.3.2 (archived) 1.1

Extract the gzip file

gunzip apache-tomcat-<version>.tar.gz

and then untar it to your preferred location

tar xvf apache-tomcat-<version>.tar

Set service

Credits to Satollo.net: Look for the tomcat service script here.

The file needed to be copied in /etc/init.d, and then

chown root:root /etc/init.d/tomcat

chmod a+x /etc/init.d/tomcat

To install the script for various runlevels, run

/sbin/chkconfig –add tomcat

it will be marked as “on” for runlevel 3, 4, 5 . To see the configuration of all services, you can run

/sbin/chkconfig –list

To start and stop Tomcat:

/etc/init.d/tomcat start

/etc/init.d/tomcat stop

To make a shortcut  or soft link:

ln -s apache-tomcat-5.5 tomcat

Software, Technology , ,