Skip to content

Instantly share code, notes, and snippets.

@4np
Created October 23, 2013 14:06
Show Gist options
  • Save 4np/7119419 to your computer and use it in GitHub Desktop.
Save 4np/7119419 to your computer and use it in GitHub Desktop.
LaunchDaemon for auto starting Apache Tomcat on Mac OS X. Make sure you set the 'user' and the 'JAVA_HOME' properly. To find out where JAVA_HOME is on your machine run '/usr/libexec/java_home -v 1.6' or '/usr/libexec/java_home -v 1.7'. Follow this guide to install Tomcat --> http://wolfpaulus.com/jounal/mac/tomcat7/
<?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">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.apache.tomcat</string>
<key>ServiceDescription</key>
<string>Tomcat Servlet/JSP Server</string>
<key>UserName</key>
<string>.....</string>
<key>GroupName</key>
<string>staff</string>
<key>EnvironmentVariables</key>
<dict>
<key>CATALINA_HOME</key>
<string>/Library/Tomcat</string>
<key>JAVA_HOME</key>
<string>/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home</string>
</dict>
<key>ProgramArguments</key>
<array>
<string>/Library/Tomcat/bin/catalina.sh</string>
<string>run</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment