Centos7操作系统confluence8.5版本部署(超级详细一遍过)

按照网上的部署踩了两天坑,记录一下自己部署的过程

confluence8.5版本安装步骤
1.安装jdk1.8
# 上传jdk包或者自己wget下载
#解压
tar -zxf jdk1.8xxxx.tar.gz -C /usr/local
cd /usr/local/ &&jdk1.8xxxxx  jdk1.8

#配置环境变量
vim /etc/profile
JAVA_HOME=/usr/local/jdk1.8
CLASSPATH=$JAVA_HOME/lib/
PATH=$PATH:$JAVA_HOME/bin
export PATH JAVA_HOME CLASSPATH

#配置软连接
ln -s /usr/local/jdk1.8/bin/java  /usr/bin/java
java -version

2.安装mysql环境
#安装mysql
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.31-linux-glibc2.12-x86_64.tar.xz
xz -d mysql-8.0.31-linux-glibc2.12-x86_64.tar.xz
tar -xvf mysql-8.0.31-linux-glibc2.12-x86_64.tar -C /usr/local
cd /usr/local/  && ln -s mysql-8.0.31-linux-glibc2.12-x86_64 mysql
mkdir -p /data/mysql
groupadd mysql
useradd -g mysql mysql
chown -R mysql.mysql /usr/local/mysql
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --level 2345 mysqld on #设置开启自动启动
mkdir -pv /data/mysql/{data,binlogs,log,run,share,tmp}
ln -sv /data/mysql/run /usr/local/mysql/run
chmod go-rwx /data/mysql/
mkdir -p /data/mysql/relay_log/mysql-relay-bin
ln -sv /usr/local/mysql/bin/ /data/mysql/bin
chown -R mysql:mysql /data
echo "export PATH=$PATH:/usr/local/mysql/bin" >> /etc/profile
source /etc/profile

#把原本内容清空然后重写my.cnf

vi /etc/my.cnf
[mysqld]
# 设置3306端口
port=3306
basedir=/usr/local/mysql/
datadir=/data/mysql/data
tmpdir=/data/mysql/tmp
max_connections=1000
max_connect_errors=100
character-set-server=utf8mb4
default-storage-engine=INNODB
#default_authentication_plugin=mysql_native_password
authentication_policy = mysql_native_password
lower_case_table_names = 1
interactive_timeout = 1800
wait_timeout = 1800
lock_wait_timeout = 3600
tmp_table_size = 64M
max_heap_table_size = 64M
log_bin=1
log_bin=/data/mysql/data/binlog
#binlog最大文件大小,默认为1G大小
max_binlog_size=1024
log_error=/data/mysql/log/error.log
slow_query_log=0
slow_query_log_file=/data/mysql/log/slow-sql.log
long_query_time=1
log_output=FILE
collation-server=utf8mb4_bin
max_allowed_packet=256M
innodb_log_file_size=256M
innodb_redo_log_capacity = 2G
transaction-isolation=READ-COMMITTED
log-bin=mysql-bin
slow_query_log = on
slow-query-log-file = /data/mysql/log/mysql-slow.log
long_query_time = 2
binlog_format=row
log_bin_trust_function_creators = 1
optimizer_switch = derived_merge=off
bind-address = 0.0.0.0
socket=/data/mysql/run/mysql.sock
pid_file=/data/mysql/run/mysql.pid
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8mb4
socket = /data/mysql/run/mysql.sock
[client]
# 设置mysql客户端连接服务端时默认使用的端口
port=3306
default-character-set=utf8mb4
socket = /data/mysql/run/mysql.sock
[mysqldump]
socket = /data/mysql/run/mysql.sock
[mysqladmin]
socket = /data/mysql/run/mysql.sock

#初始化数据库
/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/data/mysql/data --explicit_defaults_for_timestamp

#查看密码
cat /data/mysql/log/error.log    

#进入数据库,修改初始密码并创建用户
mysql -p
#输入密码xxxxxxxx;
alter user 'root'@'localhost' identified by '替换新密码';
CREATE USER 'confluenceuser'@'%' IDENTIFIED BY '密码';
CREATE DATABASE confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;

3.安装confluence
#上传安装包atlassian-confluence-8.5.3-x64.bin
chmod +x atlassian-confluence-8.5.3-x64.bin
./atlassian-confluence-8.5.3-x64.bin
依次输入o-1-i-y

#登录浏览器本机IP8090端口配置-产品安装-复制机器码B824-xxxx-xxxx-xxxx
#上传mysql驱动包wget -O /opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-8.0.22.jar https://yun.ittel.cn:1443/f/c76da4515c094b5b9b8e/?dl=1
#上传破解jar包wget -O /opt/atlassian/confluence/bin/Crack.jar https://yun.ittel.cn:1443/f/166bc403014d4836bb1d/?dl=1

#添加启动项
sed -i '$a export JAVA_OPTS="-javaagent:/opt/atlassian/confluence/bin/Crack.jar ${JAVA_OPTS}"' /opt/atlassian/confluence/bin/setenv.sh

#停止应用
/opt/atlassian/confluence/bin/stop-confluence.sh

#修改用户
chown -R confluence. /opt/atlassian
chown -R confluence. /var/atlassian
su - confluence

#启动应用
/opt/atlassian/confluence/bin/startup.sh

#在/opt/atlassian/confluence/bin目录下运行以下命令拿到授权码
java -jar Crack.jar -d true -p conf -m [email protected] -n my_name -o http://192.168.xxx.xxx -s B824-xxxx-xxxx-xxxx

#web页面输入授权码
非集群
设置数据库mysql
IP
端口3306
数据库名称confluence
用户confluenceuser
密码xxxx
测试连接下一步
空白站点
在Confluence中管理用户和组,设置admin用户名密码邮箱等
开始使用

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇
下一篇>>