创建confluence部署目录confluence
cd / mkdir -p /data/confluence /data/mysql
安装MySQL 8.0
confluence可以使用MySQL5.x、8.x,postgres等数据库,本次安装使用MySQL8.0.
编写MySQL的docker-compose
进入/data/mysql目录下,创建docker-compose-mysql.yml文件
vi /data/mysql/docker-compose-mysql.yml
version: '3.2' services: mysql: container_name: mysql environment: MYSQL_ROOT_PASSWORD: "mysql" image: "mysql:latest" restart: always volumes: - "/etc/timezone:/etc/timezone" - "/etc/localtime:/etc/localtime" - "./data:/var/lib/mysql" - "./config:/etc/mysql/conf.d" - "./my.cnf:/etc/my.cnf" command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --explicit_defaults_for_timestamp=true ports: - "3306:3306" - "33060:33060"
在/data/mysql目录下创建my.cnf文件,编辑如下内容
vi /data/mysqlmy.cnf
#dvice on how to change settings please see # http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html [mysqld] skip-host-cache skip-name-resolve datadir=/var/lib/mysql socket=/var/run/mysqld/mysqld.sock secure-file-priv=/var/lib/mysql-files character-set-server=utf8mb4 collation-server=utf8mb4_bin default-storage-engine=INNODB max_allowed_packet=256M innodb_log_file_size=2GB transaction-isolation=READ-COMMITTED binlog_format=row log_bin_trust_function_creators = 1 pid-file=/var/run/mysqld/mysqld.pid [client] socket=/var/run/mysqld/mysqld.sock !includedir /etc/mysql/conf.d/
启动mysql:
docker-compose -f /data/mysql/docker-compose-mysql.yml up -d mysql
进入mysql:
docker exec -it mysql bash
创建用户和数据库
mysql -uroot -pmysql
创建confluence数据库
CREATE DATABASE confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; CREATE user 'confluenceuser'@'%' IDENTIFIED BY 'confluenceuser'; GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'%' WITH GRANT OPTION;
进入/data/confluence目录,编写confluence的docker-compose文件
编写confluence的docker-compose.yml文件
vi /data/confluence/docker-compose-confluence.yml
version: '3' services: confluence: container_name: confluence image: "atlassian/confluence-server" volumes: - "/etc/timezone:/etc/timezone" - "/etc/localtime:/etc/localtime" - ./atlassian-agent.jar:/var/atlassian/atlassian-agent.jar - ./mysql-connector-j-8.0.31.jar:/opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-j-8.0.31.jar - /data/confluence/data:/var/atlassian/application-data/confluence environment: - JAVA_OPTS="-javaagent:/var/atlassian/atlassian-agent.jar" - JVM_MINIMUM_MEMORY=2048m - JVM_MAXIMUM_MEMORY=2048m - JVM_RESERVED_CODE_CACHE_SIZE=512m #以下配置仅使用nginx做反向代理后(SSL) 使用 - ATL_PROXY_NAME=doc.peos.cn - ATL_PROXY_PORT=443 - ATL_TOMCAT_PORT=8090 - ATL_TOMCAT_SCHEME=https - ATL_TOMCAT_SECURE=false ports: - "8090:8090" restart: always
下载破解jar包
百度云盘下载破解jar包 atlassian-agent.jar
链接:https://pan.baidu.com/s/1zEwEh99rC2wAnR7Bwzcj2A
提取码:5u04
将下载的jar包atlassian-agent.jar放到/data/confluence目录下
下载数据库驱动
下载MySQL8.0数据库驱动包:mysql-connector-j-8.0.31.zip mysql-connector-j-8.0.31.jar
将下载的MySQL驱动包放到/data/confluence目录下进行使用。
注意: MySQL数据库驱动版本必须高于或者等于8.0.31否则在破解后重启容器时可能会遇到无法连接数据库、找不到驱动类等问题。
启动容器
docker-compose -f docker-compose-confluence.yml up -d
1
破解
访问启动成功的confluence应用地址,例如:http://192.168.10.100:8090
将图中的server id:BT3G-DE5G-31DD-GMSW 复制出来,进入confluence容器内的atlassian-agent.jar目录,执行破解命令:
docker exec -it confluence bash cd /var/atlassian/ java -jar atlassian-agent.jar -d -m test@test.com -n BAT -p 'conf' -o http://localhost:8090 -s BT3G-DE5G-31DD-GMSW
将生成的key复制出来,填入进行验证即可。
注意: key必须不能换行和有空格
登陆http://xxxxx:8090
配置数据库
============ 欢迎各位老板打赏~ ===========
与本文相关的文章
- · docker-compose安装phpmyadmin
- · Amazon Linux 2023 安装Docker和Docker Compose
- · 修改Docker的默认网段
- · docker定时任务Mysql脚本
- · 解决Linux实例磁盘空间满问题
- · failed to fetch metadata: fork/exec /home/appuser/.docker/cli-plugins/docker-buildx: exec format error
- · Docker登录login报错Error saving credentials
- · docker安装mysql8注意事项
- · 黑群晖docker无法pull镜像,x509错误解决方法
- · k3s+kuboard快速搭建K8s生产环境集群
- · 解决es报错:blocked by: [FORBIDDEN/12/index read-only / allow delete (api) ]
- · filebeat按docker容器名创建不同的索引