(1)安装jdk1.8
参考:https://blog.csdn.net/u010080562/article/details/128164073
(2)安装mysql数据库
参考:https://blog.csdn.net/u010080562/article/details/128051396
这里下载的是atlassian-confluence-7.19.7.tar.gz
官网下载链接:https://www.atlassian.com/zh/software/confluence/download-archives
(1)创建安装目录
mkdir -p /data/wiki/confluence
(2)上传安装包并解压
将下载的atlassian-confluence-7.19.7.tar.gz安装包上传到/data/wiki/confluence目录下并解压
cd /data/wiki/confluence
tar -zxvf atlassian-confluence-7.19.7.tar.gz
ll /data/wiki/confluence
(3)配置数据目录
编辑confluence-init.properties文件
vi atlassian-confluence-7.19.7/confluence/WEB-INF/classes/confluence-init.properties
在文件末尾添加如下内容
confluence.home=/data/wiki/confluence
(4)启动confluence
cd /data/wiki/confluence/atlassian-confluence-7.19.7/bin
./start-confluence.sh
(5)安装数据库驱动
我这里mysql是8.0.17版本,驱动使用的是8.0.29
将mysql-connector-java-8.0.29.jar驱动上传到/data/wiki/confluence/atlassian-confluence-7.19.7/confluence/WEB-INF/lib目录下
注意:这里使用驱动版本不同(使用8.0.17版本驱动有问题),可能会导致创建数据库相关表失败,从而导致后续操作无法进行下去
(6)修改mysql配置文件my.cnf
在[mysqld]下添加如下内容
#confluence
character-set-server=utf8mb4
collation-server=utf8mb4_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row
然后重启数据库,查看如下表示上述的数据库参数设置成功
mysql>
mysql> show variables like '%character_set_server%';
+----------------------+---------+
| Variable_name | Value |
+----------------------+---------+
| character_set_server | utf8mb4 |
+----------------------+---------+
1 row in set (0.00 sec)
mysql> show variables like '%collation_server%';
+------------------+-------------+
| Variable_name | Value |
+------------------+-------------+
| collation_server | utf8mb4_bin |
+------------------+-------------+
1 row in set (0.01 sec)
mysql> show variables like '%default_storage_engine%';
+------------------------+--------+
| Variable_name | Value |
+------------------------+--------+
| default_storage_engine | InnoDB |
+------------------------+--------+
1 row in set (0.00 sec)
mysql> show variables like '%max_allowed_packet%';
+---------------------------+------------+
| Variable_name | Value |
+---------------------------+------------+
| max_allowed_packet | 268435456 |
| mysqlx_max_allowed_packet | 67108864 |
| slave_max_allowed_packet | 1073741824 |
+---------------------------+------------+
3 rows in set (0.01 sec)
mysql> show variables like '%innodb_log_file_size%';
+----------------------+------------+
| Variable_name | Value |
+----------------------+------------+
| innodb_log_file_size | 2147483648 |
+----------------------+------------+
1 row in set (0.00 sec)
mysql> show variables like '%transaction_isolation%';
+-----------------------+----------------+
| Variable_name | Value |
+-----------------------+----------------+
| transaction_isolation | READ-COMMITTED |
+-----------------------+----------------+
1 row in set (0.00 sec)
mysql> show variables like '%binlog_format%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| binlog_format | ROW |
+---------------+-------+
1 row in set (0.00 sec)
mysql>
(7)创建confluence数据库、创建对应账户并授权
create database confluence character set utf8mb4 collate utf8mb4_bin;
create user 'confluenceuser'@'%' identified by 'Pass@word1';
grant all privileges on *.* to 'confluenceuser'@'%' with grant option;
flush privileges;
(8)配置confluence的web页面
confluence访问地址:http://192.168.225.34:8090
--下载破解jar包
cd /data/wiki/confluence
yum install -y wget
wget https://github.com/haxqer/confluence/releases/download/v1.3.3/atlassian-agent.jar
--设置JAVA_OPTS环境变量
echo 'export JAVA_OPTS="-javaagent:/data/wiki/confluence/atlassian-agent.jar ${JAVA_OPTS}"' >> /etc/profile
source /etc/profile
--启动Confluence,检查是否有agent参数
cd /data/wiki/confluence/atlassian-confluence-7.19.7/bin
./stop-confluence.sh
./start-confluence.sh
ps aux|grep java
--执行如下命令获取授权码
/data/wiki/confluence
java -jar atlassian-agent.jar -p conf -m zzz@bbb.com -n zhile -o https://zhile.io -s 服务器ID
--将获取的授权码输入,然后下一步
设置普通用户首次可以注册
我们来注销账户看下登录界面,普通用户是否可以自由注册
可以看到新用户已经创建成功