一、安装MySQL8.0.35
下载MySQL8.0.35 EL7的RPM捆绑包并安装
(图片点击放大查看)
(图片点击放大查看)
mkdir /opt/mysql-8.0.35-rpm_package tar -xvf mysql-8.0.35-1.el7.x86_64.rpm-bundle.tar -C /opt/mysql-8.0.35-rpm_package/ cd /opt/mysql-8.0.35-rpm_package/ ll -trh rpm -qa | grep mariadb-libs rpm -e mariadb-libs-5.5.68-1.el7.x86_64 --nodeps
rpm -ivh mysql-community-client-plugins-8.0.35-1.el7.x86_64.rpm rpm -ivh mysql-community-common-8.0.35-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-8.0.35-1.el7.x86_64.rpm rpm -ivh mysql-community-client-8.0.35-1.el7.x86_64.rpm rpm -ivh mysql-community-icu-data-files-8.0.35-1.el7.x86_64.rpm rpm -ivh mysql-community-server-8.0.35-1.el7.x86_64.rpm
(图片点击放大查看)
(图片点击放大查看)
说明:在Linux环境下默认是区分大小写的,如要改变这种默认方式,需要在初始化前修改 lower_case_table_names
MySQL8.0要求不能在initialize之后再更改lower_case_table_names 的值,也就是说,再通过更改my.cnf文件是不管用的。
初始化前,linux下修改文件my.cnf,在[mysqld]配置节点下添加 lower-case-table-names=1,然后再执行如下命令。
https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html
二、修改MySQL配置文件并创建Confluence数据库
vim /etc/my.cnf [mysqld] 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 log_bin_trust_function_creators = 1
(图片点击放大查看)
以及修改mysql的数据库存储路径
mkdir -p /data/mysql mysqld --initialize chown -R mysql:mysql /data/mysql systemctl start mysqld systemctl enable mysqld
(图片点击放大查看)
查看mysql的root初始密码
cat /var/log/mysqld.log | grep password
mysql -u root -p登录数据库后修改密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'MySQLServer_2023!';
(图片点击放大查看)
用新密码登录并创建Confluence的数据库
CREATE DATABASE confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; CREATE USER 'confluence'@'%' IDENTIFIED BY 'Confluence_2023!'; GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'%' WITH GRANT OPTION; FLUSH PRIVILEGES;
(图片点击放大查看)
三、安装Confluence
https://www.atlassian.com/zh/software/confluence/download-archives
(图片点击放大查看)
(图片点击放大查看)
下载后上传到服务器
安装
chmod 777 atlassian-confluence-7.20.3-x64.bin ./atlassian-confluence-7.20.3-x64.bin
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
接下来下载MySQL JDBC驱动
(图片点击放大查看)
JDBC jar包上传至/opt/atlassian/confluence/confluence/WEB-INF/lib/目录
cp mysql-connector-j-8.0.33.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java.jar
上传atlassian-agent.jar /opt/atlassian/confluence/atlassian-agent.jar
(图片点击放大查看)
vim /opt/atlassian/confluence/bin/setenv.sh
如下图所示位置添加如下行
(图片点击放大查看)
vim /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
firewall-cmd --permanent --zone=public --add-port=8090/tcp firewall-cmd --reload
(图片点击放大查看)
四、初始化Confluence
浏览器打开8090端口
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
cd /opt/atlassian/confluence/jre/bin ./java -jar /opt/atlassian/confluence/atlassian-agent.jar -p conf -m abcd1234@qq.com -n walkingcloud -o http://www.walkingcloud.cn -s BXFJ-4HPT-2PTX-LXYN
(图片点击放大查看)
配置数据库链接信息
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
(图片点击放大查看)
初始化Confluence
(图片点击放大查看)