.Stone G
{톰캣: T o m c a t }
리스너 
자바옵션 
클래스로더 
setenv? 
web.xml 
로그 
CHAPTER #4 
TOMCAT 
환 경 설 정
LISTENER
Listener
Listener
Listener 
Listener 0101110 
8080
Listener 
http://tomcat.gm.com:80 
https://tomcat.gm.com:443
…생략… 
7월 15, 2014 5:46:18 오후 org.apache.coyote.AbstractProtocol start 
정보: Starting ProtocolHandler ["http-bio-8080"] 
7월 15, 2014 5:46:18 오후 org.apache.coyote.AbstractProtocol start 
정보: Starting ProtocolHandler ["ajp-bio-8009"] 
7월 15, 2014 5:46:18 오후 org.apache.catalina.startup.Catalina start 
정보: Server startup in 1002 ms 
Listener
Listener
JAVA OPTIONS
APPLICATIONS 
APPLICATIONS 
APPLICATIONS 
APPLICATIONS 
Java Options 
J V M 
L I N U X 
J V M J V M 
W I N D O W S U N I X 
APPLICATIONS 
APPLICATIONS
APPLICATIONS 
Java Options
-XX:+DisableExplicyGC 
-server 
-Xms 
-Xint -Xmx 
-XX:PermSize 
-XX:+Agressive 
-XX:+HeapdumpOnOutOfMemory 
-XX:MaxNewSize 
-verbosegc 
Java Options
CLASSLOADER
$ java HelloWorld 
ClassLoader
ClassLoader 
ClassLoader 
Class:Class :Class:Class :Class
ClassLoader 
Class 
Path 
Class:Class :Class:Class :Class
-Xbootclasspath/p:HelloWorld 
-Xbootclasspath/a:HelloWorld 
BOOTCLASSPATH : EXTENSIONSCLASSPATH : CLASSPATH 
ClassLoader 
CLASSPATH=HelloWorld 
CLASSPATH=${CLASSPATH}:HelloWorld 
CLASSPATH=HelloWorld:${CLASSPATH}
setenv?
setenv? 
Script 
PATH 
Script 
Chapter #03. 설치
setenv? 
WINDOWS 
SERVICE
setenv? 
Catalina.sh? ?
# ----------------------------------------------------------------------------- 
# Control Script for the CATALINA Server 
# 
# Environment Variable Prerequisites 
# 
# Do not set the variables in this script. Instead put them into a script 
# setenv.sh in CATALINA_BASE/bin to keep your customizations separate. 
# 
# CATALINA_HOME May point at your Catalina "build" directory. 
# 
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions 
# of a Catalina installation. If not present, resolves to 
# the same directory that CATALINA_HOME points to. 
# 
# CATALINA_OUT (Optional) Full path to a file where stdout and stderr 
# will be redirected. 
# Default is $CATALINA_BASE/logs/catalina.out 
# 
# CATALINA_OPTS (Optional) Java runtime options used when the "start", 
# "run" or "debug" command is executed. 
# Include here and not in JAVA_OPTS all options, that should 
# only be used by Tomcat itself, not by the stop process, 
# the version command etc. 
setenv?
# Ensure that any user defined CLASSPATH variables 
are not used on startup, 
# but allow them to be specified in setenv.sh, in 
rare case when it is needed. 
CLASSPATH= 
! 
if [ -r "$CATALINA_BASE/bin/setenv.sh" ]; then 
. "$CATALINA_BASE/bin/setenv.sh" 
elif [ -r "$CATALINA_HOME/bin/setenv.sh" ]; then 
. "$CATALINA_HOME/bin/setenv.sh" 
fi 
setenv?
ex)setenv.sh 
JAVA_OPTS="-DMy_Tomcat -Xms512m -Xmx512m -verbosegc" 
setenv?
setenv? 
JAVA_OPTS
setenv? 
CLASSPATH
CATALINA_HOME 
setenv?
CATALINA_BASE 
setenv?
CATALINA_OUT 
setenv?
CATALINA_OPTS 
setenv?
setenv? 
setenv.sh
web.xml
web.xml 
conf/web.xml 
WEB-INF/web.xml
<servlet> 
<servlet-name>invoker</servlet-name> 
<servlet-class> 
org.apache.catalina.servlets.InvokerServlet 
</servlet-class> 
<init-param> 
<param-name>debug</param-name> 
<param-value>0</param-value> 
</init-param> 
<load-on-startup>2</load-on-startup> 
</servlet> 
! 
<servlet-mapping> 
<servlet-name>invoker</servlet-name> 
<url-pattern>/servlet/*</url-pattern>! 
</servlet-mapping> 
web.xml 
5.5 이하
web.xml
LOG
Log
catalina.out 
access.log 
*.log 
Log 
> CATALINA_OUT 
> catalina.sh 
> setenv.sh 
> server.xml 
> logging.properties 
> catalina.log, host.log, manager.log, etc.
리스너 
자바옵션 
클래스로더 
setenv? 
web.xml 
로그 
{G.Stone : 환경 설정} 끝
N E X T 
배 치
CategMoGryGM

톰캣 #04-환경설정