<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
    主站蜘蛛池模板: 亚洲成人国产精品| 免费一看一级毛片人| 国产AV无码专区亚洲Av| 黄色免费网址大全| 亚洲国产精品成人| av网站免费线看| 亚洲乱码日产一区三区| 免费久久人人爽人人爽av | 色屁屁www影院免费观看视频| 夭天干天天做天天免费看| 亚洲欧美第一成人网站7777| 国产免费啪嗒啪嗒视频看看| xxxxxx日本处大片免费看| 中文字幕精品无码亚洲字| 韩日电影在线播放免费版| 在线电影你懂的亚洲| 男女超爽刺激视频免费播放| 亚洲欧美日韩中文字幕在线一区| 日本a级片免费看| 五月天婷婷免费视频| 久久久久亚洲精品影视| 永久免费AV无码国产网站| 亚洲.国产.欧美一区二区三区| 免费欧洲美女牲交视频| 国产中文字幕在线免费观看| 亚洲激情黄色小说| 国产国产成年年人免费看片| 黄桃AV无码免费一区二区三区| 91亚洲va在线天线va天堂va国产| 久久精品免费一区二区喷潮| 一二三四在线观看免费中文在线观看| 亚洲人成在线播放网站| 99re免费视频| 看Aⅴ免费毛片手机播放| 久久亚洲精品成人综合| 毛片a级毛片免费播放100| 一级毛片免费播放试看60分钟| 亚洲午夜在线电影| 四虎国产精品免费视| 亚欧免费一级毛片| 羞羞漫画页面免费入口欢迎你|