tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasputin <>
Subject Re: Basic questions
Date Mon, 13 Jan 2003 11:38:13 GMT
* <> [0115 21:15]:
> # run the following script
> #!/bin/sh
> JAVA_HOME=/usr/java
> TOMCAT_HOME=/usr/local/tomcat
> su - myuser -c "${TOMCAT_HOME}/bin/"

This is pretty much what I do, only I find it's generally better not
to set a CLASSPATH - tomcat sets up its own, I always found *un*setting
it led to less confusion in the long run.

The script above can also be used to start tomcat at boot time, since it safely
su's if run as root.

If you set the users home directory to whereever you installed
tomcat, and 'chown -R myuser' it, that usually sorts out permissions.

> a typical crontab entry
> 0 0 * * * cd /path/to/script ; ./ > /var/log/myout.dat
> which says run at midnight every day.

Only snags with that are:
a) it tries to start tomcat each time it runs, without checking if it's already
up. Probably a  non-issue.
b) it only runs every 24 hours! I'd whack that up to every 15 minutes, if there
are stability issues with it. Can't say I'd see this as necessary though - if
tomcat is crashing, that should be resolved, rather than this fix.

> There are probably more elegant ways to do this but that should get you 
> started.

Rasputin :: Jack of All Trades - Master of Nuns

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message