docker confluence

  • mysqld 配置:
1
2
3
4
5
6
7
8
9
[mysqld]
default-storage-engine=INNODB
binlog_format=row
transaction-isolation=READ-COMMITTED
innodb_log_file_size = 2GB
max_allowed_packet = 512M
character-set-server=utf8
collation-server=utf8_bin
// sql_mode = NO_AUTO_VALUE_ON_ZERO # 必须不指定这个
  • 启动 docker
1
docker-compose up -d

docker-compose.yml:

1
2
3
4
5
6
7
8
9
10
11
12
confluence:
image: 'atlassian/confluence-server:latest'
restart: always
container_name: confluence
privileged: true
environment:
- CATALINA_OPTS=-Xms4G -Xmx4G
ports:
- '8090:8090'
- '8091:8091'
volumes:
- '/data/confluence:/var/atlassian/application-data/confluence'
  • 拷贝 atlassian-extras-decoder-v2-3.4.1.jar 到本地并破解
1
docker cp <containerId>:/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar ./

破解文件:

http://blog.i-driven.com.cn/public/confluence_crack.zip

  • 拷贝破解文件和 mysql 驱动文件
1
2
3
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
docker cp ./atlassian-extras-2.4.jar <containerId>:/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar
docker cp ./mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar <containerId>:/opt/atlassian/confluence/confluence/WEB-INF/lib/
  • 配置 mysql 时,选择 连接字符串:
1
jdbc:mysql://192.168.1.111:3306/confluence?useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false

如果有问题,定位到 /var/atlassian/application-data/confluence/confluence.cfg.xml, 查看 hibernate.connection.url 配置是否与上面的连接字符串一致

参考资料:

https://zhuanlan.zhihu.com/p/34182497
https://blog.whsir.com/post-2997.html
https://www.jianshu.com/p/1813bf05f71e