CentOS Linux 下Tomcat启动脚本
#!/bin/bash # # Init file for Apache Tomca6 server daemon # # chkconfig:235 80 30 # # description:this is Apache Tomcat6 server daemon # # processname:tomcat6 # # set JAVA_HOME export JAVA_HOME=/usr/local/jdk1.6 #set Apache Tomcat6 server path tomcat6path=/usr/local/tomcat6 start() { echo -n "Start tomcat6:" $tomcat6path/bin/catalina.sh start } stop() { echo -n "Stop tomcat6:" $tomcat6path/bin/catalina.sh stop } #do command case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Use :$0 {start|stop|restart}" ;; esac exit $RETVAL
将此脚本保存到:/etc/init.d/tomcat6
之后,可以将脚本添加到系统服务
#chkconfig -add tomcat6
启动命令:
#/etc/init.d/tomcat6 start
或者
#service tomcat6 start
本脚本同样适用于REHL 的AS5及以上
相关推荐
linuxwcj 2020-10-21
彼岸随笔 2020-10-20
yutou0 2020-10-17
jarrygao 2020-11-02
shipinsky 2020-09-23
touchfuture 2020-09-16
hongsheyoumo 2020-09-04
momoku 2020-09-11
ruancw 2020-08-27
TuxedoLinux 2020-08-18
vvu 2020-08-16
downtown 2020-08-11
luvzhan 2020-07-28
maxelliot 2020-06-28
cuixingwudi 2020-06-25
linuxdashencom 2020-06-21
旭灿 2020-06-16
wenjieyatou 2020-06-14