准备安装目录
采用docker来进行部署,前提是先安装完docker。
1、在/opt/目录下创建2个目录
/opt/atlassian
/opt/atlassian/confluence
准备atlassian-agent.jar文件
文件解压之后,放到atlassian目录下面
下载地址: https://download.csdn.net/download/u014388408/13043522
编写confluence对应Dockerfile文件
FROM cptactionhank/atlassian-confluence:latest 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
构建镜像
在atlassian目录下执行
sudo docker build -t confluence/confluence:latest .
执行完毕之后,在末尾显示 Successfully built …
代表执行成功。
启动容器
在atlassian目录下执行
sudo docker run -d -p 18008:8080 confluence/confluence:latest
提示类似如下一串码,则启动成功:
9e1a98d0fb6a841e89a6511ce58c473b6b2dd17d22580b0540ac3be891a
浏览器界面进行设置
http://IP地址:18008
许可关键字的生成:
在atlassian-agent.jar的目录下执行:
java -jar atlassian-agent.jar -d -m xxxxxx@qq.com -n jmcqj -p conf -o http://IP地址:18009 -s BFXL-ZQGP-45U5-1PZX
拷贝至输入框,点击“下一步”
点击“空白站点”或“示例站点”
数据库设置:
还没有数据库,可以通过以下方式创建;
CREATE USER confuser IDENTIFIED BY 'conf'; GRANT ALL PRIVILEGES ON *.* TO 'confuser' @'%' IDENTIFIED BY 'conf' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'confuser' @'localhost' IDENTIFIED BY 'conf' WITH GRANT OPTION; FLUSH PRIVILEGES; show variables like 'tx%'; SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;