Confluence 7.4.X 科学版安装极详细说明

发布于 2021-04-02  387 次阅读


系统版本 centos7.6

confluence 版本 7.4.8

环境配置

1.备份系统CentOS-Base.repo

cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-bk

2.更新清华yum repo

sed \
-e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|g' \
-i.bak \
/etc/yum.repos.d/CentOS-Base.repo

3.安装工具

yum clean all
yum makecache
yum update -y
yum install unzip wget vim -y
yum install epel* -y
yum install net-tools -y
yum install java-1.8.0-openjdk-devel.x86_64 -y
yum install numactl -y 
yum install libaio -y
yum install git -y

4.关闭selinux

sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

正式安装

1.下载bin 文件  

mkdir -p /root/software && cd "$_"
wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-7.4.8-x64.bin

2.安装Mysql 5.7

1. 删除maria*    

rpm -qa | grep mariadb* | awk '{cmd="yum -y remove "$1;system(cmd)}

2. 安装Mysql 5.7

git clone https://github.com/tamageci86/mysql57.list && cd mysql57.list
wget -i mysql57.list && rpm -ivh mysql-community-client* mysql-community-libs* mysql-community-common* mysql-community-server-*

3. 开机启动

systemctl start mysqld
systemctl enable mysqld

4.获取mysql 初始密码  

cat /var/log/mysqld.log | grep password | awk '{print $NF}'

5.修改mysql密码

mysqladmin -u root -p password 
Enter password:
New password:  ## a9a9a9a9A@A@

6.建立数据库

CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'localhost' IDENTIFIED BY 'a9a9a9a9A@A@';
SET GLOBAL tx_isolation='READ-COMMITTED';
flush privileges;

7.修改my.cnf

cat << EOF >>/etc/my.cnf
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row
bind-address=127.0.0.1
EOF

3.下载必要软件

cd /root/software
wget https://gitee.com/pengzhile/atlassian-agent/attach_files/283101/download/atlassian-agent-v1.2.3.tar.gz
tar -zxvf atlassian-agent-v1.2.3.tar.gz
wget https://downloads.mysql.com/archives/get/p/3/file/mysql-connector-java-5.1.49.tar.gz
tar -zxvf mysql-connector-java-5.1.49.tar.gz

4.安装Conlfluence

cd /root/software
chmod +x atlassian-confluence-7.4.8-x64.bin
./atlassian-confluence-7.4.8-x64.bin
### 默认安装 直接按回车
Where should Confluence 7.4.8 be installed?  ###默认设置。按需修改
[/opt/atlassian/confluence]
Default location for Confluence data   ###默认设置。按需修改
[/var/atlassian/application-data/confluence]
image.png

启动之后

1.安装mysql驱动

cd /root/software
cp mysql-connector-java-5.1.49/mysql-connector-java-5.1.49-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/

2.安装破解

cp atlassian-agent-v1.2.3/atlassian-agent.jar /opt/atlassian/confluence/

3.修改变量

echo "export JAVA_OPTS="-javaagent:/opt/atlassian/confluence/atlassian-agent.jar ${JAVA_OPTS}"" >> /opt/atlassian/confluence/bin/setenv.sh

4.重启confluence

service confluence restart
service confluence stop #停止
service confluence start #启动

5.防火墙

firewall-cmd --permanent --zone=public --add-port=8090/tcp
firewall-cmd --permanent --zone=public --add-port=8080/tcp
firewall-cmd --reload

5.浏览器 进入配置

http:// 服务器 ip:8090
image.png
image.png
image.png

科学版本操作

记下服务器ID BVH4-VYP5-2THU-IFEI

在服务器中执行一下命令

java -jar /opt/atlassian/confluence/atlassian-agent.jar -p conf -m ABC@QQ.COM -n ABC -o ABC -s {服务器ID}
[root@centos76x64cnISO1810sT9X2 atlassian]# java -jar /opt/atlassian/confluence/atlassian-agent.jar -p conf -m ABC@QQ.COM -n ABC -o ABC -s BVH4-VYP5-2THU-IFEI

AAABNQ0ODAoPeJxtUMtugzAQvPsrLPXsBNyEhkiWmgBVkCCPApF6dOimWCIG2SZq+vV1gF6qSHvZ2

dnZnXnKqw6nXGE6x667pIsl9XGQ5Zg61EWBAm5EI0NugN0R4jwTOkfRldddP2FnXmtAIehSibZHC

lmLizDwiWtRgtSATzdcGdPq5XT6U4kaJqJBO/XFpdCDyGodoLKR5wkvjbgCM6oDFDTS2D5Kuajvj

NfDYRLs0oGYGa4MqPF8DyXDtfzWwpZfgFluGr0H8SpBVkIakFyWEH23Qt1GQwufOC+20LgbhyyJw

yzaksT1XM+bUd/xZ66HMlBXUHa8Pm5m5PixnxOabwoSv0Xx3/Jj5X2nyopr+B/hmM0RlL4nQAcP2

+5yArU7F9rijLjI/sIe/DNm0/u00fwCQiKQRzAtAhQNtROySaRXGauUkWuL/EaHusdFGgIVAJae/

C677P09y5lQXt1hyXkc7LEpX02ff

将刚才生成的 key 填入,破解完成;下一步继续;

image.png
image.png
image.png
image.png

一沙一世界,一花一天堂。君掌盛无边,刹那成永恒。