<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Alex刺客

    Dancing fingers, damage world. -- 舞動手指,破壞世界.

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      57 隨筆 :: 0 文章 :: 76 評論 :: 0 Trackbacks
    Configured Linux installation services tomcat6

    1. Installation Preparation.


    ?? ?a) download tomcat.

    ?? ??? ?......

    ?? ?b) copy to '/opt' directory.

    1?????????cp?apache-tomcat-6.0.29.tar.gz?/opt/

    ?? ?c) extract files.

    1?????????cd?/opt/
    2?????????tar?zxvf?apache-tomcat-6.0.29.tar.gz


    ?? ?d) rename.

    1?????????mv?apache-tomcat-6.0.29?tomcat6


    ?? ?e) Test whether you can run.

    1?????????cd?tomcat6/bin/
    2?????????./catalina.sh?run

    2. Installation commons-daemon-native
    (Reference)
    http://tomcat.apache.org/tomcat-7.0-doc/setup.html
    ???
    ??? a) extract files.
    ??? ??? 'commons-daemon-native' in the bin directory.
    ??? ???
    1?????????tar?xvfz?commons-deamon-native.tar.gz

    ??? b) configuration commons-daemon-native.
    ???
    1?????????cd?commons-daemon-1.0.2-native-src/unix
    2?????????./configure

    ??? c) compiled.

    1?????????make?#?Make?an?error?the?first?time.
    2?????????make?clean
    3?????????make?#?Once?again?make?compile?successfully.

    ??? d) copy 'jsvc' to 'bin' directory.
    1?????????cp?jsvc?../..

    3. Set the startup script.
    (Reference)?
    native/Tomcat5.sh
    http://hi.baidu.com/wallace_gong/blog/item/7b27c449ad74502d09f7ef83.html
    http://blog.csdn.net/luinstein/archive/2009/08/28/4493055.aspx

    ??? a) editing shell startup file tomcat5.
    1?????????cd?/etc/init.d/
    2?????????vim?tomcat6

    (Refer to the following document)
    #!/bin/sh
    #
    ?tomcat:?Start/Stop/Restart?tomcat
    #
    #
    ?chkconfig:?2345?85?15
    #
    ?description:?Apache?tomcat6

    #?Small?shell?script?to?show?how?to?start/stop?Tomcat?using?jsvc
    #
    ?If?you?want?to?have?Tomcat?running?on?port?80?please?modify?the?server.xml
    #
    ?file:
    #
    #
    ????<!--?Define?a?non-SSL?HTTP/1.1?Connector?on?port?80?-->
    #
    ????<Connector?className="org.apache.catalina.connector.http.HttpConnector"
    #
    ???????????????port="80"?minProcessors="5"?maxProcessors="75"
    #
    ???????????????enableLookups="true"?redirectPort="8443"
    #
    ???????????????acceptCount="10"?debug="0"?connectionTimeout="60000"/>
    #
    #
    JAVA_HOME=/usr/java/latest
    CATALINA_HOME=/opt/tomcat6
    DAEMON_HOME
    =$CATALINA_HOME/bin
    #?I?did?not?use?the?user.
    #
    TOMCAT_USER=tomcat

    #?for?multi?instances?adapt?those?lines.
    TMP_DIR=$CATALINA_HOME/tmp
    PID_FILE
    =/var/run/jsvc.pid
    CATALINA_BASE
    =$CATALINA_HOME
    .?
    /etc/rc.d/init.d/functions
    CATALINA_OPTS
    =
    CLASSPATH
    =\
    $JAVA_HOME
    /lib/tools.jar:\
    $CATALINA_HOME
    /bin/commons-daemon.jar:\
    $CATALINA_HOME
    /bin/bootstrap.jar

    start()?{
    ????echo?
    -n?$"Starting?Tomcat6:?"
    ????
    #?If?you?want?to?specify?a?user?to?run?Tomcat.
    ????#increase?the?'user?$?TOMCAT_USER?\'?to?the?parameter?list.
    ????$DAEMON_HOME/jsvc?\
    ????
    -home?$JAVA_HOME?\
    ????
    -Dcatalina.home=$CATALINA_HOME?\
    ????
    -Dcatalina.base=$CATALINA_BASE?\
    ????
    -Djava.io.tmpdir=$TMP_DIR?\
    ????
    -wait?10?\
    ????
    -pidfile?$PID_FILE?\
    ????
    -outfile?$CATALINA_HOME/logs/catalina.out?\
    ????
    -errfile?'&1'?\
    ????$CATALINA_OPTS?\
    ????
    -cp?$CLASSPATH?\
    ????org.apache.catalina.startup.Bootstrap
    }

    stop()?{
    ????echo?
    -n?$"Stopping?Tomcat6:?"
    ????
    #
    ????$DAEMON_HOME/jsvc?\
    ????
    -stop?\
    ????
    -pidfile?$PID_FILE?\
    ????org.apache.catalina.startup.Bootstrap
    }

    status()?{
    ?????ps?ax?
    --width=1000?|?grep?"[o]rg.apache.catalina.startup.Bootstrap"?|?awk?'{printf?$1?"?"}'?|?wc?|?awk?'{print?$2}'?>/tmp/tomcat_process_count.txt
    ?????read?line?
    <?/tmp/tomcat_process_count.txt
    ?????
    if?[?$line?-gt?0?];?then
    ???????echo?
    -n?"tomcat6?(?pid?"
    ???????ps?ax?
    --width=1000?|?grep?"[o]rg.apache.catalina.startup.Bootstrap"?|?awk?'{printf?$1?"?"}'
    ???????echo?
    ")?is?running"
    ?????
    else
    ???????echo?
    "Tomcat6?is?stopped"
    ?????fi
    }

    case?
    "$1"?in
    ??start)
    ????
    #?Start?Tomcat
    ????start
    ????exit?$?
    ????;;

    ??stop)
    ????
    #?Stop?Tomcat
    ????stop
    ????exit?$?
    ????;;
    ??restart)
    ????
    #?Restart?Tomcat
    ????stop
    ????sleep?
    3
    ????start
    ????exit?$?
    ????;;
    ???status)
    ????status
    ????exit?$?
    ????;;
    ??
    *)
    ????echo?
    "Usage:?tomcat6?{start|stop|restart|status}"
    ????exit?
    1;;
    esac


    4. Added to the system service
    1?????chkconfig?--add?tomcat6
    2?????chkconfig?--list?|?grep?tomcat6
    3?????tomcat6????????????0:off????1:off????2:on????3:on????4:on????5:on????6:off


    5. Start and Stop for tomcat service.

    [root@localhost?init.d]
    #?service?tomcat6?start
    Starting?Tomcat?
    [root@localhost?init.d]
    #?service?tomcat6?status
    tomcat?(?pid?8024?8025?)?is?running
    [root@localhost?init.d]
    #?service?tomcat6?stop
    Stopping?Tomcat?
    [root@localhost?init.d]
    #?service?tomcat6?status
    Tomcat?is?stopped
    [root@localhost?init.d]
    #?

    最近對英文產生了莫明其妙的好感 -- 嘿嘿.
    ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? author: alex刺客
    溫馨提示: 轉載請保留此文檔地址.
    Tips: Reprinted Please keep this document URL.
    posted on 2010-10-27 19:08 Alex刺客 閱讀(1741) 評論(0)  編輯  收藏 所屬分類: Linux
    主站蜘蛛池模板: 亚洲乱码中文字幕综合| 在线观看www日本免费网站| 手机在线毛片免费播放| 18禁超污无遮挡无码免费网站国产 | 黄色一级视频免费观看| 国产片免费在线观看| 亚洲av中文无码字幕色不卡| 妞干网在线免费视频| 337p日本欧洲亚洲大胆人人| 99国产精品视频免费观看| 在线观看亚洲一区二区| 一区二区三区在线免费| 久久久久亚洲av成人无码电影| 亚洲精品视频免费观看| 久久被窝电影亚洲爽爽爽 | 77777_亚洲午夜久久多人 | 永久免费看bbb| 一个人看的免费高清视频日本| 亚洲一区二区三区免费| 久久精品成人免费观看| 亚洲精品人成电影网| 免费视频精品一区二区三区| 亚洲第一成年男人的天堂| 91黑丝国产线观看免费| 亚洲乱理伦片在线观看中字| 无码欧精品亚洲日韩一区夜夜嗨| 中国黄色免费网站| 亚洲中文字幕久久精品无码2021| 黄a大片av永久免费| 中国videos性高清免费| 亚洲另类春色国产精品| 亚洲高清无码综合性爱视频| 最新国产乱人伦偷精品免费网站 | 在线观看亚洲电影| 四虎www免费人成| 2022国内精品免费福利视频| 亚洲综合免费视频| 全部免费a级毛片| 香蕉国产在线观看免费| 亚洲网站免费观看| 亚洲精品视频免费观看|