This is for installing tomcat as a daemon on port 8080 but enable also port 80 by using a firewall redirection. It was tested on Mac OS 10.6 but should work also with 10.5.
/opt/local/share/java/tomcat6/conf/server.xml and add
proxyport="80" URIEncoding="UTF-8" inside
For forwarding port 80 to 8080 run this line and add it do
sudo ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in
Assign enough memory to the Java machine or you may be in trouble later.
export JAVA_OPTS="-Xmx3000M -Xms3000M -Djava.awt.headless=true -Duser.timezone=UTC"
In my example I allocated ~3Gb or RAM but you can adapt this, anyway don't put less than 1GB if you are running
hudson inside tomcat.
Running as a service
nano /Library/LaunchDaemons/org.apache.tomcat.plist and paste the code below:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
Check that launchd detected you new daemon, if not reboot :(
launchctl list|grep tomcat
Start tomcat manually.
launchctl start org.apache.tomcat
If the status is something else than
-, you have a problem and you should investigate it:
launchctl log level debug and check