内容纲要
tomcat 9.x
- setenv.sh
# Tomcat JVM options
export CATALINA_OPTS="$CATALINA_OPTS -server"
export CATALINA_OPTS="$CATALINA_OPTS -XX:+UseG1GC"
export CATALINA_OPTS="$CATALINA_OPTS -Xss1m"
export CATALINA_OPTS="$CATALINA_OPTS -Xmx6g"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MetaspaceSize=224m"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxMetaspaceSize=224m"
export CATALINA_OPTS="$CATALINA_OPTS -XX:MaxGCPauseMillis=20"
export CATALINA_OPTS="$CATALINA_OPTS -XX:InitiatingHeapOccupancyPercent=35"
export CATALINA_OPTS="$CATALINA_OPTS -XX:-UseBiasedLocking"
export CATALINA_OPTS="$CATALINA_OPTS -XX:+PerfDisableSharedMem"
export CATALINA_OPTS="$CATALINA_OPTS -XX:AutoBoxCacheMax=20000"
export CATALINA_OPTS="$CATALINA_OPTS -Djava.awt.headless=true"
export CATALINA_OPTS="$CATALINA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
export CATALINA_OPTS="$CATALINA_OPTS -XX:HeapDumpPath=/usr/local/appsoft/logs/phoenix-api/jvmdebug/dump"
export CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=/usr/local/apr/lib"
export CATALINA_OPTS="$CATALINA_OPTS -Dapi.server.port=8181"
# 开发远程调试配置
export CATALINA_OPTS="$CATALINA_OPTS -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7181"
# SkyWalking
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/usr/local/appsoft/skywalking-apm-agent/skywalking-agent.jar"
export CATALINA_OPTS="$CATALINA_OPTS -DSW_AGENT_NAME=phoenix-api"
# zabbix监控
#export CATALINA_OPTS="$CATALINA_OPTS -Djava.rmi.server.hostname=172.31.200.208"
#export CATALINA_OPTS="$CATALINA_OPTS -Djavax.management.builder.initial="
#export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote=true"
#export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.port=12101"
#export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
#export CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"