Last active
August 29, 2015 14:19
-
-
Save edwardbeckett/920722f47d12ac3948bf to your computer and use it in GitHub Desktop.
Tomcat SetEnviroment Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Edit this file to set custom options | |
# | |
# Notes: | |
# | |
# * Tomcat accepts the JAVA_OPTS and CATALINA_OPTS parameters | |
# * JAVA_OPTS are used during START/STOP/RUN | |
# Edit this file to set custom options | |
# Edit this file to set custom options | |
# | |
# Notes: | |
# | |
# * Tomcat accepts the JAVA_OPTS and CATALINA_OPTS parameters | |
# * JAVA_OPTS are used during START/STOP/RUN | |
# * CATALINA_OPTS are used during START/RUN | |
# * This script is sourced by catalina.sh when it placed inside | |
# * $CATALINA_BASE/bin (instance specify setup) or $CATALINA_HOME/bin directories. | |
# ------------------------------------------------------------ | |
JAVA_HOME="/usr/local/jdk" | |
CATALINA_HOME="/opt/tomcat" | |
CATALINA_BASE="/opt/tomcat/tomcat_1" | |
CATALINA_PID="$CATALINA_BASE/temp/tomcat_1.pid" | |
################################# | |
# *** JAVA OPTIONS SETTINGS *** # | |
################################# | |
JVM_MODE="-server" | |
HEADLESS_MODE="-Djava.awt.headless=true" | |
BIT_MODE="-d64" | |
HEAP_OPTS="-Xms128m -Xmx768m" | |
GC_OPTS="-XX:+AlwaysPreTouch -XX:+AggressiveOpts -XX:+UseG1GC -XX:ReservedCodeCacheSize=256m -XX:+UseCompressedOops -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djsse.enableSNIExtension=false -XX:SoftRefLRUPolicyMSPerMB=50" | |
# | |
# Example: | |
# conf/jmxremote.access | |
# john readwrite | |
# conf/jmxremote.password | |
# john johnpasswd | |
# Make sure both jmxremote.{access,passsword} files only readable/writeable (600) by the owner, and | |
# jxmremote.port must be unique for each server instances. | |
# | |
#JMXREMOTE_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false | |
#-Dcom.sun.management.jmxremote.authenticate=true -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.password.file | |
#=$CATALINA_BASE/conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=$CATALINA_BASE/conf/jmxremote.access" | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib | |
JAVA_OPTS="$JVM_MODE $HEADLESS_MODE $BIT_MODE $HEAP_OPTS $GC_OPTS" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment