Confluence是一款由JAVA编写用于企业知识库管理协同软件,用于构建企业内部wiki
1. 安装前准备工作
部署confluence
的系统环境为centos7.9
,使用腾讯云,4核,内存为8G,本机电脑为windows7
,Mysql
的版本为5.7
。
1.1 将confluence7.4的破解包下载到本机电脑上
https://down.whsir.com/downloads/confluence7.4pojie.zip
1.2 将java8程序下载并安装到本机电脑上(exe文件只需按照步骤来安装就行)
https://down.whsir.com/downloads/jdk-8u172-windows-x64.exe
1.3 将Mysql驱动插件下载到centos服务器上
wget https://down.whsir.com/downloads/mysql-connector-java-5.1.46.tar.gz
[root@VM-0-2-centos ~]# wget https://down.whsir.com/downloads/mysql-connector-java-5.1.46.tar.gz
--2023-01-12 09:59:50-- https://down.whsir.com/downloads/mysql-connector-java-5.1.46.tar.gz
Resolving down.whsir.com (down.whsir.com)... 199.195.253.219
Connecting to down.whsir.com (down.whsir.com)|199.195.253.219|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4434926 (4.2M) [application/octet-stream]
Saving to: ‘mysql-connector-java-5.1.46.tar.gz’
100%[===========================================================================================================>] 4,434,926 2.61MB/s in 1.6s
2023-01-12 09:59:53 (2.61 MB/s) - ‘mysql-connector-java-5.1.46.tar.gz’ saved [4434926/4434926]
1.4 在centos服务器上添加wlnmp一键安装包源
rpm -ivh https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
[root@VM-0-2-centos ~]# rpm -ivh https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
Retrieving https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:wlnmp-release-centos-2-1 ################################# [100%]
1.5 下载confluence7.4安装包至centos服务器上
wget https://down.whsir.com/downloads/atlassian-confluence-7.4.6-x64.bin
[root@VM-0-2-centos ~]# wget https://down.whsir.com/downloads/atlassian-confluence-7.4.6-x64.bin
--2023-01-12 10:00:23-- https://down.whsir.com/downloads/atlassian-confluence-7.4.6-x64.bin
Resolving down.whsir.com (down.whsir.com)... 199.195.253.219
Connecting to down.whsir.com (down.whsir.com)|199.195.253.219|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 683782349 (652M) [application/octet-stream]
Saving to: ‘atlassian-confluence-7.4.6-x64.bin’
100%[==========================================================================================================>] 683,782,349 5.64MB/s in 92s
2023-01-12 10:01:56 (7.06 MB/s) - ‘atlassian-confluence-7.4.6-x64.bin’ saved [683782349/683782349]
2.正式安装部署
2.1 通过wlanp
包安装jdk1.8
及Mysql5.7
yum install jdk1.8 wmysql57 -y
[root@VM-0-2-centos ~]# yum install jdk1.8 wmysql57 -y
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
wlnmp | 2.9 kB 00:00:00
wlnmp/7/x86_64/primary_db | 292 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package jdk1.8.x86_64 2000:1.8.0_251-fcs will be installed
---> Package wmysql57.x86_64 0:5.7.40-2.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================
Installing:
jdk1.8 x86_64 2000:1.8.0_251-fcs wlnmp 171 M
wmysql57 x86_64 5.7.40-2.el7 wlnmp 72 M
Transaction Summary
====================================================================================================================================================
Install 2 Packages
Total download size: 243 M
Installed size: 786 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/wlnmp/packages/wmysql57-5.7.40-2.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID bcc6a00d: NOKEY 00:00:36 ETA
Public key for wmysql57-5.7.40-2.el7.x86_64.rpm is not installed
(1/2): wmysql57-5.7.40-2.el7.x86_64.rpm | 72 MB 00:00:39
(2/2): jdk1.8-8u251-linux-x64.rpm | 171 MB 00:01:12
----------------------------------------------------------------------------------------------------------------------------------------------------
Total 3.3 MB/s | 243 MB 00:01:12
Retrieving key from https://mirrors.wlnmp.com/centos/RPM-GPG-KEY-wlnmp
Importing GPG key 0xBCC6A00D:
Userid : "wlnmp (GPG-RPM-KEY) <wh@whsir.com>"
Fingerprint: 5d5b 5609 0305 9039 d96e 717c 9f3b a65f bcc6 a00d
From : https://mirrors.wlnmp.com/centos/RPM-GPG-KEY-wlnmp
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : 2000:jdk1.8-1.8.0_251-fcs.x86_64 1/2
Unpacking JAR files...
tools.jar...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...
Installing : wmysql57-5.7.40-2.el7.x86_64 2/2
Verifying : wmysql57-5.7.40-2.el7.x86_64 1/2
Verifying : 2000:jdk1.8-1.8.0_251-fcs.x86_64 2/2
Installed:
jdk1.8.x86_64 2000:1.8.0_251-fcs wmysql57.x86_64 0:5.7.40-2.el7
Complete!
验证jdk1.8
是否安装成功了
[root@VM-0-2-centos ~]# java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
注:该jdk
是oracle
提供的包,wlnmp
一键包将其镜像了过来
2.2 修改Mysql
配置
编辑my.cnf
文件
vi /etc/my.cnf
[mysqld]
port = 3306
socket = /tmp/mysql.sock
pid_file = /data/mysql/mysql.pid
datadir = /data/mysql
default-time-zone = '+08:00'
log_timestamps = system
// 这个为加的一行
transaction-isolation=READ-COMMITTED
# innodb
default_storage_engine = InnoDB
innodb_file_per_table = 1
innodb_data_home_dir = /data/mysql
innodb_data_file_path = ibdata1:64M:autoextend
innodb_log_group_home_dir = /data/mysql/
innodb_buffer_pool_size = 128M
innodb_log_file_size = 32M // 改为256M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 34M // 改为34M
保存退出! 重启Mysql
/etc/init.d/mysql restart
3 创建数据库
注: 通过wlnmp
一键包安装的Mysql5.7
默认是空
[root@VM-0-2-centos ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.40-log Source distribution
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>
在该命令行执行:
mysql> create user confluence@localhost identified by 'blog.whsir.com';
mysql> create database confluence character set utf8 collate utf8_bin;
mysql> grant all privileges on confluence.* to confluence@'localhost';
mysql> set password = password('whsir');
mysql> quit
执行结果
[root@VM-0-2-centos ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.40-log Source distribution
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 user confluence@localhost identified by 'blog.whsir.com';
Query OK, 0 rows affected (0.00 sec)
mysql> create database confluence character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on confluence.* to confluence@'localhost';
Query OK, 0 rows affected (0.01 sec)
mysql> set password = password('whsir');
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> quit
Bye
此时数据库root默认密码更改为whsir,confluence使用单独的库、账号密码
4 安装confluence
给 atlassian-confluence-7.4.6-x64.bin
安装包赋予执行权限
chmod +x atlassian-confluence-7.4.6-x64.bin
[root@VM-0-2-centos ~]# ./atlassian-confluence-7.4.6-x64.bin
Installing fontconfig...
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Processing Dependency: dejavu-sans-fonts for package: fontconfig-2.13.0-4.3.el7.x86_64
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================
Installing:
fontconfig x86_64 2.13.0-4.3.el7 os 254 k
Installing for dependencies:
dejavu-fonts-common noarch 2.33-6.el7 os 64 k
dejavu-sans-fonts noarch 2.33-6.el7 os 1.4 M
fontpackages-filesystem noarch 1.44-8.el7 os 9.9 k
Transaction Summary
====================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 1.7 M
Installed size: 5.9 M
Downloading packages:
(1/4): dejavu-fonts-common-2.33-6.el7.noarch.rpm | 64 kB 00:00:00
(2/4): fontconfig-2.13.0-4.3.el7.x86_64.rpm | 254 kB 00:00:00
(3/4): fontpackages-filesystem-1.44-8.el7.noarch.rpm | 9.9 kB 00:00:00
(4/4): dejavu-sans-fonts-2.33-6.el7.noarch.rpm | 1.4 MB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------
Total 2.2 MB/s | 1.7 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : fontpackages-filesystem-1.44-8.el7.noarch 1/4
Installing : dejavu-fonts-common-2.33-6.el7.noarch 2/4
Installing : dejavu-sans-fonts-2.33-6.el7.noarch 3/4
Installing : fontconfig-2.13.0-4.3.el7.x86_64 4/4
Verifying : fontpackages-filesystem-1.44-8.el7.noarch 1/4
Verifying : dejavu-fonts-common-2.33-6.el7.noarch 2/4
Verifying : fontconfig-2.13.0-4.3.el7.x86_64 3/4
Verifying : dejavu-sans-fonts-2.33-6.el7.noarch 4/4
Installed:
fontconfig.x86_64 0:2.13.0-4.3.el7
Dependency Installed:
dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7 fontpackages-filesystem.noarch 0:1.44-8.el7
Complete!
Unpacking JRE ...
Starting Installer ...
This will install Confluence 7.4.6 on your computer.
OK [o, Enter], Cancel [c] // 点击回车
Click Next to continue, or Cancel to exit Setup.
Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]
// 按下数字1 回车
Select the folder where you would like Confluence 7.4.6 to be installed,
then click Next.
Where should Confluence 7.4.6 be installed?
[/opt/atlassian/confluence] // 回车
Default location for Confluence data
[/var/atlassian/application-data/confluence] // 回车
Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.
Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
1 // 按下数字1
Confluence can be run in the background.
You may choose to run Confluence as a service, which means it will start
automatically whenever the computer restarts.
Install Confluence as Service?
Yes [y, Enter], No [n] // 按下回车
Extracting files ...
Please wait a few moments while we configure Confluence.
Installation of Confluence 7.4.6 is complete
Start Confluence now?
Yes [y, Enter], No [n] // 按下回车
Please wait a few moments while Confluence starts up.
Launching Confluence ...
Installation of Confluence 7.4.6 is complete
Your installation of Confluence 7.4.6 is now ready and can be accessed via
your browser.
Confluence 7.4.6 can be accessed at http://localhost:8090
Finishing installation ...
安装完成后confluence
会自动启动
5. 配置Mysql驱动
tar zxf mysql-connector-java-5.1.46.tar.gz
cd mysql-connector-java-5.1.46
mv mysql-connector-java-5.1.46-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib
6. 开始破解
破解需要两步,一是破解文件,二是获取授权码
6.1 破解文件
从centos
服务器上下载/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar
文件到本地并重命名为atlassian-extras-2.4.jar
,并运行在最开始下载的破解包中的confluence_keygen.jar
(注意这一步需要在本机安装好java
环境)
按照下述步骤,进行操作
上述将atlassian-extra-2.4.jar
改名为atlassian-extras-decoder-v2-3.4.1.jar
并上传回CentOS
服务器/opt/atlassian/confluence/confluence/WEB-INF/lib/
目录,覆盖原来的文件即可,此时需要重启服务器
/etc/init.d/confluence restart
6.2 获取授权码
访问web
页面,获取服务器ID,http://IP:8090 IP
为部署的服务器ip
地址。注意如果使用阿里云或者腾讯云需要打开8090
端口。
进入安装界面,选择中文:
数据库URL为:
jdbc:mysql://localhost:3306/confluence?autoReconnect=true&useSSL=false
密码为创建数据库设置的密码,密码为:blog.whsir.com
注意这里的安装类型不要使用简单类型,需要在数据库URL后面加上``
autoReconnect=true&useSSL=false
不然会出现的现象是点击了测试连接,可以成功,但是点击下一步会报错,这个错误查了好久。。。
安装部署完成!!!!!
7.验证授权
点击页面的设置按钮,选择一般配置
选择授权细节
参考资料:
文章评论