Jira 迁移
Jira版本说明
Jira相关软件的区别:
- JIRA Core:主要做缺陷管理
- JIRA Software:JIRA Core + Agile插件
- JIRA Service Desk: JIRA Core + Agile插件 + Service Desk插件
Jira 环境说明
- jira code:/opt/atlassian/jira
- jira.home:/var/atlassian/application-data/jira(不在云硬盘,迁移需要调整)
- 数据库采用本地MySQL,数据库配置文件在:
- /var/atlassian/application-data/jira/dbconfig.xml
- /var/atlassian/application-data/jira/eazybi.toml
迁移后修正说明
- java 优化:-Xms512m -Xmx2048m -> -Xms1024m -Xmx50g (bin/setenv.sh)
- jira.home 默认目录是 /var/atlassian/application-data 不在数据盘上,通过软链接到 /opt/atlassian/application-data
- java 环境,采用的 /opt/atlassian/jira/jre/,无需单独安装
- 修改默认端口 8080 -> 80 /opt/atlassian/jira/conf/server.xml中<Connector port=“8080”
原服务器操作
停止服务
cd /opt/atlassian/jira/bin
./stop-jira.sh
备份数据库
mysqldump -h ip -ujira -p jira > jira_123.sql
mysqldump -h ip -ujira -p jira_eazybi > jira_eazybi_123.sql
备份jira code
cd /opt/atlassian
tar -zcvf jira_123.tar.gz jira
备份 jira.home
cd /var/atlassian/
tar -zcvf application-data_123.tar.gz application-data
将上述文件发送到新服务器 /u01/atlassian 目录
新服务器操作
user
groupadd -g 1003 jira
useradd jira -d /home/jira -c "Atlassian JIRA" -u 1003 -g 1003 -s /bin/bash
jira:x:1003:1003:Atlassian JIRA:/home/jira:/bin/bash
文件目录
将数据盘sdb挂载到 /u01
mkdir /u01/atlassian
恢复 jira code 和 jira.home
cd /u01/atlassian
tar -zxvf jira_123.sql
tar -zxvf application-data_123.tar.gz
# 创建软链接
mkdir /var/atlassian
ln -s /u01/atlassian/application-data /var/atlassian/application-data
mkdir /opt/atlassian
ln -s /u01/atlassian/jira /opt/atlassian/jira
恢复数据库
mysql -h <mysql-id> -ujira -p jira < jira_123.sql
mysql -h <mysql-id> -ujira -p jira_eazybi < jira_eazybi_123.sql
修改数据库配置
/var/atlassian/application-data/jira/dbconfig.xml
/var/atlassian/application-data/jira/eazybi.toml
jira 乱码问题
安装如下rpm:
ghostscript-fonts-5.50-32.el7.noarch
libfontenc-1.1.1-5.el7.x86_64
libXfont-1.4.7-1.1.el7.x86_64
fontconfig-2.10.95-7.el7.x86_64
dejavu-fonts-common-2.33-6.el7.noarch
fontconfig-devel-2.10.95-7.el7.x86_64
fontpackages-filesystem-1.44-8.el7.noarch
urw-fonts-2.4-16.el7.noarch
dejavu-sans-mono-fonts-2.33-6.el7.noarch
xorg-x11-font-utils-7.5-18.1.el7.x86_64
xorg-x11-fonts-Type1-7.5-9.el7.noarch
wget ftp://ftp.pbone.net/mirror/archive.download.redhat.com/pub/redhat/linux/7.3/en/os/i386/RedHat/RPMS/fonts-ISO8859-7-1.0-2.noarch.rpm
wget http://rpm.pbone.net/index.php3?stat=26&dist=3&size=280915&name=fonts-ISO8859-7-1.0-2.noarch.rpm
rpm -ivh --force --nodeps fonts*.rpm
修改 /etc/locale.conf 加下面内容到第一行,设置中文:
LANG=zh_CN.utf8
查看:
locale -a
检测并启动服务
清空日志
cd /u01/atlassian/jira/bin/
./startup.sh
开机启动:
/etc/rc.local 中添加:
cd /opt/atlassian/jira/bin/; ./start-jira.sh
常用命令
重启
cd /opt/atlassian/jira/bin/
./shutdown.sh
./startup.sh
插件
structure
tm4j
jira service desk