目录
Vagrant
vim sources.list
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
vim Vagrantfile
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
vagrant up
vagrant ssh
Java
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
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
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
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
tar xf atlassian-agent-v1.2.3.tar.gz
sudo cp atlassian-agent-v1.2.3/atlassian-agent.jar /opt/atlassian/confluence/lib/
- 重启Confluence服务
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
记住上述服务器ID => B25K-N8RD-6XV8-A8UW
- 生成破解Key
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
- 设置数据库
- 修复中文乱码
sudo vim /var/atlassian/application-data/confluence/confluence.cfg.xml
<property name="hibernate.connection.url">jdbc:mysql://127.0.0.1:3306/confdb?useUnicode=true&characterEncoding=utf8</property>
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