风.foxwho(神秘狐)

神秘狐,梦想 构架一个世界

jira 6.X或confluence5.X linux/centos/ubuntu下设置开启启动

作者:风来了.带狐狸了

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



阅读更多

扫码向博主提问

去开通我的Chat快问

wljk506

非学,无以致疑;非问,无以广识
  • 擅长领域:
  • php
  • java
  • go
  • 架构
  • more
版权声明:原创文章欢迎转载,不过要记得加出处哦 https://blog.csdn.net/wljk506/article/details/43446357
文章标签: jira confluence
个人分类: 系统|服务器|平台
上一篇jira 6.x 日期设置
下一篇CentOS/Ubuntu 14.10 安装 phpstorm
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