-   Linux - Newbie (
-   -   How to set up tomcat 5 to boot at startup ? (

jorgepinho 11-15-2004 06:28 AM

How to set up tomcat 5 to boot at startup ?
Hi all

I am using Fedora Core 2 (I am very new at Linux)

I am trying to understand how to startup apps at OS startup.

when searching the net, I found a solution for the problem...

Create a new file:

with the lines:
export JAVA_HOME
export PATH

this works, but know.... everytime I open a console window, this file is executed.

So, Anyone can help me how to set up Tomcat as a Service-like (in Windows), so that it starts only with the OS ?

I found something about the jsvc tool, but nothing practical...

any help ?

thankx a lot ;)

huibert.alblas 11-15-2004 08:13 AM

Almost correct
the profile.d dir is apparently not the correct place,
as you report the Tomcat is started everytime you open a console.

The correct place for your script would be /etc/init.d

To work correctly your script should be able to handle start, stop and restart parameters correctly.
Look into the other scripts in this directory, the principle is really simple.

Then look in /etc/inittab for the entry


This is you default runlevel at boot, often 5 or 3.

do a cd /etc/rc3.d or /etc/rc5.d (defined by your default runlevel)
and add a symlink like this:

ln -s /etc/init.d/

Now, whenever your system boots, tomcat will be started automaticly.

There are some tools to handle this, but I think you should get to know the internals,
before you use these tools.

All times are GMT -5. The time now is 06:24 PM.