• <i id='zyolq'><div id='zyolq'><ins id='zyolq'></ins></div></i>
  • <tr id='zyolq'><strong id='zyolq'></strong><small id='zyolq'></small><button id='zyolq'></button><li id='zyolq'><noscript id='zyolq'><big id='zyolq'></big><dt id='zyolq'></dt></noscript></li></tr><ol id='zyolq'><table id='zyolq'><blockquote id='zyolq'><tbody id='zyolq'></tbody></blockquote></table></ol><u id='zyolq'></u><kbd id='zyolq'><kbd id='zyolq'></kbd></kbd>
    <i id='zyolq'></i>

      <code id='zyolq'><strong id='zyolq'></strong></code>
      <span id='zyolq'></span>

    1. <acronym id='zyolq'><em id='zyolq'></em><td id='zyolq'><div id='zyolq'></div></td></acronym><address id='zyolq'><big id='zyolq'><big id='zyolq'></big><legend id='zyolq'></legend></big></address>

      <dl id='zyolq'></dl>

      <fieldset id='zyolq'></fieldset>
      <ins id='zyolq'></ins>

            Tomcat自启动的设置技巧

            • 时间:
            • 浏览:3
            • 来源:124软件资讯网

              安装了Tomcat,很简朴,将下载下来的安装文件包解压  ,放入响应的目录中 ,然后在Linux情况中设置响应的如:JAVA_HOME、CATALINA_HOME等情况变量后  ,在Tomcat的bin目录下执行./catalina.sh run就能在终端方式上启动tomcat的服务  。若是需要将tomcat加入自启动行列中 ,则需要举行如下的操作:
              以root用户登录系统:

              cd /etc/rc.d/init.d/

              vi tomcat

              文件内容参考如下:

                #!/bin/sh   #   # tomcat: Start/Stop/Restart tomcat   #   # chkconfig: 2345 80 20   # description: Tomcat is a Java Servlet Container   #   #   # match these values to your environment:   export CATALINA_BASE=/usr/local/tomcat   export CATALINA_HOME=/usr/local/tomcat   export CATALINA_TMPDIR=/usr/local/tomcat/temp   export JRE_HOME=/usr/java/jdk15   # Source function library.   . /etc/rc.d/init.d/functions   TOMCAT=/usr/local/tomcat   start() {   echo -n ___FCKpd___0quot;Starting Tomcat: "   $TOMCAT/bin/catalina.sh start   }   stop() {   echo -n ___FCKpd___0quot;Stopping Tomcat: "   $TOMCAT/bin/catalina.sh stop   }   # See how we were called.   case "{GetProperty(Content)}" in   start)   start   ;;   stop)   stop   ;;   status)   ;;   status)   ;;   restart)   stop   start   ;;   *)   echo ___FCKpd___0quot;Usage: {GetProperty(Content)} {start stop restart}"   ;;   esac   exit $RETVAL

              把 tomcat 修改为可运行的文件,下令参考如下:

              chmod a+x tomcat

              使用chkconfig下令把 tomcat 下令加入到系统启动行列中:

              chkconfig --add tomcat

              检察apachectl的状态:

              chkconfig --list tomcat

              好了 ,所有完成  !