views:

162

answers:

3

How do I install Tomcat as a daemon on OS X? It should run even when a user is not logged on.

I could probably survive installing Tomcat for a single users and having it run at log in, for now. But long term I need it installed and running as a service on boot.

+2  A: 

You could write your own LaunchDaemon script for it.

Launch Services can be used to set up user or system-based startup.

Matthew Schinckel
fantastic. I found complete instructions for this at http://publicobject.com/2005/05/launchd-tomcat.html
Stu Thompson
+2  A: 

See Updated for 2009 at the bottom of the page for details on what is needed

objects
A: 

What Matthew and Objects said, but remember if you are integrating with launchd, the script should not fork. See Daemon Requirements

unhillbilly
Thanks for the link, but that statement is incorrect. "You must not fork your process **and have the parent process exit**." One can fork, but there are expected behaviors when doing so--parent does not exit, and must not daemonize itself.
Stu Thompson
Thank you for the correction; my statement was incomplete.
unhillbilly