<span id='8tqne'></span>
<dl id='8tqne'></dl>

    <i id='8tqne'><div id='8tqne'><ins id='8tqne'></ins></div></i>

  1. <i id='8tqne'></i>

  2. <tr id='8tqne'><strong id='8tqne'></strong><small id='8tqne'></small><button id='8tqne'></button><li id='8tqne'><noscript id='8tqne'><big id='8tqne'></big><dt id='8tqne'></dt></noscript></li></tr><ol id='8tqne'><table id='8tqne'><blockquote id='8tqne'><tbody id='8tqne'></tbody></blockquote></table></ol><u id='8tqne'></u><kbd id='8tqne'><kbd id='8tqne'></kbd></kbd>
  3. <fieldset id='8tqne'></fieldset>

    <code id='8tqne'><strong id='8tqne'></strong></code>

    <acronym id='8tqne'><em id='8tqne'></em><td id='8tqne'><div id='8tqne'></div></td></acronym><address id='8tqne'><big id='8tqne'><big id='8tqne'></big><legend id='8tqne'></legend></big></address>
          <ins id='8tqne'></ins>

          设置Tomcat在Linux操作系统中自启动方法

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

            安装了Tomcat 5.5,很简朴,将下载下来的安装文件包解压  ,放入响应的目录中 ,然后在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 $"Starting Tomcat: "
            $TOMCAT/bin/catalina.sh start
            }

            stop() {
            echo -n $"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 $"Usage: {GetProperty(Content)} {start|stop|restart}"
            ;;
            esac
            exit $RETVAL

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

            chmod a+x tomcat

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

            chkconfig --add tomcat

            检察apachectl的状态:

            chkconfig --list tomcat

            好了  ,所有完成  ,很简朴的纪录  ,希望能资助你 ,也让我自己记着