jira/confluence安装

1 运行环境

Centos 7.9
jira 8.13.4
confluence 7.4.5
postgres 10.16

2 说明

本文中的安装方案采用jira+confluence认证方式,先安装jira,再安装confluence。

3 数据库安装

Postgresql yum安装方式,具体安装过程,参考官网教程。
创建 jira confluence 2个数据库,设置数据库远程访问和本地访问密码验证,设置postgres 用户密码,这里密码为123456

4 jira安装

4.1 官网下周jira linux安装包

atlassian-jira-software-8.13.4-x64.bin

4.2 安装

4.2.1 赋权并执行安装

[root@jira soft]# chmod +x atlassian-jira-software-8.13.4-x64.bin 
[root@jira soft]# . /atlassian-jira-software-8.13.4-x64.bin

enter description here
enter description here
enter description here
• 安装完成后jira自动启动

4.2.2 开放8080端口

enter description here

4.2.3 执行破解

破解文件网上自行百度搜索下载,整理使用的破解文件版本:atlassian-extras-3.2.jar
• 将默认的atlassian-extras-3.2.jar移除到其他目录,将破解好的atlassian-extras-3.2.jar放入进去
放置目录/opt/atlassian/jira/atlassian-jira/WEB-INF/lib
重启jira服务
/etc/init.d/jira stop/start

4.2.4 访问页面

• JIRA默认端口8080
enter description here
enter description here

• 这里需要等待程序进行数据初始化,需要一段时间
• 总共创建了264张表
enter description here

• 因为我们没有正式的license,所以需要我们在jira官网注册一个账号,然后利用这个账号申请一个可以试用30天的license,点击生成jira许可证。如下
enter description here
enter description here

• 自动跳转到刚才填写KEY的界面,会自动将许可证填入进去,点击下一步
enter description here
enter description here
enter description here
enter description here
enter description here
enter description here
enter description here
enter description here
enter description here
enter description here

4.2.5 检查破解是否生效

• 破解jira,其实我们已经破解了在前面复制atlassian-extras-3.1.2.jar/opt/atlassian/jira/atlassian-jira/WEB-INF/lib/目录下时,再次启动jira时就已经破解了
• 我们现在登陆到jira中查看授权信息,如下
enter description here
enter description here
• 通过上文章来源(Source):https://www.dqzboy.com图,我们可以很明显的看到jira我们可以使用到2033年,到此有关jira的安装、破解就已经全部结束。

4.3 插件安装

旧系统插件在新系统进行安装破节后才能做数据迁移。

4.3.1 在线安装旧系统插件

直接在线市场安装

4.3.2 插件破解

jira插件授权更新:
将atlassian-universal-plugin-manager-plugin-2.22.4.jar替换掉/opt/atlassian/jira/atlassian-jira/WEB-INF/atlassian-bundled-plugins/下对应jar包,重启jira服务即可。

这里使用破解文件版本 atlassian-universal-plugin-manager-plugin-4.0.2.jar
文件直接百度搜索下载。
备份默认 atlassian-universal-plugin-manager-plugin-XXX.jar 文件,替换破解文件,重启jira服务。

点击使用插件——获取许可证——登录官网申请临时key——拷贝key激活,默认就破解了,可以查看插件破解信息。
enter description here

4.4 数据备份恢复-xml方式

4.4.1 备份数据

管理员登录jira, 管理——系统——导入导出——备份系统,导出jira数据。
enter description here
拷贝 /var/atlassian/application-data/jira/data/路径下的attachmentsavatars目录,到新服务器相应目录,赋予目录及下级 jira用户权限

1
chown jira:jira -R attachments avatars

attachments 项目数据
avatars 头像等数据

4.4.2 恢复数据

管理员登录jira, 管理——系统——导入导出——恢复系统
enter description here
拷贝备份的zip文件到/var/atlassian/application-data/jira/import 下,输入文件名恢复系统。
拷贝attachments avatars 目录到/var/attassian/application-data/jira/data/下,并服务jira用户和组权限,重启jira服务。

4.4.3 重建索引

enter description here

