Installing Tomcat Debian

Ensure that you have Java installed first, read my previous Blog to give you the instructions just in case you don’t have Java and JAVA_HOME must be set.

Download Tomcat and unzip in the normal way.


gzip -d xxxxxxx

tar xvf xxxxxxx

Once unpackaged then copy or move to the /opt

mv apache-tomcat-6.0.29 /opt/tomcat

Create the startup file tomcat and add the lines below

vi /etc/init.d/tomcat

# Tomcat Init-Script
case $1 in
sh /opt/tomcat/bin/
sh /opt/tomcat/bin/
sh /opt/tomcat/bin/
sh /opt/tomcat/bin/
exit 0

Issue the command so tomcat start on boot

update-rc.d tomcat defaults

If you want run the web admin then a ser need to be setup

vi /opt/tomcat/conf/tomcat-users.xml

<role rolename=”manager”/>
<role rolename=”admin”/>
<user username=”YOUR_USERNAME” password=”YOUR_PASSWORD” roles=”admin,manager”/>

Tomcat starts on port 8080, if you have something already running on this then

vi /opt/tomcat/conf/server.xml

and change the lines to read
<Connector executor=”tomcatThreadPool”
port=”8181″ protocol=”HTTP/1.1″
redirectPort=”8443″ />

In this example i have chosen 8181


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s