• linux下将tomcat加入服务


    #!/bin/sh

    #chkconfig: 2345 10 90

    # description: Starts and Stops the Tomcat daemon.

    ##############################################

    #Startup script for Tomcat on Linux

    JAVA_HOME=/usr/java/jdk1.7.0_79                  #JDK安装目录 CATALINA_HOME=/app/tomcat7pay           #tomcat安装目录

    export JAVA_HOME

    export CATALINA_HOME

    ###############################################

    start_tomcat=/app/tomcat7pay/bin/startup.sh              #tomcat启动文件 stop_tomcat=/app/tomcat7pay/bin/shutdown.sh                  #tomcat关闭文件

    start() {                                                                     

        echo -n "Starting tomcat: "        

         ${start_tomcat}        

        echo "tomcat start ok."

        }

    stop() {        

         echo -n "Shutting down tomcat: "        

        ${stop_tomcat}        

        echo "tomcat stop ok."

        }

    # See how we were called                                                   

      case "$1" in  

       start)       

          start        

          ;;  

       stop)        

         stop        

          ;;  

          restart)        

        stop        

        sleep 10        

        start        

        ;;  

      *)        

           echo "Usage: $0 {start|stop|restart}"

    esac

    exit 0

    上面的文字修改后改名为tomcat7xxx,放入/etc/rc.d/init.d
    授权:命令行进入:/etc/rc.d/init.d
    执行命令:chmod 755 tomcat7xxx
    使用chkconfig命令把 tomcat7xxx 命令加入到系统启动队列中:chkconfig --add tomcatxxx

    来自收点资料买框架
  • 相关阅读:
    paper 66: MATLAB函数—disp的使用
    paper 65 :尺度不变特征变换匹配算法[转载]
    paper 64:尺度空间(Scale space)理论
    paper 63 :函数比较:imfilter与fspecial
    paper 62:高斯混合模型(GMM)参数优化及实现
    paper 61:计算机视觉领域的一些牛人博客,超有实力的研究机构等的网站链接
    paper 60 :转载关于视觉SCI期刊
    paper 59:招聘
    paper 58 :机器视觉学习笔记(1)——OpenCV配置
    paper 57 :颜色直方图的代码
  • 原文地址:https://www.cnblogs.com/xin932134334/p/5282626.html
Copyright © 2020-2023  润新知