恢复完成。

4.5 出现问题

4.5.1 问题1

头像不显示
原因:avatars目录数据没拷贝或放置位置有问题,权限有问题。
拷贝到 application-data/jira/data/ 下。

4.5.2 问题2

图片不显示
解决办法:拷贝 application-data/jira/logos 数据到新系统相应路径。

4.5.3 问题3

问题:用户登录后切换页面会要求重新登录认证
原因:未找到
解决办法:登录时候勾选 记住登录,可解决。下次登录不会再出现问题。
enter description here
enter description here

5 conflucese安装

参考https://www.dqzboy.com/atlassian-confluence%e5%ae%89%e8%a3%85%e5%92%8c%e7%a0%b4%e8%a7%a3

5.1 下载

官网下载安装包

5.2 安装

5.2.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[root@wiki-test soft]# wget https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-7.2.0-x64.bin
[root@wiki-test soft]# chmod +x atlassian-confluence-7.2.0-x64.bin
[root@wiki-test soft]# ./atlassian-confluence-7.2.0-x64.bin
This will install Confluence 7.2.0 on your computer.
OK [o, Enter], Cancel [c]
o # 输入o或者直接回车
Click Next to continue, or Cancel to exit Setup.

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]
1 # 输入1

See where Confluence will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/confluence
Home Directory: /var/atlassian/application-data/confluence
HTTP Port: 8090
RMI Port: 8000
Install as service: Yes
Install [i, Enter], Exit [e]
i # 输入i或者直接回车

Extracting files ...


Please wait a few moments while we configure Confluence.

Installation of Confluence 7.2.0 is complete
Start Confluence now?
Yes [y, Enter], No [n]
y # 输入y或直接回车

Please wait a few moments while Confluence starts up.
Launching Confluence ...

Installation of Confluence 7.2.0 is complete
Your installation of Confluence 7.2.0 is now ready and can be accessed via
your browser.
Confluence 7.2.0 can be accessed at http://localhost:8090
Finishing installation ...
# 安装完成会自动启动

5.2.2 查看端口和放行端口

1
2
3
4
5
6
7
[root@wiki-test soft]# ss -tnlp |grep 8090
LISTEN 0 10 :::8090 :::* users:(("java",pid=18657,fd=45))

[root@wiki-test soft]# firewall-cmd --permanent --zone=public --add-port=8090/tcp
success
[root@wiki-test soft]# firewall-cmd --reload
success

5.2.3 访问网页

http://ip:8090
enter description here
enter description here
enter description here
enter description here

5.2.4 进行破解

1
2
3
#破解需要两部,一是破解文件,二是获取授权码
#注意,本地运行破解程序需要JAVA环境,直接在oraclejdk官网下载windows版本的exe程序安装即可
[root@wiki-test ~]# cd /opt/atlassian/confluence/confluence/WEB-INF/lib/

• 将该目录下的atlassian-extras-decoder-v2-3.4.1.jar拷贝到自己的电脑上并进行重命名为atlassian-extras-2.4.jar
enter description here
• 将该.jar文件跟破解工具放在一起,然后运行破解工具
enter description here
• 选择.patch!找到刚才重命名的那个文件打开
enter description here
enter description here
• 打开后在当前目录下可以看到atlassian-extras-2.4.jaratlassian-extras-2.4.bak两个文件,这里atlassian-extras-2.4.jar已经是破解好的了,将atlassian-extras-2.4.jar名字改回来atlassian-extras-decoder-v2-3.4.1.jar
enter description here
• 上传到服务器上的/opt/atlassian/confluence/confluence/WEB-INF/lib/目录,覆盖原来的atlassian-extras-decoder-v2-3.4.1.jar

1
[root@wiki-test lib]# cp atlassian-extras-decoder-v2-3.4.1.jar /

enter description here

1
2
3
# 注意:覆盖文件后,一定到重启服务
[root@wiki-test lib]# /etc/init.d/confluence stop
[root@wiki-test lib]# /etc/init.d/confluence start

5.2.5 获取授权码

