Running Tomcat

Creating a Tomcat instance

To set up a Tomcat instance, run /usr/bin/tomcat8-instance-create dirname.

This will create the directory you name, and create a fresh Tomcat instance inside it.

You will have to configure the instance yourself to get it to do what you want.

You can run the server on a lab machine while you're logged into it.

Using the local Tomcat installation

First up, edit your .profile (and any startup scripts you may use) to set the CATALINA_BASE and CATALINA_HOME environment variables:

export CATALINA_HOME=/usr/share/tomcat8 export CATALINA_BASE=dirname

where dirname is the full path to the tomcat instance you created.

You may need to run source .profile to pick up the changes in your shell (or just log out and in again).

Running Tomcat on a lab machine

  • To start Tomcat, run $CATALINA_HOME/bin/startup.sh
  • You should then be able to access the page from within the CSE network.
  • The URL will be http://hostname:8080/ (eg. http://sitar02:8080/).
  • To stop Tomcat, run $CATALINA_HOME/bin/shutdown.sh.
Last edited by jbc 04/10/2019