Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I "installed" tomcat on ubuntu by just unzipping it. Is there a standard script I can use for /etc/init.d/tomcat? Or do I need to create one?

Currently I have created one that works, but I didn't know if there was a more correct way to do this.

share|improve this question
up vote 2 down vote accepted

The package for Ubuntu editions is named either tomcat6 or tomcat7.

You can install tomcat, and the associated servers, scripts and such like so:

sudo apt-get install tomcat6

The tomcat6-user package contains a few examples on how to start user instances.

Also, I found a link for a how-to for an older version of Ubuntu, but is still relevant.

share|improve this answer

If you did not find such a file in the unzipped folder, you can either try to find one by looking on the web or create your own file.

As a general advice, you need to pay attention to the execution order of startup scripts which can affect the success/failure of related services. Startup scripts usually contains header like the following to determine the dependency on other services during startup.

# Provides:          tomcat6
# Required-Start:    $local_fs $remote_fs $network
# Required-Stop:     $local_fs $remote_fs $network
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start Tomcat.
# Description:       Start the Tomcat servlet engine.
share|improve this answer

There is no standard script provided. You will have to create you own. Here is what I usually start with:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.