需要的环境

jdk1.8环境

# java -version
# java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

mysql5.6环境

# mysql -V
mysql Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using EditLine wrapper

mysql创建用户与数据库

mysql> create database confluence character set UTF8;
mysql> grant all on confluence.* to confluence@"%" identified by "confluence";
mysql> grant all on confluence.* to confluence@"localhost" identified by "confluence";
mysql> FLUSH PRIVILEGES;

下载安装confluence

# curl -o atlassian-confluence-5.6.6-x64.bin https://downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-5.6.6-x64.bin
# chmod +x atlassian-confluence-5.6.6-x64.bin
#./atlassian-confluence-5.6.6-x64.bin

This will install Confluence 5.6.6 on your computer.
OK [o, Enter], Cancel [c]
o
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]
1
See where Confluence will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/confluence
Home Directory: /var/atlassian/application-data/confluence
HTTP Port: 8090
RMI Port: 8000
Install as service: Yes
Install [i, Enter], Exit [e]
i
Extracting files ...
Please wait a few moments while Confluence starts up.
Launching Confluence ...
Installation of Confluence 5.6.6 is complete
Your installation of Confluence 5.6.6 is now ready and can be accessed via
your browser.
Confluence 5.6.6 can be accessed at http://localhost:8090
Finishing installation ...

访问web

访问http://localhost:8090

confluence中文与mysql驱动

https://pan.baidu.com/s/1iMR8xJsKuXPKzkY5ZfxjMA

Confluence-5.6.6-language-pack-zh_CN.jar    中文语言包

mysql-connector-java-5.1.42-bin.jar                  mysql驱动包

FTP 放入/opt/atlassian/confluence/confluence/WEB-INF/lib

破解工具

https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.rar

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

通过FTP将atlassian-extras-2.4.jar传到本地

# sz atlassian-extras-2.4.jar    

cmd命令行里运行破解器confluence_keygen.jar

# java -jar confluence_keygen.jar       

弹出窗口,输入name,Server ID,点击.patch!

选中破解包中的atlassian-extras-2.4.jar文件,打开

点击.gen!,这时先前访问页面中的License Key就出来了,复制Key关闭窗口

破解之后的atlassian-extras-2.4jar文件会出现一个atlassian-extras-2.4.bak文件

将破解后的atlassian-extras-2.4jar上传到/opt/atlassian/confluence/confluence/WEB-INF/lib目录下

# /etc/init.d/confluence restart   #重启confluence    

web界面配置

web界面License Key输入key密钥,选择数据库进行连接

创建管理用户

配置邮箱

# vim /opt/atlassian/confluence/conf/server.xml
<Manager pathname=""/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60"/>
<!--QQ企业邮箱配置-->
<Resource name="mail/QqSMTPServer"
auth="Container"
type="javax.mail.Session"
mail.smtp.host="smtp.exmail.qq.com"
mail.smtp.port="465"
mail.smtp.auth="true"
mail.smtp.user="邮箱"
password="授权码"
mail.smtp.starttls.enable="true"
mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory"
/>
<!--QQ企业邮箱配置-->

# mkdir -p /opt/upload/mail-jar/ && cd /opt/upload/mail-jar
# wget 'https://maven.java.net/content/repositories/releases/com/sun/mail/javax.mail/1.6.1/javax.mail-1.6.1.jar'
# wget 'https://maven.java.net/content/repositories/releases/javax/mail/javax.mail-api/1.6.1/javax.mail-api-1.6.1.jar'
# wget 'https://maven.java.net/content/repositories/releases/com/sun/mail/mailapi/1.6.1/mailapi-1.6.1.jar'
# wget 'https://maven.java.net/content/repositories/releases/com/sun/mail/smtp/1.6.1/smtp-1.6.1.jar'
# mv * /opt/atlassian/confluence/lib
# cd /opt/atlassian/confluence/lib && rm -rf mail-1.4.5.jar
# /etc/init.d/confluence restart

java:comp/env/mail/QqSMTPServer

[

邮件发送成功

用户注册

设置=>用户管理=>用户注册选项