搭建E*專案與事務跟蹤工具(jira安裝與破解)
阿新 • • 發佈:2018-11-13
一、需求說明:
搭建E*專案與事務跟蹤工具,應用於需求收集、流程審批、任務跟蹤、專案跟蹤和敏捷管理、缺陷跟蹤、客戶服務等工作。
二、伺服器環境
個人主機:可以訪問內外網。
11.11.180.136:內網伺服器主機,無法訪問外網,部署有docker私有倉庫。
11.11.180.137:內網伺服器主機,無法訪問外網,在伺服器上部署docker jira供專案組使用。
三、方案
遠端倉庫 —pull—> 個人主機 —push—> 到11.11.180.136的docker私有倉庫—pull—>11.11.180.137 啟動jira服務。
四、操作步驟
步驟一、遠端倉庫 —pull docker 映象—> 到個人主機
個人主機連線外網
1、配置映象加速:
https://hub.docker.com/
https://c.163yun.com/hub
sudo vim /etc/docker/daemon.json
{
"registry-mirrors":["https://gbcl5ijl.mirror.aliyuncs.com"],
}
2、pull docker 映象
jira:v7.12.3 mysql:5.7
docker pull cptactionhank/atlassian-jira-software docker pull mysql:5.7
2、檢視本地 docker 映象
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql 5.7 1b30b36ae96a 8 days ago 372MB
cptactionhank/ atlassian-jira-software latest d5c145cb0955 11 days ago 505MB
步驟二、個人主機 —push—> 到11.11.180.136的docker私有倉庫
個人主機連線內網
1、配置11.11.180.136的docker私有倉庫地址:
sudo vim /etc/docker/daemon.json
{
"registry-mirrors":["https://gbcl5ijl.mirror.aliyuncs.com"],
"insecure-registries":["11.11.180.136:5000"]
}
2、push之前對個人主機本地映象重新tag
docker tag <img_name>:<tag> <host>/<project>/<repo>:<tag>
docker tag mysql:5.7 11.11.180.136:5000/mysql:5.7
docker tag cptactionhank/atlassian-jira-software 11.11.180.136:5000/cptactionhank/atlassian-jira-software
3、檢視本地 docker 映象
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
11.11.180.136:5000/mysql 5.7 1b30b36ae96a 9 days ago 372MB
mysql 5.7 1b30b36ae96a 9 days ago 372MB
11.11.180.136:5000/cptactionhank/atlassian-jira-software latest d5c145cb0955 13 days ago 505MB
cptactionhank/atlassian-jira-software latest d5c145cb0955 13 days ago 505MB
4、push到11.11.180.136的docker私有倉庫地址:
docker push <host>/<project>/<repo>:<tag>
docker push 11.11.180.136:5000/mysql:5.7
5、檢視11.11.180.136的docker私有倉庫中的映象
curl -XGET http://11.11.180.136:5000/v2/_catalog
{"repositories":["cptactionhank/atlassian-jira-software","esp-admin","esp-registry","esp-registry-test","gitlab/gitlab-ce","mysql","redis","registry"]}
步驟三、到11.11.180.136的docker私有倉庫—pull—>11.11.180.137 啟動jira服務
登陸11.11.180.137伺服器
1、配置11.11.180.136的docker私有倉庫地址:
sudo vim /etc/docker/daemon.json
{
"registry-mirrors":["https://gbcl5ijl.mirror.aliyuncs.com"],
"insecure-registries":["11.11.180.136:5000"]
}
3、從11.11.180.136 pull docker 映象
docker pull 11.11.180.136:5000/cptactionhank/atlassian-jira-software
docker pull 11.11.180.136:5000/mysql:5.7
2、檢視本地 docker 映象
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
11.11.180.136:5000/mysql 5.7 1b30b36ae96a 9 days ago 372 MB
11.11.180.136:5000/cptactionhank/atlassian-jira-software latest d5c145cb0955 13 days ago 505 MB
2、啟動mysql docker例項
docker run --name atlassian-mysql --restart always -p 3306:3306 -v /opt/mysql_data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d 11.11.180.136:5000/mysql:5.7 #記得修改passwd
3、連線mysql
docker run -it --link atlassian-mysql:mysql --rm 11.11.180.136:5000/mysql:5.7 sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
-----link list Add link to another container (default [])
4、建立jira資料庫,並新增jira使用者 【mysql操作檯執行】
create database jira default character set utf8 collate utf8_bin;
CREATE USER `jira`@`%` IDENTIFIED BY 'jira';GRANT ALL ON *.* TO `jira`@`%` WITH GRANT OPTION;
alter user 'jira'@'%' identified with mysql_native_password by 'jira';
5、修改mysql事物隔離級別 【mysql操作檯執行】
set global transaction isolation level read committed;
set session transaction isolation level read committed;
6、啟動jira例項
docker run --detach --restart always -v /data/atlassian/jira:/home --publish 8080:8080 11.11.180.136:5000/cptactionhank/atlassian-jira-software
--restart選項,可以設定容器的重啟策略,以決定在容器退出時Docker守護程序是否重啟剛剛退出的容器。
--restart選項通常只用於detached模式的容器。
預設 Foregroud前臺模式
7、檢視執行中的容器
docker ps |grep atlassian
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0982e769672a 11.11.180.136:5000/cptactionhank/atlassian-jira-software "/docker-entrypoin..." 42 hours ago Up 26 hours 0.0.0.0:8088->8080/tcp keen_stallman
0f73e4326f53 11.11.180.136:5000/mysql:5.7 "docker-entrypoint..." 43 hours ago Up 43 hours 0.0.0.0:3306->3306/tcp, 33060/tcp atlassian-mysql
8.訪問:11.11.180.137:8080 進行jira配置。
步驟四、破解jira
1、下載 atlassian-extras-3.1.2.jar 破解檔案
個人主機下載:atlassian-extras-3.1.2.jar
2、個人主機拷貝到11.11.180.137伺服器/opt目錄下
scp /home/sharps/下載/atlassian-jira-7.3.X-7.4.X/atlassian-jira-7.3.6-crack/atlassian-extras-3.1.2.jar [email protected]:/opt
atlassian-extras-3.1.2.jar 下載地址:http://down.drv5.cn/www.drv5.cn/atlassian-jira-7.3.X-7.4.X.rar
3、jira應用伺服器進行破解
—0982e769672a為jira容器短id
*登陸11.11.180.137:
ssh 11.11.180.137
*備份:atlassian-extras-3.2.jar 檔案
docker exec --user root 0982e769672a mv /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar /opt/atlassian/jira/atlassian-jira/WEB-INF/lib/atlassian-extras-3.2.jar_bak
*atlassian-extras-3.1.2.jar 拷貝到11.11.180.137伺服器jira路徑下。
docker cp /opt/atlassian-extras-3.1.2.jar 97:/opt/atlassian/jira/atlassian-jira/WEB-INF/lib/
*登陸容器檢視修改是否正確
docker exec -it 0982e769672a bash
*重啟服務
docker restart 0982e769672a