Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

톰캣 #04-환경설정

700 views

Published on

설치 이후에는 사용하고자하는 환경에 맞게 몇가지 설정을 변경할 필요가 있습니다.
setenv.sh 라고 아시나요??

- 리스너
- Java Options
- ClassLoader
- setenv?
- web.xml
- Log

Published in: Software
  • Be the first to comment

톰캣 #04-환경설정

  1. 1. .Stone G
  2. 2. {톰캣: T o m c a t }
  3. 3. 리스너 자바옵션 클래스로더 setenv? web.xml 로그 CHAPTER #4 TOMCAT 환 경 설 정
  4. 4. LISTENER
  5. 5. Listener
  6. 6. Listener
  7. 7. Listener Listener 0101110 8080
  8. 8. Listener http://tomcat.gm.com:80 https://tomcat.gm.com:443
  9. 9. …생략… 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
  10. 10. Listener
  11. 11. JAVA OPTIONS
  12. 12. 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
  13. 13. APPLICATIONS Java Options
  14. 14. -XX:+DisableExplicyGC -server -Xms -Xint -Xmx -XX:PermSize -XX:+Agressive -XX:+HeapdumpOnOutOfMemory -XX:MaxNewSize -verbosegc Java Options
  15. 15. CLASSLOADER
  16. 16. $ java HelloWorld ClassLoader
  17. 17. ClassLoader ClassLoader Class:Class :Class:Class :Class
  18. 18. ClassLoader Class Path Class:Class :Class:Class :Class
  19. 19. -Xbootclasspath/p:HelloWorld -Xbootclasspath/a:HelloWorld BOOTCLASSPATH : EXTENSIONSCLASSPATH : CLASSPATH ClassLoader CLASSPATH=HelloWorld CLASSPATH=${CLASSPATH}:HelloWorld CLASSPATH=HelloWorld:${CLASSPATH}
  20. 20. setenv?
  21. 21. setenv? Script PATH Script Chapter #03. 설치
  22. 22. setenv? WINDOWS SERVICE
  23. 23. setenv? Catalina.sh? ?
  24. 24. # ----------------------------------------------------------------------------- # 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?
  25. 25. # 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?
  26. 26. ex)setenv.sh JAVA_OPTS="-DMy_Tomcat -Xms512m -Xmx512m -verbosegc" setenv?
  27. 27. setenv? JAVA_OPTS
  28. 28. setenv? CLASSPATH
  29. 29. CATALINA_HOME setenv?
  30. 30. CATALINA_BASE setenv?
  31. 31. CATALINA_OUT setenv?
  32. 32. CATALINA_OPTS setenv?
  33. 33. setenv? setenv.sh
  34. 34. web.xml
  35. 35. web.xml conf/web.xml WEB-INF/web.xml
  36. 36. <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 이하
  37. 37. web.xml
  38. 38. LOG
  39. 39. Log
  40. 40. catalina.out access.log *.log Log > CATALINA_OUT > catalina.sh > setenv.sh > server.xml > logging.properties > catalina.log, host.log, manager.log, etc.
  41. 41. 리스너 자바옵션 클래스로더 setenv? web.xml 로그 {G.Stone : 환경 설정} 끝
  42. 42. N E X T 배 치
  43. 43. CategMoGryGM

×