1、准备环境
系统环境:Centos7.3 防火墙和Selinux管闭
[root@localhost ~]# useradd jira [root@localhost ~]# yum install mariadb-server
[root@localhost ~]# mv /var/lib/mysql{,.bak}
准备备份数据
scp /opt/jira_opt-atlassian-2018-09-27.tar root@10.0.3.201:/opt/ scp /var/jira_var-atlassian-2018-09-27.tar root@10.0.3.201:/var/ scp /var/lib/jira-mysql.tar.gz root@10.0.3.201:/var/lib/
恢复jira
[root@localhost ~]# cd /var/lib/ [root@localhost lib]# tar xf jira-mysql.tar.gz [root@localhost lib]# systemctl start mariadb [root@localhost ~]# cd /opt/ [root@localhost opt]# tar xf jira_opt-atlassian-2018-09-27.tar [root@localhost opt]# cd /var/ [root@localhost var]# tar xf jira_var-atlassian-2018-09-27.tar
jira启动脚本
[root@localhost jira]# vim /etc/init.d/jira #!/bin/bash # JIRA Linux service controller script cd "/opt/atlassian/jira/bin" case "$1" in start) ./start-jira.sh ;; stop) ./stop-jira.sh ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac
[root@localhost jira]# chmod +x /etc/init.d/jira
启动jira
[root@localhost jira]# service jira start
浏览器访问测试 IP:8080