Skip to content

Instantly share code, notes, and snippets.

@we4tech
Forked from witscher/tomcat.conf
Last active August 29, 2015 13:58
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 we4tech/9931679 to your computer and use it in GitHub Desktop.
Save we4tech/9931679 to your computer and use it in GitHub Desktop.
Tomcat 7 configuration
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
limit nofile 32000 32000
console output
script
# adapt paths:
export JAVA_HOME=/usr
export CATALINA_HOME=/opt/apache-tomcat-7.0.53
# adapt java options to suit your needs:
export JAVA_OPTS="-Djava.awt.headless=true -Xms512M -Xmx2048M -server -XX:+UseParallelGC"
.$CATALINA_HOME/bin/setenv.sh
sudo -E -u ubuntu $CATALINA_HOME/bin/catalina.sh run
end script
# 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