Notes on installing Tomcat on Linux

Published: Wednesday, 31 March 2004

Installation Notes

Logged in as root, I unpacked Tomcat into /usr/local/, then created a link from tomcat to the jakarta-tomcat-4.1.x directory.

As a normal user, to run your own Tomcat instance do the following:

  1. Choose a directory in your personal space to run your Tomcat instance. I chose /home/jurn/tomcat. Create this directory.

  2. Copy the following directories from the shared tomcat instance to your local directory.

$ cd /usr/local/tomcat
$ cp -R conf/ logs/ webapps/ work/ temp/ /home/jurn/tomcat/
  1. Setup the following environment variables:
  • CATALINA_HOME. This should be set to /usr/local/tomcat
  • CATALINA_BASE. This should be set to /home/jurn/tomcat
  • JAVA_HOME. This should be set to your favourite Java installation.
  • JAVA_OPTS. jvm opts

Running

You can now use /usr/local/tomcat/bin/startup.sh to start tomcat, and /usr/local/tomcat/bin/shutdown.sh to shutdown tomcat.

Tomcat Manager

Usually installed in /manager/html

You should edit conf/tomcat-users.xml before starting this. Make sure you add a user with the role manager.

Links