Tomcat启动脚本catalina.sh

Tomcat启动脚本catalina.sh 1 - 概述 脚本catalina.sh用于启动和关闭tomcat服务器,是最关键的脚本另外的脚本startup.sh和shutdown.sh都是使用不同的参数调用了该脚本该脚本的使用方法如下(引自该脚本本身): 2 - 脚本分析  #!/bin/sh# ==============================
摘要由CSDN通过智能技术生成

Tomcat启动脚本catalina.sh

1 - 概述

脚本catalina.sh用于启动和关闭tomcat服务器,是最关键的脚本
另外的脚本startup.sh和shutdown.sh都是使用不同的参数调用了该脚本
该脚本的使用方法如下(引自该脚本本身):

 

2 - 脚本分析

 

#!/bin/sh


# =============================================================
# 该脚本设置正确的环境变量和系统信息,然后启动或者停止tomcat server
# 具体的操作是:
# 使用命令行参数作为args的实参,调用org.apache.catalina.startup.Bootstrap.main(String[])
# ==============================================================


# -----------------------------------------------------------------------------
# Start/Stop Script for the CATALINA Server
#
# Environment Variable Prequisites
#
#   CATALINA_HOME   May point at your Catalina "build" directory.
#
#   CATALINA_BASE   (Optional) Base directory for resolving dynamic portions
#                   of a Catalina installation.  If not present, resolves to
#                   the same directory that CATALINA_HOME points to.
#
#   CATALINA_OPTS   (Optional) Java runtime options used when the "start",
#                   "stop", or "run" command is executed.
#
#   CATALINA_TMPDIR (Optional) Directory path location of temporary directory
#                   the JVM should use (java.io.tmpdir).  Defaults to
#                   $CATALINA_BASE/temp.
#
#   JAVA_HOME       Must point at your Java Development Kit installation.
#
#   JAVA_OPTS       (Optional) Java runtime options used when the "start",
#                   "stop", or "run" command is executed.
#
#   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
#                   command is executed. The default is "dt_socket".
#
#   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
#                   command is executed. The default is 8000.
#
#   JSSE_HOME       (Optional) May point at your Java Secure Sockets Extension
#                   (JSSE) installation, whose JAR files will be added to the
#                   system class path used to start Tomcat.
#
#   CATALINA_PID    (Optional) Path of the file which should contains the pid
#                   of catalina startup java process, when start (fork) is used
# -----------------------------------------------------------------------------



# OS specific support.  $var _must_ be set to either true or false.

cygwin=false
case "`uname`" in
CYGWIN*) cygwin=true;;
esac


# PRG是被执行的脚本的名称,可以认为PRG=="catalina.sh",也可能是某个符号链,指向该脚本。

PRG="$0"


# 处理了一下PRG,等循环跳出之后PRG成为 ????

while [ -h "$PRG" ]; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> /(.*/)

  echo "Usage: catalina.sh ( comman
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值