<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. -- 舞動(dòng)手指,破壞世界.

      BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      57 隨筆 :: 0 文章 :: 76 評(píng)論 :: 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]
    #?

    最近對(duì)英文產(chǎn)生了莫明其妙的好感 -- 嘿嘿.
    ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? author: alex刺客
    溫馨提示: 轉(zhuǎn)載請(qǐng)保留此文檔地址.
    Tips: Reprinted Please keep this document URL.
    posted on 2010-10-27 19:08 Alex刺客 閱讀(1741) 評(píng)論(0)  編輯  收藏 所屬分類: Linux
    主站蜘蛛池模板: 四虎成年永久免费网站 | 亚洲中文字幕乱码熟女在线| 亚洲午夜国产精品| 亚洲最大无码中文字幕| 老司机午夜性生免费福利| 国产VA免费精品高清在线| 久久久久久国产精品免费无码| 久久久久国色AV免费观看性色| 四虎成人精品在永久免费| 亚洲真人无码永久在线| 亚洲黄色在线观看| 久久精品国产亚洲AV电影网| 成年女人A毛片免费视频| 国产h视频在线观看网站免费| 国产成人免费手机在线观看视频| 国产亚洲精品观看91在线| 亚洲国产精品日韩在线| 免费精品国产自产拍在线观看| 美女在线视频观看影院免费天天看| 91免费资源网站入口| 国产亚洲精品自在线观看| 亚洲日韩在线视频| 日韩一区二区三区免费播放| 无码AV片在线观看免费| 成人国产mv免费视频| 午夜亚洲AV日韩AV无码大全| 亚洲AV噜噜一区二区三区 | 羞羞网站免费观看| 久久精品一本到99热免费| 又大又黄又粗又爽的免费视频 | 狠狠色伊人亚洲综合网站色| 久久免费国产精品| 成年女人毛片免费播放人| 国产亚洲成AV人片在线观黄桃| 亚洲综合欧美色五月俺也去| 免费在线黄色电影| 国产免费一区二区三区VR| 亚洲精品日韩中文字幕久久久| 日本视频免费观看| 搡女人免费视频大全| 亚洲AV无一区二区三区久久|