Centos jira automatatic start

Centos下jira自启动

背景

jira版本:atlassian-jira-6.3.6-standalone

解决方案

  1. 启动脚本
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# chkconfig: 2345 10 90
# description:jira server

jira_home=/opt/atlassian/jira
server_name=jira

case "$1" in
start)
echo "Starting $server_name "
$jira_home/bin/start-jira.sh
;;
stop)
echo "Stoping $server_name "
$jira_home/bin/stop-jira.sh
;;
restart)
stop
start
;;
status)
ps aux|grep $jira_home
;;
*)
echo 'Usage: %s {start|stop|restart|status}\n' "$prog"
exit 1
;;
esac
  1. 设置自启动
1
2
3
4
5
6
7
8
9
# 0.将jira.sh复制至/etc/init.d/目录下
[root@localhost ~]# cp -a jira.sh /etc/init.d/jira

# 1.给jira脚本给与执行权限
[root@localhost ~]# chmod +x /etc/init.d/jira

# 2.设置开机启动项
[root@localhost ~]# chkconfig --add jira
[root@localhost ~]# chkconfig --level 345 jira on
坚持原创技术分享,您的支持将鼓励我继续创作!
0%