confluence搭建踩坑全过程

confluence搭建踩坑全过程
环境准备:
操作系统:Centos7.9
数据库:mysql5.7
java版本: jdk-1.8
confluence版本:confluence7.14.2

安装过程

wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-7.14.2-x64.bin
chmod +x atlassian-confluence-7.14.2-x64.bin

Regenerating the font cache
Fonts and fontconfig have been installed
Unpacking JRE ...
Starting Installer ...

This will install Confluence 7.14.2 on your computer.
OK [o, Enter], Cancel [c]
o
Click Next to continue, or Cancel to exit Setup.

Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]
选择2,自定义安装

指定安装的目录,会自动创建,不输入直接回车就是使用默认路径
Select the folder where you would like Confluence 7.14.2 to be installed,
then click Next.
Where should Confluence 7.14.2 be installed?
[/opt/atlassian/confluence]

指定路径存储数据
Default location for Confluence data
[/var/atlassian/application-data/confluence]

使用默认的端口8090和8000
Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.
Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
2

HTTP Port Number
[8090]

Control Port Number
[8000]
8091

确定开始安装
Confluence can be run in the background.
You may choose to run Confluence as a service, which means it will start
automatically whenever the computer restarts.
Install Confluence as Service?
Yes [y, Enter], No [n]
y

Please wait a few moments while we configure Confluence.

Installation of Confluence 7.14.2 is complete
Start Confluence now?
Yes [y, Enter], No [n]
y

Please wait a few moments while Confluence starts up.
Launching Confluence ...

Installation of Confluence 7.14.2 is complete
Your installation of Confluence 7.14.2 is now ready and can be accessed via
your browser.
Confluence 7.14.2 can be accessed at http://localhost:8090
Finishing installation ...

破解过程

# 环境准备
在一台安装Java环境的WIN or Mac电脑上破解,跨系统可用奶牛快传工具传输
可通过清华镜像源下载Java环境包
https://mirrors.tuna.tsinghua.edu.cn/AdoptOpenJDK/8/jdk/x64/windows/
然后改名,移动位置,并配置WIN的环境变量
最后通过cmd Java命令检查Java环境安装是否成功。 若windows上执行Linux命令,可安装小型git bash 工具
$ cd /opt/atlassian/confluence/confluence/WEB-INF/lib
$ cp atlassian-extras-decoder-v2-3.4.1.jar /root
将atlassian-extras-decoder-v2-3.4.1.jar下载改名为atlassian-extras-2.4.jar
运行 java -jar  confluence_keygen.jar 点击 .path 上传atlassian-extras-2.4.jar 进行破解
点击.gen 获取lic密钥,serverID填写confluence看到的地址, jar包与密钥得同步
破解成功后,jar包会被替换,把替换后的jar放回linux环境下原目录下 改回原来的名字

$ mv /opt/atlassian-extras-2.4.jar /opt/atlassian-extras-decoder-v2-3.3.0.jar
$ mv /opt/atlassian-extras-decoder-v2-3.3.0.jar /opt/atlassian/confluence/concluence/WEB-INF/lib/

# 此时可启动服务获取ServerID 
$ sh /opt/atlassian/confluence/bin/stop-confluence.sh
$ sh /opt/atlassian/confluence/bin/start-confluence.sh

访问confluence页面http://URL:8090

数据库准备

mysql> create database confluence default character set utf8 collate utf8_bin;
mysql> grant all on confluence.* to 'confluence'@'%' identified by '123456';

#set utf8 collate utf8_bin 不加此选项后续链接mysql测试会报错。

重启服务

$ sh /opt/atlassian/confluence/bin/stop-confluence.sh
$ sh /opt/atlassian/confluence/bin/start-confluence.sh

出错归纳

1、无法连接mysql

# 数据库连接mysql提示需要插件,默认提供下载网址,正规下载需要注册oracle账号,可通过wget直接下载

前往 数据库 JDBC 驱动程序并下载相应的驱动程序。驱动程序文件将被称为类似 mysql-connector-java-5.1.xx-bin.jar
将 .jar 文件放到您的 <installation-directory>/confluence/WEB-INF/lib 目录中。
重新启动 Confluence,然后 http://localhost:<port> 在浏览器中转到 以继续设置过程。

wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.27.tar.gz
重启confluence服务,可连接mysql数据库

2、连接mysql时报错

# 出错提示
You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable); nested exception is java.sql.SQLException: You do not have the SUPER privilege and binary logging is enable

#解决办法:
参考:https://blog.csdn.net/u012414590/article/details/62036996
参考:https://confluence.atlassian.com/confkb/database-troubleshooting-for-mysql-13138.html

# 提示包允许容量太小,默认为4M,还有一些报错,可根据提示百度或谷歌一下能解决
数据库中添加,confluence官方文档中也有步骤,可参考下。
[mysqld]
transaction-isolation= READ-COMMITTED
max_allowed_packet = 256M
default-character-set=utf8

添加LDAP

参考:https://www.jianshu.com/p/b032c7fc58db/

添加邮箱服务器

参考:https://www.yisu.com/zixun/4137.html

其他参考链接:

https://www.cnblogs.com/taylorshi/p/12346245.html
https://cloud.tencent.com/developer/article/1162468
https://www.cwiki.us/display/CONFLUENCEWIKI/Database+JDBC+Drivers
https://confluence.atlassian.com/doc/running-confluence-behind-nginx-with-ssl-858772080.html


标签:service
版权属于:lingchen 所有,采用《知识署名-非商业性使用许可协议》进行许可,转载请注明文章来源。

本文链接: https://www.yfzblog.cn/service/cf.html

赞 (0)

评论区

评论一下~


40+48=?

已有 1 条评论

lingchen
作者

针不戳 OωO

回到顶部