Confluence安装

目录

Vagrant

1
vim sources.list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
1
vim Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.box_check_update = false
config.vm.host_name = "temp"
config.vm.network "private_network", ip: "192.168.56.202"
config.vm.provider "virtualbox" do |vb|
vb.name = "temp"
vb.cpus = "2"
vb.memory = "3000"
end
config.vm.provision "file", source: "sources.list", destination: "/tmp/sources.list"
config.vm.provision "shell", inline: <<-SHELL
sudo mv /tmp/sources.list /etc/apt/sources.list && sudo apt update
SHELL
end
1
2
3
vagrant up

vagrant ssh

Java

1
2
3
4
5
6
7
8
sudo apt update

sudo apt install -y openjdk-8-jdk

java -version
# openjdk version "1.8.0_242"
# OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~16.04-b08)
# OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

MySQL

1
2
3
4
5
6
7
sudo apt install -y mysql-server

mysql -uroot -p123456 <<< "CREATE DATABASE confdb CHARACTER SET utf8 COLLATE utf8_bin;"

mysql -uroot -p123456 <<< "SET GLOBAL tx_isolation='READ-COMMITTED';"

mysql -uroot -p123456 <<< "SHOW DATABASES;"

Confluence

1
2
3
4
5
6
7
8
9
10
wget https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.12.4-x64.bin

chmod +x atlassian-confluence-6.12.4-x64.bin

sudo ./atlassian-confluence-6.12.4-x64.bin
# Custom Install
# /opt/atlassian/confluence
# /var/atlassian/application-data/confluence
# Use default ports (HTTP: 8090, Control: 8000)
# Install Confluence as Service
1
2
3
4
5
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.48.tar.gz

tar xf mysql-connector-java-5.1.48.tar.gz

sudo cp mysql-connector-java-5.1.48/mysql-connector-java-5.1.48.jar /opt/atlassian/confluence/lib/

Crack

1
2
3
tar xf atlassian-agent-v1.2.3.tar.gz

sudo cp atlassian-agent-v1.2.3/atlassian-agent.jar /opt/atlassian/confluence/lib/
  • 重启Confluence服务
1
2
3
sudo /opt/atlassian/confluence/bin/stop-confluence.sh

sudo JAVA_OPTS="-javaagent:/opt/atlassian/confluence/lib/atlassian-agent.jar" /opt/atlassian/confluence/bin/start-confluence.sh

confluence-installation-01.png

记住上述服务器ID => B25K-N8RD-6XV8-A8UW

  • 生成破解Key
1
2
3
java -jar /opt/atlassian/confluence/lib/atlassian-agent.jar

java -jar /opt/atlassian/confluence/lib/atlassian-agent.jar -p conf -m yl33643@gmail.com -n yl33643 -o https://nuozhilin.site/ -s B25K-N8RD-6XV8-A8UW
  • 设置数据库

confluence-installation-02.png

  • 修复中文乱码
1
sudo vim /var/atlassian/application-data/confluence/confluence.cfg.xml
1
<property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/confdb?useUnicode=true&amp;characterEncoding=utf8</property>
1
2
3
sudo /opt/atlassian/confluence/bin/stop-confluence.sh

sudo JAVA_OPTS="-javaagent:/opt/atlassian/confluence/lib/atlassian-agent.jar" /opt/atlassian/confluence/bin/start-confluence.sh

Plugin

  • 站点管理 => 管理应用 => 安装 Markdown Macro for Confluence

参考