部署confluence
部署confluence
先新建文件夹
mkdir -p /data/confluence /data/mysql
安装mysql 8.0
cd /data/mysql
vi docker-compose.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"
创建my.cnf
vi my.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/
然后docker-compose up -d
用navicat连接数据库
创建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;
安装confluence
cd /data/confluence vi docker-compose.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:/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
ports:
- "80:8090"
restart: always
下载破解jar包,下载地址
将atlassian-agent.jar放到/data/confluence目录下
下载数据库驱动,下载地址
解压后,将mysql-connector-j-8.0.31.jar放到/data/confluence目录下
然后docker-compose up -d启动
破解
进入confluence界面
将server id:BDLN-5YV7-IJEM-P16F 复制出来,进入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:80 -s BDLN-5YV7-IJEM-P16F
下面是一些后续的截图
解决上传附件乱码问题
在confluence目录下创建windowsfonts,将c:\windows\fonts下所有字体上传到该目录下,再将服务器中的windowsfonts目录文件复制到容器中
docker cp windowsfonts confluence:/usr/share/fonts/
进入容器中,修改文件
docker exec -it confluence bash
apt-get update
apt-get install vim
vim /opt/atlassian/confluence/bin/setenv.sh
添加如下内容
CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/windowsfonts/ ${CATALINA_OPTS}"
先简单操作一下,先创建一个空间,然后创建页面。如下图
这里比方部分文件我想公开。部分文件不能让其他人访问,就可以设置权限。
创个新账号,进来就只能看到开放的文档
安装markdown插件
显示正常
再尝试了下协同编辑,一个用户在编辑的时候,编辑的内容另一个人同步会更新过来,这样就可以避免冲突,这点还是不错的。
导入word
先创建一个空白页,随便取个名字,然后保存。
excel的话直接复制粘贴就好,word直接复制粘贴有碰到格式会乱
License:
CC BY 4.0