Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

3 Answers

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
add comment

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.

### BEGIN INIT INFO
# 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.
### END INIT INFO
share|improve this answer
add comment

There is no standard script provided. You will have to create you own. Here is what I usually start with: http://people.apache.org/~markt/dev/linux-etc-init.d-tomcat

share|improve this answer
add comment

Your Answer

 
discard

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.