[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@localhost ~]# java -version
openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)
官方链接:Confluence Server 下载存档 | Atlassian
创建安装目录
[root@localhost ~]# mkdir -p /data/wiki/confluence
将下载好的包放入新建好的目录并解压 tar -xzvf atlassian-confluence-7.19.7.tar.gz
[root@localhost ~]# cd /data/wiki/confluence/
[root@localhost confluence]# ll
总用量 759924
drwxr-xr-x. 12 admin admin 4096 3月 21 14:02 atlassian-confluence-7.19.7
-rw-r--r--. 1 root root 778146554 3月 29 10:06 atlassian-confluence-7.19.7.tar.gz
配置数据目录
[root@localhost confluence]# vi atlassian-confluence-7.19.7/confluence/WEB-INF/classes/confluence-init.properties
最后新增confluence.home=/data/wiki/confluence
进入bin目录,启动
[root@localhost confluence]# cd atlassian-confluence-7.19.7/bin/
[root@localhost bin]# ./start-confluence.sh
To run Confluence in the foreground, start the server with start-confluence.sh -fg
executing as current user
If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
Server startup logs are located in /data/wiki/confluence/atlassian-confluence-7.19.7/logs/catalina.out
---------------------------------------------------------------------------
Using Java: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/bin/java
2023-03-29 11:18:43,062 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /data/wiki/confluence/atlassian-confluence-7.19.7/conf/server.xml. No further action is required
---------------------------------------------------------------------------
Using CATALINA_BASE: /data/wiki/confluence/atlassian-confluence-7.19.7
Using CATALINA_HOME: /data/wiki/confluence/atlassian-confluence-7.19.7
Using CATALINA_TMPDIR: /data/wiki/confluence/atlassian-confluence-7.19.7/temp
Using JRE_HOME: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre
Using CLASSPATH: /data/wiki/confluence/atlassian-confluence-7.19.7/bin/bootstrap.jar:/data/wiki/confluence/atlassian-confluence-7.19.7/bin/tomcat-juli.jar
Using CATALINA_OPTS: -Datlassian.plugins.startup.options='' -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dconfluence.context.path= -Djava.locale.providers=JRE,SPI,CLDR -Dsynchrony.enable.xhr.fallback=true -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -Xloggc:/data/wiki/confluence/atlassian-confluence-7.19.7/logs/gc-2023-03-29_11-18-43.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Xlog:gc+age=debug:file=/data/wiki/confluence/atlassian-confluence-7.19.7/logs/gc-2023-03-29_11-18-43.log::filecount=5,filesize=2M -XX:G1ReservePercent=20 -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDateStamps -XX:+IgnoreUnrecognizedVMOptions -XX:ReservedCodeCacheSize=256m -Xms1024m -Xmx1024m
Using CATALINA_PID: /data/wiki/confluence/atlassian-confluence-7.19.7/work/catalina.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.
查看
[root@localhost bin]# netstat -nltp | grep 8090
tcp6 0 0 :::8090 :::* LISTEN 1123/java
[root@localhost bin]# lsof -i:8090
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 1123 root 57u IPv6 20204385 0t0 TCP *:8090 (LISTEN)
rpm包下载
下载地址:MySQL :: Download MySQL Community Server
或者使用wget下载
1. 卸载系统自带mariadb-libs
[root@localhost mysql]# yum remove mysql-libs
已加载插件:fastestmirror, langpacks
参数 mysql-libs 没有匹配
不删除任何软件包
2. 安装依赖包
[root@localhost mysql]# yum -y install net-tools libaio
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
软件包 net-tools-2.0-0.25.20131004git.el7.x86_64 已安装并且是最新版本
软件包 libaio-0.3.109-13.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost mysql]# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
--2023-03-29 11:47:16-- https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
正在解析主机 downloads.mysql.com (downloads.mysql.com)... 69.192.12.46, 2600:1417:e800:185::2e31, 2600:1417:e800:189::2e31
正在连接 downloads.mysql.com (downloads.mysql.com)|69.192.12.46|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Moved Temporarily
位置:https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar [跟随至新的 URL]
--2023-03-29 11:47:17-- https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
正在解析主机 cdn.mysql.com (cdn.mysql.com)... 184.86.92.235
正在连接 cdn.mysql.com (cdn.mysql.com)|184.86.92.235|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:843008000 (804M) [application/x-tar]
正在保存至: “mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar”
100%[=======================================================================================================================================================================>] 843,008,000 5.00MB/s 用时 2m 58s
2023-03-29 11:50:16 (4.50 MB/s) - 已保存 “mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar” [843008000/843008000])
[root@localhost mysql]# ll
总用量 823252
-rw-r--r--. 1 root root 843008000 12月 18 2021 mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
解压、按顺序安装
[root@localhost mysql]# tar xvf mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
mysql-community-client-8.0.28-1.el7.x86_64.rpm
mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
mysql-community-common-8.0.28-1.el7.x86_64.rpm
mysql-community-devel-8.0.28-1.el7.x86_64.rpm
mysql-community-embedded-compat-8.0.28-1.el7.x86_64.rpm
mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
mysql-community-libs-8.0.28-1.el7.x86_64.rpm
mysql-community-libs-compat-8.0.28-1.el7.x86_64.rpm
mysql-community-server-8.0.28-1.el7.x86_64.rpm
mysql-community-test-8.0.28-1.el7.x86_64.rpm
[root@localhost mysql]# ll
总用量 1646496
-rw-r--r--. 1 root root 843008000 12月 18 2021 mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar
-rw-r--r--. 1 7155 31415 55199948 12月 18 2021 mysql-community-client-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 5933684 12月 18 2021 mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 645388 12月 18 2021 mysql-community-common-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 7763684 12月 18 2021 mysql-community-devel-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 23637584 12月 18 2021 mysql-community-embedded-compat-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 2215928 12月 18 2021 mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 4935572 12月 18 2021 mysql-community-libs-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 1265072 12月 18 2021 mysql-community-libs-compat-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 473116268 12月 18 2021 mysql-community-server-8.0.28-1.el7.x86_64.rpm
-rw-r--r--. 1 7155 31415 268279684 12月 18 2021 mysql-community-test-8.0.28-1.el7.x86_64.rpm
[root@localhost mysql]# rpm -ivh mysql-community-common-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-common-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql-community-common-8.0.28-1.e################################# [100%]
[root@localhost mysql]# rpm -ivh mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-client-plugins-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql-community-client-plugins-8.################################# [100%]
[root@localhost mysql]# rpm -ivh mysql-community-libs-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-libs-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql-community-libs-8.0.28-1.el7################################# [100%]
[root@localhost mysql]# rpm -ivh mysql-community-client-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-client-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql-community-client-8.0.28-1.e################################# [100%]
[root@localhost mysql]# rpm -ivh mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-icu-data-files-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql-community-icu-data-files-8.################################# [100%]
[root@localhost mysql]# rpm -ivh mysql-community-server-8.0.28-1.el7.x86_64.rpm
警告:mysql-community-server-8.0.28-1.el7.x86_64.rpm: 头V4 RSA/SHA256 Signature, 密钥 ID 3a79bd29: NOKEY
准备中... ################################# [100%]
正在升级/安装...
1:mysql-community-server-8.0.28-1.e################################# [100%]
初始化数据库
[root@localhost mysql]# mysqld --initialize --user=mysql
[root@localhost mysql]# mysqld --initialize-insecure --user=mysql
1、启动
[root@localhost mysql]# systemctl start mysqld
2、查看版本
[root@localhost mysql]# mysql --version
mysql Ver 8.0.28 for Linux on x86_64 (MySQL Community Server - GPL)
3、查看状态
[root@localhost mysql]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 三 2023-03-29 14:10:19 CST; 29s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 4031 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 4062 (mysqld)
Status: "Server is operational"
Tasks: 38
CGroup: /system.slice/mysqld.service
└─4062 /usr/sbin/mysqld
3月 29 14:10:15 localhost.localdomain systemd[1]: Starting MySQL Server...
3月 29 14:10:19 localhost.localdomain systemd[1]: Started MySQL Server.
查看临时密码并修改
[root@localhost mysql]# cat /var/log/mysqld.log|grep localhost
2023-03-29T06:08:55.158759Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: wv?p-ddq?6pI
修改密码
[root@localhost mysql]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.28
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> alter user 'root'@'localhost' identified by '123456';
Query OK, 0 rows affected (0.05 sec)
mysql> exit
Bye
使用新密码登录确认
[root@localhost mysql]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 8.0.28 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> exit
Bye
驱动下载:Download mysql JAR files with all dependencies
我这里mysql是8.0.28版本,所以驱动也是选的8.0.28
下载之后解压把jar包移入/data/wiki/confluence/atlassian-confluence-7.19.7/confluence/WEB-INF/lib目录下
[root@localhost atlassian-confluence-7.19.7]# ll confluence/WEB-INF/lib/*mysql*
-rw-rw-rw-. 1 root root 2476480 3月 29 06:17 confluence/WEB-INF/lib/mysql-connector-java-8.0.28.jar
修改mysql配置
[root@localhost atlassian-confluence-7.19.7]# vi /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove the leading "# " to disable binary logging
# Binary logging captures changes between backups and is enabled by
# default. It's default setting is log_bin=binlog
# disable_log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#
# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
# default-authentication-plugin=mysql_native_password
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
init-connect ='SET NAMES utf8'
bind-address = 127.0.0.1
port = 3306
innodb_file_per_table=1
#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
[client]
port = 3306
socket = /var/lib/mysql/mysql.sock
default-character-set = utf8mb4
~
~
~
~
"/etc/my.cnf" 52L, 1632C written
重启mysql
[root@localhost atlassian-confluence-7.19.7]# systemctl restart mysqld
查看状态
[root@localhost atlassian-confluence-7.19.7]# systemctl status mysqld
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 三 2023-03-29 14:43:50 CST; 8s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 4601 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 4629 (mysqld)
Status: "Server is operational"
Tasks: 38
CGroup: /system.slice/mysqld.service
└─4629 /usr/sbin/mysqld
3月 29 14:43:48 localhost.localdomain systemd[1]: Starting MySQL Server...
3月 29 14:43:50 localhost.localdomain systemd[1]: Started MySQL Server.
创建confluence数据库、创建对应账户并授权
[root@localhost atlassian-confluence-7.19.7]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.28 MySQL Community Server - GPL
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> CREATE DATABASE confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
Query OK, 1 row affected (0.01 sec)
mysql> create user 'confluenceuser'@'localhost' IDENTIFIED BY 'xxx';
Query OK, 0 rows affected (0.03 sec)
mysql> grant all privileges on confluence.* TO 'confluenceuser'@'%' with grant option;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
1、打开页面 http://localhost:8090 ,进入系统安装页面。
2、选择语言:中文
记录服务器ID
下载破解程序并上传
wget https://github.com/haxqer/confluence/releases/download/v1.3.3/atlassian-agent.jar
echo 'export JAVA_OPTS="-javaagent:/root/atlassian-agent.jar ${JAVA_OPTS}"' >> /root/.bashrc #把agent加入到Java中
#启动Confluence
ps aux|grep java #检查是否有agent参数
[root@localhost bin]# ps aux|grep java
root 8996 312 2.7 4393784 902508 pts/1 Sl 16:51 0:12 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-1.el7.x86_64/jre/bin/java -Djava.util.logging.config.file=/data/wiki/confluence/atlassian-confluence-7.19.7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -javaagent:/data/wiki/confluence/atlassian-agent.jar -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Datlassian.plugins.startup.options= -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dconfluence.context.path= -Djava.locale.providers=JRE,SPI,CLDR -Dsynchrony.enable.xhr.fallback=true -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -Xloggc:/data/wiki/confluence/atlassian-confluence-7.19.7/logs/gc-2023-03-29_16-51-45.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -Xlog:gc+age=debug:file=/data/wiki/confluence/atlassian-confluence-7.19.7/logs/gc-2023-03-29_16-51-45.log::filecount=5,filesize=2M -XX:G1ReservePercent=20 -XX:+UseG1GC -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDateStamps -XX:+IgnoreUnrecognizedVMOptions -XX:ReservedCodeCacheSize=256m -Xms1024m -Xmx1024m -Dignore.endorsed.dirs= -classpath /data/wiki/confluence/atlassian-confluence-7.19.7/bin/bootstrap.jar:/data/wiki/confluence/atlassian-confluence-7.19.7/bin/tomcat-juli.jar -Dcatalina.base=/data/wiki/confluence/atlassian-confluence-7.19.7 -Dcatalina.home=/data/wiki/confluence/atlassian-confluence-7.19.7 -Djava.io.tmpdir=/data/wiki/confluence/atlassian-confluence-7.19.7/temp org.apache.catalina.startup.Bootstrap start
root 9024 0.0 0.0 112824 988 pts/1 S+ 16:51 0:00 grep --color=auto java
java -jar atlassian-agent.jar -p conf -m [email protected] -n zhile -o https://zhile.io -s 服务器ID #执行破解,获得授权码
生成激活码输入然后下一步
输入相关信息