Options
Tomcat μμ μ΅μ λ€μ΄ μλλ° μ΄μ λν λ΄μ©μ΄λ€.
startup.sh
μ΅μ’
μ μΌλ‘λ catalina.sh
μ€ν¬λ¦½νΈλ₯Ό νΈμΆνμ§λ§ μμμ μ¬μ©κ°λ₯ν μ νκ²½λ³μλ€μ΄ λμ¨λ€.
catalina.sh
CATALINA_HOME
- Catalina κ° λΉλλ λλ ν 리
- μ¬κΈ°μ λΉλλ λλ ν 리λ μ€μΉν ν λλ ν 리λ₯Ό λ§νκΈ°λ νλ€.
CATALINA_BASE
- Catalina μ€μΉμ λμ μμμ ν΄κ²°νκΈ° μν κΈ°λ³Έ λλ ν 리
- Multi Instance μ€μΉν λ μ΄ κ³΅κ°μ΄ μ¬μ©λλ€.
- λ³λλ‘ μ§μ νμ§ μμΌλ©΄
CATALINA_HOME
μ΄ μ¬μ©λλ€.
CATALINA_OUT
stdout
stderr
λ₯Ό μ΄λλ‘ λ³΄λΌκ²μΈμ§μ λν μ 체 κ²½λ‘λ₯Ό μ§μ - κΈ°λ³Έκ°μ
$CATALINA_BASE/logs/catalina.out
μ΄ λλ€.
CATALINA_TMPDIR
- JVM (Java Virtual Machine) μ΄ μ¬μ©ν μμλλ ν 리 (java.io.tmpdir) μμΉλ₯Ό μ§μ νλ€.
- κΈ°λ³Έκ°μ
$CATALINA_BASE/temp
μ΄ λλ€.
CATALINA_OPTS
start
run
debug
λͺ λ Ήμ΄ μ€νλ λ μ¬μ©λλ Java λ°νμ μ΅μ μ΄λ€.- JAVA_OPTS μ ν¬ν¨λλ μ΅μ μ΄ μλκ²μ΄ μ¬κΈ°μ ν¬ν¨λλ€.
- TOMCAT μ체μ μΌλ‘λ§ μ¬μ©λλ λ΄λΆ μ΅μ λ§ ν¬ν¨λλ©° μ€μ§ νλ‘μΈμ€ νΉμ λ²μ λͺ λ Ήλ±μΌλ‘ μ¬μ©ν΄μλ μλλ€.
## κΈ°λμμλ§ μ¬μ© ##
CATALINA_OPTS=" ${CATALINA_OPTS} -Xms2048m -Xmx2048m -XX:MaxPermSize=256m"
CATALINA_OPTS=" ${CATALINA_OPTS} -verbose:gc"
CATALINA_OPTS=" ${CATALINA_OPTS} -Xloggc:${CATALINA_BASE}/logs/gc_`date "+%Y%m%d%H"`.log"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+UseParallelGC"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+UseParallelOldGC"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+UseAdaptiveSizePolicy"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+PrintGCDetails"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+PrintGCTimeStamps"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+DisableExplicitGC"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:+HeapDumpOnOutOfMemoryError"
CATALINA_OPTS=" ${CATALINA_OPTS} -XX:HeapDumpPath=${CATALINA_BASE}/logs"
CATALINA_OPTS=" ${CATALINA_OPTS} -Djava.security.egd=file:/dev/./urandom"
JAVA_HOME
- JDK κ° μ€μΉλ μμΉ
- debug μΈμμ μ€νν λ νμνλ€.
JRE_HOME
- JRE λ₯Ό μ€μΉν μμΉ
- κΈ°λ³Έκ°μ
JAVA_HOME
μ΄λ©° λ³λ μ§μ μ΄ κ°λ₯νλ€.
JAVA_OPTS
- λͺ λ Ήμ΄ μ€νλ λ μ¬μ©λλ Java λ°νμ μ΅μ
CATALINA_OPTS
λͺ¨λ μ΅μ μ΄ μλκ²μ΄ μ¬κΈ°μ ν¬ν¨λλ€.- Tomcat μ μν΄μλ§ μ¬μ©λμ΄μ§λ©° μ€μ§ νλ‘μΈμ€ νΉμ λ²μ λͺ λ Ήμλ μ¬μ©λλ€.
- λλΆλΆμ μ΅μ
λ€μ
CATALINA_OPTS
μ μμ΄μΌ νλ€.
## μμ/μ€μ§μ λͺ¨λ μ¬μ© ##
JAVA_OPTS=" ${JAVA_OPTS} -server"
JAVA_OPTS=" ${JAVA_OPTS} -DjvmRoute=${JVM_ROUTE}"
JAVA_OPTS=" ${JAVA_OPTS} -Dport.http=${HTTP_PORT}"
JAVA_OPTS=" ${JAVA_OPTS} -Dport.https=${HTTPS_PORT}"
JAVA_OPTS=" ${JAVA_OPTS} -Dport.ajp=${AJP_PORT}"
JAVA_OPTS=" ${JAVA_OPTS} -Dport.shutdown=${SHUTDOWN_PORT}"
CATALINA_PID
- catalina μμ Java νλ‘μΈμ€μ PID λ₯Ό κ°μ§κ³ μλ νμΌ κ²½λ‘λ₯Ό μλ―Ένλ€.
LOGGING_CONFIG
- Tomcat λ‘κΉ μ€μ νμΌμ μ¬μ μνλ€.
LOGGING_CONFIG="-Djava.util.logging.config.file=$CATALINA_BASE/config/logging/properties"
LOGGING_MANAGER
- Tomcat λ‘κΉ λ§€λμ μ€μ μ μ¬μ μ νλ€.
LOGGING_MANAGER="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager";
β Tomcat