• 查看网页中的服务器ID,运行破解工具confluence_keygen.jar,破解复制Key到Confluence里,然后点击下一步
enter description here
enter description here
enter description here

5.2.6 配置数据库`

enter description here
enter description here
enter description here

1
2
3
4
5
6
7
8
9
10
#安装MySQL5.7驱动
[root@wiki-test ~]# wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.48.tar.gz

#将 .jar 文件放入 /opt/atlassian/confluence/confluence/WEB-INF/lib,然后重启Confluence
[root@wiki-test ~]# tar -xf mysql-connector-java-5.1.48.tar.gz
[root@wiki-test ~]# cd mysql-connector-java-5.1.48/
[root@wiki-test mysql-connector-java-5.1.48]# cp *.jar /opt/atlassian/confluence/confluence/WEB-INF/lib

[root@wiki-test lib]# /etc/init.d/confluence stop
[root@wiki-test lib]# /etc/init.d/confluence start

• 刷新网页,注意数据库字符集必须为UTF8
enter description here
• 注意:总共会创建117张表,会比较慢,需要等待一段时间
enter description here
等待程序配置好数据库后即可完成安装了

5.3 数据备份恢复

5.3.1 备份

管理员登录conflucese——站点管理——一般配置——管理——备份与还原——导出网站
enter description here

5.3.2 恢复

拷贝备份zip包到新服务器/var/atlassian/application-data/confluence/restore 目录
管理员登录conflucese——站点管理——一般配置——管理——备份与还原——选中文件——导入
enter description here

导入完成,恢复成功。

5.4 问题

5.4.1 问题1

问题:恢复数据失败

原因:XML 备份包含导入尝试插入uniq_lwr_username user_mapping表的重复记录 = 用户 1(如上文所示)。

5.4.1.1 解决办法

参考 https://community.atlassian.com/t5/Confluence-questions/Unable-to-import-XML-space-to-Confluence-Server-exported-earlier/qaq-p/1307536
https://confluence.atlassian.com/confkb/confluence-site-xml-import-fails-with-duplicate-key-error-438993638.html
第 1 步:查找重复的用户键
运行下面的查询以获取重复用户的用户密钥:

1
2
3
4
5
SELECT * FROM user_mapping 
WHERE
username IS NULL OR
lower_username IS NULL OR
lower_username NOT LIKE lower(username);

结果应如下:
enter description here
第 2 步:删除重复的用户
删除 user_mapping表中的重复用户
enter description here
需要先删除content表中的用户记录
第 3 步:删除content表中的用户记录
根据第一步查询到的 “user_key”,查询content表中username字段进行匹配
enter description here
删除记录,然后返回第二步删除user_mapping表中的相应用户记录(如果删除中提示其他表字段关联,在其他表进行user_key匹配,删除相应记录)
第 4 步:重新备份
清理历史系统中的缓存数据,管理登录后台——管理——缓存管理——缓存统计——清除缓存

重新执行数据备份恢复步骤,问题解决。

5.4.2 问题2

confluence使用jira用户认证。

5.4.2.1 jira配置

(历史系统恢复后已经配置好,我这里重新进行了配置)
管理员后台——用户管理——jira用户服务器——添加应用程序——设置认证信息——保存
enter description here
enter description here

5.4.2.2 confluence配置

管理员后台——用户&安全——用户目录——下移Rmote jira Directory(可新建,这里修改原来的)——编辑——修改认证地址和认证信息——测试并保存——上移到第一位,同步——重新登录,认证成功。

6 内存优化

修改/bin/setenv.sh 文件默认配置。
参考
https://www.cnblogs.com/kevingrace/p/9413353.html

7 附件

-------------本文结束感谢您的阅读-------------

本文标题:jira/confluence安装

文章作者:OperationMAN

发布时间:2021年04月10日 - 09:04

最后更新:2022年06月05日 - 21:06

原始链接:https://kxinter.gitee.io/2021/04/10/jira-confluence安装/

许可协议: 署名-非商业性使用-禁止演绎 4.0 国际 转载请保留原文链接及作者。

坚持原创技术分享,您的支持将鼓励我继续创作!