JIRA系统CentOS系统下的开机启动设置

首先,编写启动脚本jira.sh

cd /opt/jira/bin
vim jira.sh
#! /bin/sh 
#prefix=/opt/jira 

_ROOT=/opt/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

其次,设置权限及软连接

chmod +x jira.sh  
ln -s /opt/jira/bin/jira.sh /etc/init.d/jira

最后,设置启动项

chkconfig --add jira  
chkconfig --level 345 jira on

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native