zoukankan      html  css  js  c++  java
  • centeros resin安装脚本启动

    公司用的服务器是resin+apache

    #! /bin/sh
    #
    # See contrib/init.resin for /etc/rc.d/init.d startup script
    #
    # resin.sh can be called like apachectl
    #
    # resin.sh         -- execs resin in the foreground
    # resin.sh start   -- starts resin in the background
    # resin.sh stop    -- stops resin
    # resin.sh restart -- restarts resin
    #
    # resin.sh will return a status code if the wrapper detects an error, but
    # some errors, like bind exceptions or Java errors, are not detected.
    #
    # To install, you'll need to configure JAVA_HOME and RESIN_HOME and
    # copy contrib/init.resin to /etc/rc.d/init.d/resin.  Then
    # use "unix# /sbin/chkconfig resin on"
    export JAVA_HOME=/usr/local/java/ 
    export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 
    export PATH=$PATH:$JAVA_HOME/bin
    
    if test -n "${JAVA_HOME}"; then
      if test -z "${JAVA_EXE}"; then
        JAVA_EXE=$JAVA_HOME/bin/java
      fi
    fi  
    
    if test -z "${JAVA_EXE}"; then
      JAVA_EXE=java
    fi  
    
    #
    # trace script and simlinks to find the wrapper
    #
    if test -z "${RESIN_HOME}"; then
      script=`/bin/ls -l $0 | awk '{ print $NF; }'`
    
      while test -h "$script"
      do
        script=`/bin/ls -l $script | awk '{ print $NF; }'`
      done
    
      bin=`dirname $script`
      RESIN_HOME="$bin/.."
    fi  
    
    exec $JAVA_EXE -jar ${RESIN_HOME}/lib/resin.jar $*
    export JAVA_HOME=/usr/local/java/ 
    export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 
    export PATH=$PATH:$JAVA_HOME/bin

    加入我们的java变量就可以启动暂停了。
  • 相关阅读:
    作业17
    模块
    Find the Lost Sock (异或算法)
    CD(二分)
    数字流输入
    最大连续子序列(dp)
    STL学习----lower_bound和upper_bound算法
    输入挂(减少时间)
    暴力之全排列
    【C++】判断元素是否在vector中,对vector去重,两个vector求交集、并集
  • 原文地址:https://www.cnblogs.com/hackermi/p/5390077.html
Copyright © 2011-2022 走看看