通过Docker安装JIRA8.4.0与Confluence7.
2019-10-06 本文已影响0人
香芒羊
1.安装Mysql(5.7)
1.1 通过Docker安装
# 建立my-net docker 网络,用于各容器间的互联
docker network create -d bridge my-net
# 拉取mysql镜像
docker pull mysql:5.7
# 下面命令123456为数据库密码,自行修改
docker run --network my-net --name mysql5.7 -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7
1.2 根据JIRA要求修改mysql配置
Connecting Jira applications to MySQL 5.7,具体操作如下:
查看容器ID根据容器ID进入Docker容器
[root@localhost ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bb3b1dc59b3c mysql:5.7 "docker-entrypoint..." About an hour ago Up 13 minutes 3306/tcp, 33060/tcp mysql5.7
执行以下命令进行配置修改
docker cp mysql5.7:/etc/mysql/mysql.conf.d/mysqld.cnf /root/ # 将容器中配置文件拷出宿主机进行修改
vim /root/mysqld.cnf
在mysqld.cnf 最后增加以下内容
# Jira
default-storage-engine=INNODB
character_set_server=utf8mb4
innodb_default_row_format=DYNAMIC
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_log_file_size=2G
#Confluence
collation-server=utf8mb4_bin
max_allowed_packet=256M
transaction-isolation=READ-COMMITTED
binlog_format=row
保存返回,拷进容器原位置
docker cp /root/mysqld.cnf mysql5.7:/etc/mysql/mysql.conf.d/
根据容器ID重启mysql后重新进入容器
[root@localhost ~]# docker restart bb3b1dc59b3c
[root@localhost ~]# docker exec -it bb3b1dc59b3c /bin/bash
创建数据库表
mysql -uroot -p123456
# 若不安装JIRA可忽略
CREATE DATABASE jiradb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,REFERENCES,ALTER,INDEX on jiradb.* TO 'jira'@'%' IDENTIFIED BY 'jira';
GRANT ALL PRIVILEGES ON jiradb.* TO 'jira'@'%' IDENTIFIED BY 'jira';
# 若不安装Confluence可忽略
CREATE DATABASE confluencedb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON confluencedb.* TO 'confluence'@'%' IDENTIFIED BY 'confluence';
flush privileges;
至此Mysql数据库准备完毕。
2. 安装JIRA(8.4.0)
2.1 编写Dockerfile文件
#截至2019年9月11日,最新版本为8.4.0,后期出现新版本可指定8.4.0进行安装。
FROM cptactionhank/atlassian-jira-software:latest
USER root
# 将代理破解包加入容器
COPY "atlassian-agent.jar" /opt/atlassian/jira/
# 设置启动加载代理包
RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/jira/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/jira/bin/setenv.sh
2.2 下载atlassian-agent.jar文件(提取密码:88bq),放置在Dockerfile同目录下,例如:
--JIRA
--Dockerfile
--atlassian-agent.jar
2.3 构建镜像,执行命令
docker build -t jira/jira:8.4.0 .
结果如下:
Sending build context to Docker daemon 977.4 kB
Step 1/4 : FROM cptactionhank/atlassian-jira-8.4.0
Trying to pull repository docker.io/cptactionhank/atlassian-jira-software ...
8.4.0: Pulling from docker.io/cptactionhank/atlassian-jira-software
e7c96db7181b: Pull complete
f910a506b6cb: Pull complete
c2274a1a0e27: Pull complete
fe21625e8688: Pull complete
5d0577a15a84: Pull complete
Digest: sha256:d2b49e0bb88861ed01933814cd8df465da6b0953bf6532caae62115a2094fce4
Status: Downloaded newer image for docker.io/cptactionhank/atlassian-jira-software:8.4.0
---> df49560dd379
Step 2/4 : USER root
---> Running in 3ffaab5fb240
---> 4308d43c5dd7
Removing intermediate container 3ffaab5fb240
Step 3/4 : COPY "atlassian-agent.jar" /opt/atlassian/jira/
---> 41c6e11ab80c
Removing intermediate container e3c83801b1ca
Step 4/4 : RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/jira/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/jira/bin/setenv.sh
---> Running in 9960e53f1a14
---> 4dd7d8ecf195
Removing intermediate container 9960e53f1a14
Successfully built 4dd7d8ecf195
2.4 启动容器,执行命令:
[root@localhost JIRA]# docker run --detach --publish 8080:8080 --network my-net jira/jira:8.4.0
6fad2372fd58cd23bed937ba0b134a124e696c54a594c64af6cf41166c94c318
[root@localhost JIRA]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6fad2372fd58 jira/jira:8.4.0 "/docker-entrypoin..." 4 seconds ago Up 3 seconds 0.0.0.0:8080->8080/tcp vibrant_spence
2.5 访问http://127.0.0.1:8080,可见如下页面:
启动中...1选择语言、2选择手动配置项目(必须)
连接Mysql
破解重点
1.复制服务器ID:BY9B-GWD1-1C78-K2DE
2.在本地存放"atlassian-agent.jar"的目录下执行命令,生成许可证:
# 需替换邮箱(liangjiangji@dongriaf.com)、名称(J)、
# 访问地址(http://10.0.5.36)、服务器ID(B2CR-L5A6-WSC0-LVO9)
# 为你的信息
[root@localhost JIRA]# java -jar atlassian-agent.jar -d -m liangjiangji@dongriaf.com -n J -p jira -o http://10.0.5.36 -s B2CR-L5A6-WSC0-LVO9
====================================================
======= Atlassian Crack Agent =======
======= https://zhile.io =======
======= QQ Group: 30347511 =======
====================================================
Your license code(Don't copy this line!!!):
AAABnA0ODAoPeJyNkltPg0AQhd/5FSQ+gwvai002sQIxGGiNtPq8pdN2DV02s0u1/nqXgtpbGhNCA
plz5pszc/UGczsDaXueTfzBbW9AfPsxndg+8e6sJQKIVSkloJvwHISCyVbCiK2BBuM0jV6CeJhYA
QLTvBQh00BroUPuHM+zLkhCUDlyWavoVBR8zbUBKRqBPdvaK62lGlxff614AS4vrZRxoUEwkUP0K
Tlu2259061nHuudI/uhjOa8sR4lcRpPotAaVesZ4HgxVYCKOr9wF7wklvMq12794ahyoT8Ygntid
KGW5ZpvgGqs4CDL/f8X5IaKBWCmxqa0jefVNK6H862smv3FuCuJNqyodsugC1ao1v7YaIxLJrhq6
uqkTdAecYnbcW+6VlAKbQgjk3hBC87E8r153c9LsUTOFm5erhvn82n8c75MM6yZGtJ2IXFIkzjMo
pGTeJ1u3+sR4vv928P9njupDHADaOQPfvDiJJ1h13nLAuIkr+Ozl3x6I88V5ium4PiO98W7FCVy1
Y5nQOkZ2DbDHePTN8GyKaUwLAIUR9Oe3lS6WC/qfEZk1T+iWoj8C+0CFCCWOR6udCLC43n19vFgw
9j8Lh+gX02jr
将生成的许可证复制到页面,完成破解
完成
3.安装Confluence
3.1 编写Dockerfile文件
#截至2019年9月11日,最新版本为8.4.0,后期出现新版本可指定8.4.0进行安装。
FROM cptactionhank/atlassian-confluence:latest
USER root
# 将代理破解包加入容器
COPY "atlassian-agent.jar" /opt/atlassian/confluence/
# 设置启动加载代理包
RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/confluence/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/confluence/bin/setenv.sh
3.2 下载atlassian-agent.jar文件(提取密码:88bq),放置在Dockerfile同目录下,例如:
--CONF
--Dockerfile
--atlassian-agent.jar
3.3 构建镜像,执行命令
docker build -t confluence/confluence:7.0.0 .
结果如下:
Sending build context to Docker daemon 977.4 kB
Step 1/4 : FROM cptactionhank/atlassian-confluence:latest
Trying to pull repository docker.io/cptactionhank/atlassian-confluence ...
latest: Pulling from docker.io/cptactionhank/atlassian-confluence
e7c96db7181b: Already exists
f910a506b6cb: Already exists
c2274a1a0e27: Already exists
a22a496de2ab: Pull complete
aede11a4736a: Pull complete
Digest: sha256:aee4289a9e0e1af909c15d9c0031ecc738be933cb48c892235b6fe6fb3cdc536
Status: Downloaded newer image for docker.io/cptactionhank/atlassian-confluence:latest
---> 82e48dcfb7e7
Step 2/4 : USER root
---> Running in 01e3bbb57b36
---> 7e290e79ff32
Removing intermediate container 01e3bbb57b36
Step 3/4 : COPY "atlassian-agent.jar" /opt/atlassian/confluence/
---> 5cde771a88bb
Removing intermediate container b35488768727
Step 4/4 : RUN echo 'export CATALINA_OPTS="-javaagent:/opt/atlassian/confluence/atlassian-agent.jar ${CATALINA_OPTS}"' >> /opt/atlassian/confluence/bin/setenv.sh
---> Running in 783c7112f49b
---> 9b81d78c8f5e
Removing intermediate container 783c7112f49b
Successfully built 9b81d78c8f5e
3.4 启动容器,执行命令:
[root@localhost JIRA]# docker run --detach --publish 8090:8090 --network my-net confluence/confluence:7.0.0
b86712dbede9047ee8d39d7f72c39a5240133919c8926c7751697ad448ccfe0b
[root@localhost conf-docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b86712dbede9 confluence/confluence:7.0.0 "/docker-entrypoin..." 5 seconds ago Up 5 seconds 0.0.0.0:8090->8090/tcp, 8091/tcp elastic_wilson
53311f8c9ea0 jira/jira:8.4.0 "/docker-entrypoin..." About an hour ago Up About an hour 0.0.0.0:8080->8080/tcp ecstatic_hugle
ae779f7f676a mysql:5.7 "docker-entrypoint..." About an hour ago Up About an hour 0.0.0.0:3306->3306/tcp, 33060/tcp mysql5.7
3.5 访问http://ip:8090,参照前面JIRA配置流程进行设置,安装过程可与JIRA关联
3.6 生成授权码
# 设置产品类型:-p conf, 详情可执行:java -jar atlassian-agent.jar
java -jar atlassian-agent.jar -d -m liangjiangji@dongriaf.com -n j -p conf -o http://10.0.5.36 -s BLFI-DH5F-3QKA-1921
3.7进入Confluence容器,并新建/home/confluence/文件夹
docker exec -it b86712dbede9 /bin/bash
cd /home
mkdir confluence
配置页面
连接数据库
参考连接:
https://zhile.io/2018/12/20/atlassian-license-crack.html
https://www.jianshu.com/p/b95ceabd3e9d
Confluence乱码问题处理