Skip to content

Instantly share code, notes, and snippets.

@canhnt
Last active December 31, 2015 14:21
Show Gist options
  • Save canhnt/e89d26cc7cc2a8b6b0bb to your computer and use it in GitHub Desktop.
Save canhnt/e89d26cc7cc2a8b6b0bb to your computer and use it in GitHub Desktop.
openshift-tomcat8-env
JAVA_HOME=$OPENSHIFT_DATA_DIR/bin/jre1.8.0_66
JAVA_ENDORSED_DIRS="$JAVA_HOME/endorsed"
CATALINA_HOME="$OPENSHIFT_DATA_DIR/bin/tomcat8/"
CATALINA_BASE="$OPENSHIFT_DATA_DIR/bin/tomcat8/"
CATALINA_PID="${CATALINA_BASE}/work/catalina.pid"
CLUSTER_ID="$(whoami)-$(hostname -f)"
MAX_HEAP=512
MIN_HEAP=256
REP_OPTS="-Drepo.bootstrap=false -Drepo.config=file:${CATALINA_BASE}/conf/repository.xml"
JVM_OPTS="-server -Xmx${MAX_HEAP}m -Xms${MIN_HEAP}m -XX:+UseG1GC -Djava.util.Arrays.useLegacyMergeSort=true"
DMP_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/opt/cms/heapdumps"
RMI_OPTS="-Djava.rmi.server.hostname=127.11.6.129"
JRC_OPTS="-Dorg.apache.jackrabbit.core.cluster.node_id=${CLUSTER_ID}"
L4J_OPTS="-Dlog4j.configuration=file:${CATALINA_BASE}/conf/log4j.xml"
CATALINA_OPTS="${JVM_OPTS} ${REP_OPTS} ${DMP_OPTS} ${RMI_OPTS} ${L4J_OPTS} ${JRC_OPTS}"
export JAVA_HOME CATALINA_OPTS CATALINA_PID CATALINA_HOME CATALINA_BASE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment