採用以上工具,理論上能夠破解幾乎所有版本。java
# 啓動容器mysql docker run --name mysql \ --restart always \ -p 3306:3306 \ -e MYSQL_ROOT_PASSWORD=zagame10086 \ -v data_mysql_vol:/var/lib/mysql \ -v conf_mysql_vol:/etc/mysql/conf.d \ -v data_backup_vol:/backup \ -d mysql:5.7
MySQL所使用的配置文件my.cnf核心參數:mysql
[client] default-character-set = utf8 [mysql] default-character-set = utf8 [mysqld] character_set_server = utf8 collation-server = utf8_bin transaction_isolation = READ-COMMITTED
須要注意的是,Confluence須要使用utf8_bin,並將事務隔離策略設爲READ-COMMITTED。
git
--建立jira數據庫及用戶 --drop database jira; create database jira character set 'UTF8'; create user jira identified by 'jira'; grant all privileges on `jira`.* to 'jira'@'172.%' identified by 'jira' with grant option; grant all privileges on `jira`.* to 'jira'@'localhost' identified by 'jira' with grant option; flush privileges; --建立confluence數據庫及用戶 --drop database confluence; create database confluence character set 'UTF8'; create user confluence identified by 'confluence'; grant all privileges on `confluence`.* to 'confluence'@'%' identified by 'confluence' with grant option; grant all privileges on `confluence`.* to 'confluence'@'localhost' identified by 'confluence' with grant option; flush privileges; --設置confluence字符集 alter database confluence character set utf8 collate utf8_bin; -- confluence要求設置事務級別爲READ-COMMITTED set global tx_isolation='READ-COMMITTED'; --set session transaction isolation level read committed; --show variables like 'tx%';
JIRA 是一個缺陷跟蹤管理系統,爲針對缺陷管理、任務追蹤和項目管理的商業性應用軟件,開發者是澳大利亞的Atlassian。JIRA這個名字並非一個縮寫,而是截取自「Gojira」,日文的哥斯拉發音。 官網github
編寫Dockerfile文件:sql
FROM cptactionhank/atlassian-jira-software:7.12.0 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
- JIRA --Dockerfile --atlassian-agent.jar
docker build -t jira/jira:v7.12.0 .
# 啓動容器jira,並關聯mysql和confluence容器 docker run --name jira \ --restart always \ --link mysql:mysql \ --link confluence:confluence \ -p 9005:8080 \ -v data_jira_var:/var/atlassian/jira \ -v data_jira_opt:/opt/atlassian/jira \ -d jira/jira:v7.12.0
# 設置產品類型:-p jira, 詳情可執行:java -jar atlassian-agent.jar java -jar atlassian-agent.jar -d -m test@test.com -n BAT -p jira -o http://127.0.0.1 -s BACN-OTO2-ZDC9-CWVG
Atlassian Confluence(簡稱Confluence)是一個專業的wiki程序。它是一個知識管理的工具,經過它能夠實現團隊成員之間的協做和知識共享。官網docker
FROM cptactionhank/atlassian-confluence:6.13.0 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
- Confluence --Dockerfile --atlassian-agent.jar
docker build -f Dockerfile -t confluence/confluence:6.13.0 .
# 啓動容器confluence,並關聯mysql和jira容器 docker run --name confluence \ --restart always \ --link mysql:mysql \ --link jira:jira \ -p 9006:8090 \ -v data_confluence_vol:/home/confluence_data \ -v data_confluence_opt:/opt/atlassian/confluence \ -v data_confluence_var:/var/atlassian/confluence \ -d confluence/confluence:6.13.0
# 設置產品類型:-p conf, 詳情可執行:java -jar atlassian-agent.jar java -jar atlassian-agent.jar -d -m test@test.com -n BAT -p conf -o http://127.0.0.1 -s B6QG-R8VH-YCHH-8EY2
問題:
啓動後發現Confluence和Jira後臺都報錯以下:數據庫
WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
緣由:
MySQL5.7.6以上版本要默認要求使用SSL鏈接,若是不使用須要經過設置useSSL=false來聲明。瀏覽器
解決方案:
在mysql鏈接字符串url中加入useSSL=true或者false便可,以下:服務器
# Confluence找到配置文件/var/atlassian/confluence/confluence.cfg.xml修改mysql鏈接字符串以下: jdbc:mysql://mysql/confluence?useUnicode=true&characterEncoding=utf8&useSSL=false # Jira找到配置文件/var/atlassian/jira/dbconfig.xml修改mysql鏈接字符串以下: jdbc:mysql://address=(protocol=tcp)(host=mysql)(port=3306)/jira?useUnicode=true&characterEncoding=UTF8&sessionVariables=default_storage_engine=InnoDB&useSSL=false