linux上jira服务启动命令,jira 6.X或confluence5.X linux/centos/ubuntu下设置开启启动

这篇博客介绍了如何创建和使用Shell脚本`jira.sh`来管理Jira服务,包括在CentOS和Ubuntu系统上的启动、停止、重启和状态检查操作。脚本涉及到修改配置路径,并通过chkconfig或update-rc.d进行服务管理设置。
摘要由CSDN通过智能技术生成

作者:风来了.带狐狸了

jira为例      (confluence 只要把 jira.sh 中的 _ROOT 和_NAME 路径和名称修改就可以)

保存代码

把以下代码另存为 jira.sh 上传至 jira目录 /www/jira

centos

#! /bin/sh

# chkconfig: 2345 10 90

# description: jira ....

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

#prefix=/home/lanmps/jira

_ROOT=/home/lanmps/jira

_NAME=jira

#停止方法

stop(){

echo "Stoping $_NAME "

$_ROOT/bin/stop-jira.sh

}

case "$1" in

start)

echo "Starting $_NAME "

$_ROOT/bin/start-jira.sh

;;

stop)

stop

;;

restart)

stop

start

;;

status)

ps -ef|grep $_ROOT/work/catalina.pid

;;

*)

printf 'Usage: %s {start|stop|restart|status}\n' "$prog"

exit 1

;;

esac

Ubuntu下

#! /bin/sh

### BEGIN INIT INFO

# Provides: jira

# Required-Start: $remote_fs

# Required-Stop: $remote_fs

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: Start or stop the jira.

### END INIT INFO

#prefix=/home/lanmps/jira

_ROOT=/home/lanmps/jira

_NAME=jira

#停止方法

stop(){

echo "Stoping $_NAME "

$_ROOT/bin/stop-${_NAME}.sh

}

case "$1" in

start)

echo "Starting $_NAME "

$_ROOT/bin/start-${_NAME}.sh

;;

stop)

stop

;;

restart)

stop

start

;;

status)

ps -ef|grep $_ROOT/work/catalina.pid

;;

*)

printf 'Usage: %s {start|stop|restart|status}\n' "$prog"

exit 1

;;

esac

设置权限及软连接

chmod +x jira.sh

ln -s /www/jira/jira.sh /etc/init.d/jira

设置启动项

centos下

chkconfig --add jira

chkconfig --level 345 jira on

Ubuntu下

update-rc.d -f jira defaults

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值