Tomcat 상용 조작

tomcat 상용 조작
1.    tomcat
1.1    32-bit Windows zip [apache-tomcat-7.0.4-windows-x86.zip]
    http://tomcat.apache.org/download-70.cgi
1.2    apache-tomcat-7.0.4-windows-x86.zip 
    d:/apache/apache-tomcat-7.0.4
                    |-bin
                    |-conf
                    |-lib
                    |-logs
                    |-temp
                    |-webapps
                    |-work       [web        ]
                    |-...
    #    %TOMCAT_HOME% = d:/apache/apache-tomcat-7.0.4
1.3    tomcat
    %TOMCAT_HOME%/bin/startup.bat
1.4    tomcat
    http://localhost:8080/
1.5    tomcat
    %TOMCAT_HOME%/bin/shutdown.bat
2.    web   
2.1    :    context.xml   
    #    %TOMCAT_HOME%/conf/Catalina/localhost/my.xml
    #     "my"    web     contextPath
    # my.xml     
    <?xml version="1.0" encoding="utf-8"?>
    <Context docBase="D:\workspace\eclipse_wksp\MyWebApp\WebContent" 
             reloadable="true">
    </Context>
    # docBase           
    .../WebContent
            |-META-INF
            |-WEB-INF
                |-classes
                |-lib
                |-web.xml
            |-index.jsp
            |-...
    #    tomcat
    #    web   
    http://localhost:8080/my
2.2    :   web         %TOMCAT_HOME%/webapps  
    #       
    %TOMCAT_HOME%/webapps/myweb
                            |-META-INF
                            |-WEB-INF
                                |-classes
                                |-lib
                                |-web.xml
                            |-index.jsp
                            |-...
    #      "myweb"    web     contextPath
    #    tomcat
    #    web   
    http://localhost:8080/myweb
2.3    : .war   
    #     MyWebApp.war     %TOMCAT_HOME%/webapps  
    # .war     
    %TOMCAT_HOME%/webapps/MyWebApp.war
                            |-META-INF
                            |-WEB-INF
                                |-classes
                                |-lib
                                |-web.xml
                            |-index.jsp
                            |-...
    #    tomcat, tomcat       .war    
    #    MyWebApp.war     "MyWebApp"    web     contextPath
    #    web   
    http://localhost:8080/MyWebApp
3.         
    #    %TOMCAT_HOME%/conf/server.xml
    #   Engine      Host       ,           Host     
    #      Host     name      "localhost2", appBase      "webapps2"
    #      %TOMCAT_HOME%/conf/Catalina/localhost2
    #      %TOMCAT_HOME%/webapps2
    #   web    myapp     %TOMCAT_HOME%/webapps2
    #    myapp       
    %TOMCAT_HOME%/webapps2/myapp
                             |-META-INF
                             |-WEB-INF
                                 |-classes
                                 |-lib
                                 |-web.xml
                             |_index.jsp
                             |-...
    #    C:\Windows\System32\drivers\etc\hosts
    #   ubuntu    /etc/hosts
    #         
    127.0.0.1 localhost2
    #    tomcat
    #    web   
    http://localhost2:8080/myapp
4.      Service
   #    %TOMCAT_HOME%/conf/server.xml
   #   Service       ,          Service     
   #             Service   :
   #   Service     name      Catalina2
   #      Connector     port     8080    8081
   #      Connector     port     8009    8010
   #   Engine     name     Catalina    Catalina2,  Service   name       
   #   Host     appBase     webapps    webapps2
   #     
   %TOMCAT_HOME%/conf/Catalina2/localhost
   %TOMCAT_HOME%/webapps2
   #   %TOMCAT_HOME%/webapps/ROOT     %TOMCAT_HOME%/webapps2
   > xcopy webapps\ROOT webapps2\ROOT /E       [windows]
   $ cp webapps\ROOT webapps2\ROOT             [linux]
   #    tomcat
   #    tomcat   
   http://localhost:8080/
   http://localhost:8081/  
5. tomcat         
   #    %TOMCAT_HOME%/bin/catalina.bat
   # -Xms      
   # -Xmx      
   # -XX:PermSize           
   # -XX:MaxPermSize        
   set JAVA_OPTS=-server -Xincgc -Xms1024m -Xmx1024m -XX:MaxPermSize=256m
   #            [java -X]  
   # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
   # http://download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#resources
   #     
   # http://hi.baidu.com/wuyuwenct/blog/item/c3c9321de48e508787d6b6df.html
   # http://www.duduwolf.com/wiki/2009/922.html
6.    JRebel hot update .class
   #    %TOMCAT_HOME%/bin/catalina.bat
   set JAVA_OPTS=%JAVA_OPTS% -noverify -javaagent:D:/library/lib_share/jrebel.jar
   #            WEB-INF/classes    .class,
   #    WEB-INF/lib    .jar   ,         .jar, 
   #      WEB-INF/classes/rebel.xml,     
   <?xml version="1.0" encoding="UTF-8"?>
   <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="http://www.zeroturnaround.com"
       xsi:schemaLocation="http://www.zeroturnaround.com 
                           http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">       
       <classpath>
           <dir name="D:\workspace\eclipse_my\Test\WebContent\WEB-INF\classes"/>
       </classpath>
        
   </application>
   #  :http://www.zeroturnaround.com/jrebel/
       

 첨부:
1. tomcat for eclipse plugin
   http://www.eclipsetotale.com/tomcatPlugin.html
2. jndi
    http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html#JDBC_Data_Sources
3. tomcat
   http://www.ibm.com/developerworks/cn/education/java/j-tomcat/index.html    https://www.ibm.com/developerworks/cn/java/j-lo-tomcat1/    http://www.ibm.com/developerworks/cn/java/j-lo-tomcat2/

좋은 웹페이지 즐겨찾기