本文共 2678 字,大约阅读时间需要 8 分钟。
docker pull cptactionhank/atlassian-confluence:6.10.0
root@harbor:~# mkdir /apps/confluence -pv
正式启动前拷贝confluence里面的数据
# 临时启动 (关闭后自动删除本次启动的容器)docker run -it --rm --name "confluence-wiki-tmp" \-u root \-p "8090:8090" \-v "/data/confluence:/var/atlassian/confluence" \-e "CATALINA_OPTS= -Xms256m -Xmx5g" \cptactionhank/atlassian-confluence:6.10.0
当可以访问 时,继续执行下面步骤
docker cp confluence-wiki-tmp:/opt/atlassian/confluence /apps
scp root@192.168.60.21:/apps/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar ./atlassian-extras-2.4.jar#或者使用其他的工具传输到window上,然后在重命名
注意:此处破解的文件也可以保留便于下次使用
这个步骤完成后就可以中断临时容器了,临时容器自动会删除
java -jar confluence_keygen.jar
点击
patch
、选择刚刚scp到本地的 atlassian-extras-2.4.jar 包,成功后、本地出现一个新atlassian-extras-2.4.jar
包、旧的jar包被重命名为atlassian-extras-2.4.bak
scp ./atlassian-extras-2.4.jar root@192.168.60.21:/apps/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar
将新的 jar 包上传到服务器的目录,并重命名回原来的名字
- 准备mysql的配置文件
mysql/mysql.cnf
[client]default-character-set = utf8[mysql]default-character-set = utf8[mysqld]character_set_server = utf8collation-server = utf8_bindefault-storage-engine = INNODBinnodb_log_file_size = 2GBbinlog_format = rowtransaction_isolation = READ-COMMITTEDmax_allowed_packet = 256M
# cat docker-compose.ymlversion: '2'services: mysql: image: mysql:5.7 volumes: - "./mysql/:/etc/mysql/conf.d/" - "/data/mysql:/var/lib/mysql" - "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" restart: always ports: - "3306:3306" environment: MYSQL_ROOT_PASSWORD: confluence MYSQL_DATABASE: confluence MYSQL_USER: ********** MYSQL_PASSWORD: ********** wiki: image: cptactionhank/atlassian-confluence:6.10.0 volumes: - "/apps/confluence:/opt/atlassian/confluence" - "/data/confluence:/var/atlassian/confluence" - "/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime" restart: always user: root ports: - "8090:8090" environment: - JAVA_OPTS: -Duser.timezone=Asia/Shanghai - CATALINA_OPTS: -Xms256m -Xmx7g depends_on: - mysql
docker-compose up -d
启动后、访问http://192.168.60.21:8090 、会自动继续之前的步骤
- 开始安装
- 从网页上获
取服务器ID
,填入破解器。点击gen
生成key、复制到网页点击下一步- 选择第二项连接mysql:
jdbc:mysql://mysql/confluence?useSSL=false
Confluence Home : /var/atlassian/confluence Confluence Installation : /opt/atlassian/confluence
tail -f /data/confluence/logs/atlassian-confluence.log
转载于:https://blog.51cto.com/bkmaster/2330426