Skip to content

Instantly share code, notes, and snippets.

@dantheman213
Created September 14, 2015 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dantheman213/f8cbb6a2d00b2766a2d6 to your computer and use it in GitHub Desktop.
Save dantheman213/f8cbb6a2d00b2766a2d6 to your computer and use it in GitHub Desktop.
Tomcat 8 upstart configuration file
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
setuid tomcat
setgid tomcat
env JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre
env CATALINA_HOME=/opt/tomcat
# Modify these options as needed
env JAVA_OPTS="-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom"
env CATALINA_OPTS="-Xms512M -Xmx1024M -server -XX:+UseParallelGC"
exec $CATALINA_HOME/bin/catalina.sh run
# cleanup temp directory after stop
post-stop script
rm -rf $CATALINA_HOME/temp/*
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment