下载链接

链接:https://pan.baidu.com/s/1bzgFgzSA-sf4gWaofYaIzg
提取码:llpx

创建 Mysql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 下载mysql源安装包
wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

# 安装mysql源
yum localinstall mysql57-community-release-el7-8.noarch.rpm -y

# 检查mysql源是否安装成功
yum repolist enabled | grep "mysql.*-community.*"

# 安装MySQL (5.7需绕过验证)

yum install mysql-community-server -y --nogpgcheck


# 3、启动MySQL服务
systemctl start mysqld

# 查看MySQL的启动状态
systemctl status mysqld


#4、开机启动
systemctl enable mysqld
systemctl daemon-reload

# 5、修改root本地登录密码
# mysql安装完成之后,在/var/log/mysqld.log文件中给root生成了一个默认密码。通过下面的方式找到root默认密码,然后登录mysql进行修改:
grep 'temporary password' /var/log/mysqld.log
mysql -uroot -p

# mysql5.7默认安装了密码安全检查插件(validate_password),默认密码检查策略要求密码必须包含:大小写字母、数字和特殊符号,
# 并且长度不能少于8位。否则会提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements错误

# 如果不需要密码策略,添加my.cnf文件中添加如下配置禁用即可:
# 配置默认编码为utf8
# 关闭客户端dns反解

echo -e "validate_password = off\ncharacter_set_server=utf8\ninit_connect='SET NAMES utf8'\nskip-name-resolve\n" >> /etc/my.cnf
systemctl restart mysqld

mysql -uroot -p

## 授权
alter user 'root'@'localhost' identified by '123123';

grant all privileges on *.* to root@'%' identified by '123123' with grant option;
flush privileges;

创建库并设置事务隔离级别

1
2
3
4
5
6
7
8
9
10
11
12
13
14
create database confluence character set utf8 collate utf8_bin; 
create user 'confluence'@'localhost' identified by 'Aipf@123';
grant all privileges on confluence.* to 'confluence'@'localhost';
flush privileges;

# 设置事务隔离级别
vim /etc/my.cnf
[mysqld]
...
character_set_server=utf8
init_connect='SET NAMES utf8'
collation_server=utf8_bin
transaction-isolation=READ-COMMITTED
...

启动 confluence

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
chmod +x *
[root@localhost confluence]# ll
total 700296
-rw-r--r-- 1 root root 1016719 Feb 7 10:39 atlassian-agent-v1.2.3.tar.gz
-rwxr-xr-x 1 root root 713665840 Jan 25 16:46 atlassian-confluence-7.10.2-x64.bin
-rw-r--r-- 1 root root 2415211 Feb 7 10:39 mysql-connector-java-8.0.23.jar

# 安装 confluence
[root@localhost confluence]# ./atlassian-confluence-7.10.2-x64.bin

# 安装mysql 驱动
mkdir -p /opt/atlassian/confluence/confluence/WEB-INF/lib/
cp mysql-connector-java-8.0.23.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/

# 修改启动配置文件
[root@localhost confluence]# tar xf atlassian-agent-v1.2.3.tar.gz
[root@localhost confluence]#
[root@localhost confluence]# cd atlassian-agent-v1.2.3
[root@localhost atlassian-agent-v1.2.3]#
[root@localhost atlassian-agent-v1.2.3]#
[root@localhost atlassian-agent-v1.2.3]# ll
total 1100
-rw-r--r-- 1 501 games 974241 Oct 10 2019 atlassian-agent.jar
-rw-r--r-- 1 501 games 35149 Dec 5 2018 LICENSE
-rw-r--r-- 1 501 games 109486 Dec 10 2018 README.pdf
-rw-r--r-- 1 501 games 62 Oct 10 2019 shasum.txt
[root@localhost atlassian-agent-v1.2.3]# cp atlassian-agent.jar /opt/atlassian/confluence/
[root@localhost atlassian-agent-v1.2.3]#
[root@localhost atlassian-agent-v1.2.3]# vi /opt/atlassian/confluence/bin/setenv.sh
添加一行
CATALINA_OPTS="-javaagent:/opt/atlassian/confluence/atlassian-agent.jar ${CATALINA_OPTS}"

# 启动 confluence
/opt/atlassian/confluence/bin/start-confluence.sh

# 访问浏览器
IP:port

流程为:
语言选择:中文
Production Installation ->
产品安装 ->
直接下一步 ->
复制服务器 ID ->

### 创建conluencr 的key
java -jar /opt/atlassian/confluence/atlassian-agent.jar -p conf -m chao@6668888.com -n chao -o https://www.cnjzayuan.com -s BD0F-U980-Q3FQ-IUXO

->
key复制后,连接数据库配置