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

来源:互联网 发布:网络用语ddp是什么意思 编辑:程序博客网 时间:2024/05/17 22:31

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

cd /opt/jira/binvim 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  
2 0
原创粉丝点击