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.
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.
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.
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
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