Install Confluence

2021-08-11 09:33:05 浏览数 (1)

前言

Confluence 是一款 ATLASSIAN 公司出品的文档管理工具

Confluence is content collaboration software that changes how modern teams work

可以用来作企业的内部知识共享平台

ATLASSIAN 出了很多优秀的产品,大名鼎鼎的 Jira 就是这个公司的产品,Jira 在开发团队中算是比较知名的项目管理软件了

这里演示一下如何构建 Confluence

参考 Confluence Installation Guide

Tip: 当前的版本为 confluence 6.8.1


操作

依赖

每个软件都有它的运行环境,可以通过 System Requirements 确认 Confluence 的运行环境

目前的兼容列表:

Desktop browsers:

  • Internet Explorer 11
  • Microsoft Edge
  • Chrome
  • Firefox
  • Safari (Mac only)

Mobile browsers:

  • Chrome
  • Firefox
  • Safari (iOS only)
  • Android 4.4 (KitKat) or later

Mobile operating system: (required for mobile app)

  • iOS 11 or later
  • Android 4.4 (KitKat) or later

Operating systems:

  • Microsoft Windows
  • Linux (most distributions)
  • MacOS / OSX (evaluation only)

PostgreSQL:

  • PostgreSQL 9.3
  • PostgreSQL 9.4
  • PostgreSQL 9.5
  • PostgreSQL 9.6

MySQL:

  • MySQL 5.6
  • MySQL 5.7

Oracle:

  • Oracle 12c (Release 1)

Microsoft SQL Server:

  • SQL Server 2012
  • SQL Server 2014
  • Azure SQL

Embedded database:

  • H2 (evaluation only)

Oracle Java JRE / JDK:

  • Java 1.8

软件依赖的细节可以参考 Supported Platforms

Note:

  • Confluence 只支持软件包中的 Apache Tomcat 版本
  • Confluence 软件包中已经打包好了 Java Runtime Environment (JRE),不需要额外安装
  • 杀毒软件会明显影响 Confluence 的运行速度,所以最好在杀毒软件中排除掉 Confluence 的家目录,索引目录,数据库目录
  • Confluence 只支持在 64 位的 x85 硬件架构之上

Tip: 详细可以参考 System Requirements

OS 环境

代码语言:javascript复制
[root@confluence ~]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core) 
[root@confluence ~]# hostnamectl 
   Static hostname: confluence
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 316348df30744c9c91b9202baf3915a6
           Boot ID: 54ca7cef2a2e48239ecbd18e8c7a0f8d
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.21.1.el7.x86_64
      Architecture: x86-64
[root@confluence ~]# ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:93:64:5f brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic enp0s3
       valid_lft 81118sec preferred_lft 81118sec
    inet6 fe80::334c:bc63:1266:56b3/64 scope link 
       valid_lft forever preferred_lft forever
3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:5c:09:2e brd ff:ff:ff:ff:ff:ff
    inet 192.168.56.218/24 brd 192.168.56.255 scope global enp0s8
       valid_lft forever preferred_lft forever
    inet6 fe80::2be7:a317:cc4b:666b/64 scope link 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 52:54:00:14:54:5c brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
    link/ether 52:54:00:14:54:5c brd ff:ff:ff:ff:ff:ff
[root@confluence ~]# 

下载与安装 mysql repo

因为 confluence 官方只支持 oracle 的 mysql

Note: Confluence will not work on MySQL variants such as MariaDB (CONFSERVER-29060) and Percona Server (CONFSERVER-36471)

关于 mysql 的支持可以参考 Database Setup For MySQL

所以我得下载和使用 Oracle 版本的 mysql

通过以下链接来下载 mysql 的软件库

Download MySQL Yum Repository

代码语言:javascript复制
[root@confluence ~]# cd cf/
[root@confluence cf]# ls mysql80-community-release-el7-1.noarch.rpm 
mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# 
[root@confluence cf]# rpm -ivh mysql80-community-release-el7-1.noarch.rpm 
warning: mysql80-community-release-el7-1.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:mysql80-community-release-el7-1  ################################# [100%]
[root@confluence cf]#
[root@confluence cf]# ll /etc/yum.repos.d/ | grep mysql
-rw-r--r--  1 root root 1864 2月  22 03:49 mysql-community.repo
-rw-r--r--  1 root root 1885 2月  22 03:49 mysql-community-source.repo
[root@confluence cf]#
[root@confluence cf]# yum list all | grep mysql80
mysql80-community-release.noarch         el7-1                        installed 
mysql-community-client.i686              8.0.11-1.el7                 mysql80-community
mysql-community-client.x86_64            8.0.11-1.el7                 mysql80-community
mysql-community-common.i686              8.0.11-1.el7                 mysql80-community
mysql-community-common.x86_64            8.0.11-1.el7                 mysql80-community
mysql-community-devel.i686               8.0.11-1.el7                 mysql80-community
mysql-community-devel.x86_64             8.0.11-1.el7                 mysql80-community
mysql-community-embedded-compat.i686     8.0.11-1.el7                 mysql80-community
mysql-community-embedded-compat.x86_64   8.0.11-1.el7                 mysql80-community
mysql-community-libs.i686                8.0.11-1.el7                 mysql80-community
mysql-community-libs.x86_64              8.0.11-1.el7                 mysql80-community
mysql-community-libs-compat.i686         8.0.11-1.el7                 mysql80-community
mysql-community-libs-compat.x86_64       8.0.11-1.el7                 mysql80-community
mysql-community-server.x86_64            8.0.11-1.el7                 mysql80-community
mysql-community-test.x86_64              8.0.11-1.el7                 mysql80-community
                                         1-20180420                   mysql80-community
mysql-ref-manual-8.0-en-pdf.noarch       1-20180420                   mysql80-community
[root@confluence cf]# 

Tip: 因为官方刚刚发布了 mysql 8 的 GA 版,所以这里就尝尝鲜,其实 confluence 的文档里并没有明文支持 mysql 8, 我这里只是作一个尝试,看看 mysql 能否向下兼容,不过生产中还是建议严格根据官方发布的兼容列表来选择软件版本

安装 mysql

代码语言:javascript复制
[root@confluence cf]# yum install mysql-community-server.x86_64 --enablerepo=mysql80-community
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.pregi.net
 * epel: mirror.pregi.net
 * extras: mirror.pregi.net
 * remi-php72: mirrors.thzhost.com
 * remi-safe: mirrors.thzhost.com
 * updates: mirror.pregi.net
Resolving Dependencies
--> Running transaction check
---> Package mysql-community-server.x86_64 0:8.0.11-1.el7 will be installed
--> Processing Dependency: mysql-community-common(x86-64) = 8.0.11-1.el7 for package: mysql-community-server-8.0.11-1.el7.x86_64
--> Processing Dependency: mysql-community-client(x86-64) >= 8.0.0 for package: mysql-community-server-8.0.11-1.el7.x86_64
--> Running transaction check
---> Package mysql-community-client.x86_64 0:8.0.11-1.el7 will be installed
--> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.0 for package: mysql-community-client-8.0.11-1.el7.x86_64
---> Package mysql-community-common.x86_64 0:8.0.11-1.el7 will be installed
--> Running transaction check
---> Package mysql-community-libs.x86_64 0:8.0.11-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================================
 Package                                 Arch                    Version                       Repository                          Size
========================================================================================================================================
Installing:
 mysql-community-server                  x86_64                  8.0.11-1.el7                  mysql80-community                  341 M
Installing for dependencies:
 mysql-community-client                  x86_64                  8.0.11-1.el7                  mysql80-community                   26 M
 mysql-community-common                  x86_64                  8.0.11-1.el7                  mysql80-community                  537 k
 mysql-community-libs                    x86_64                  8.0.11-1.el7                  mysql80-community                  2.2 M

Transaction Summary
========================================================================================================================================
Install  1 Package ( 3 Dependent packages)

Total download size: 369 M
Installed size: 1.7 G
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-common-8.0.11-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Public key for mysql-community-common-8.0.11-1.el7.x86_64.rpm is not installed
(1/4): mysql-community-common-8.0.11-1.el7.x86_64.rpm                                                            | 537 kB  00:00:01     
(2/4): mysql-community-libs-8.0.11-1.el7.x86_64.rpm                                                              | 2.2 MB  00:00:04     
(3/4): mysql-community-client-8.0.11-1.el7.x86_64.rpm                                                            |  26 MB  00:00:37     
(4/4): mysql-community-server-8.0.11-1.el7.x86_64.rpm                                                            | 341 MB  00:07:18     
----------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                   852 kB/s | 369 MB  00:07:23     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Importing GPG key 0x5072E1F5:
 Userid     : "MySQL Release Engineering <mysql-build@oss.oracle.com>"
 Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5
 Package    : mysql80-community-release-el7-1.noarch (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
  Installing : mysql-community-common-8.0.11-1.el7.x86_64                                                                           1/4 
  Installing : mysql-community-libs-8.0.11-1.el7.x86_64                                                                             2/4 
  Installing : mysql-community-client-8.0.11-1.el7.x86_64                                                                           3/4 
  Installing : mysql-community-server-8.0.11-1.el7.x86_64                                                                           4/4 
  Verifying  : mysql-community-server-8.0.11-1.el7.x86_64                                                                           1/4 
  Verifying  : mysql-community-client-8.0.11-1.el7.x86_64                                                                           2/4 
  Verifying  : mysql-community-libs-8.0.11-1.el7.x86_64                                                                             3/4 
  Verifying  : mysql-community-common-8.0.11-1.el7.x86_64                                                                           4/4 

Installed:
  mysql-community-server.x86_64 0:8.0.11-1.el7                                                                                          

Dependency Installed:
  mysql-community-client.x86_64 0:8.0.11-1.el7 mysql-community-common.x86_64 0:8.0.11-1.el7 mysql-community-libs.x86_64 0:8.0.11-1.el7

Complete!
[root@confluence cf]#

配置 mysql

参考 Database Setup For MySQL

对 mysql 进行配置

代码语言:javascript复制
[root@confluence mysql]# grep -v "^#" /etc/my.cnf |sed '/^$/d'
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@confluence mysql]# vim /etc/my.cnf
[root@confluence mysql]# grep -v "^#" /etc/my.cnf |sed '/^$/d'
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row
[root@confluence mysql]# 

启动 mysql

代码语言:javascript复制
[root@confluence mysql]# systemctl start mysqld.service
[root@confluence mysql]# 
[root@confluence mysql]# systemctl status mysqld.service
● mysqld.service - MySQL Server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since 一 2018-04-23 13:14:11 EDT; 1min 20s ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 5382 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
 Main PID: 5456 (mysqld)
   Status: "SERVER_OPERATING"
   CGroup: /system.slice/mysqld.service
           └─5456 /usr/sbin/mysqld

4月 23 13:14:01 confluence systemd[1]: Starting MySQL Server...
4月 23 13:14:11 confluence systemd[1]: Started MySQL Server.
[root@confluence mysql]#

以下为日志中的内容,里面包含了初始的 root 密码

代码语言:javascript复制
2018-04-23T17:14:01.942059Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.11) initializing of server in progress as process 5407
2018-04-23T17:14:01.944317Z 0 [Warning] [MY-010161] [Server] You need to use --log-bin to make --binlog-format work.
 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
2018-04-23T17:14:07.423830Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Q*tRckwhs9tp
2018-04-23T17:14:09.161078Z 0 [System] [MY-013170] [Server] /usr/sbin/mysqld (mysqld 8.0.11) initializing of server has completed
2018-04-23T17:14:11.304693Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.11) starting as process 5456
2018-04-23T17:14:11.716330Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2018-04-23T17:14:11.774901Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.11'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server - GPL.

mysql 安全配置

代码语言:javascript复制
[root@confluence mysql]# mysql_secure_installation 

Securing the MySQL server deployment.

Enter password for user root: 
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.

Estimated strength of the password: 100 
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y

New password: 

Re-enter new password: 

Estimated strength of the password: 100 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.

All done! 
[root@confluence mysql]# echo $?
0
[root@confluence mysql]# 

在新版本的 mysql 中都加入了这个脚本 (mariadb 10 中也有此脚本),对于基本的安全加固很有必要

创建数据库和用户并且赋权

代码语言:javascript复制
[root@confluence mysql]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 14
Server version: 8.0.11 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

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> show databases;
 -------------------- 
| Database           |
 -------------------- 
| information_schema |
| mysql              |
| performance_schema |
| sys                |
 -------------------- 
4 rows in set (0.00 sec)

mysql> CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;
Query OK, 1 row affected, 1 warning (0.04 sec)

mysql>
mysql> CREATE USER 'confluenceuser'@'localhost' IDENTIFIED BY 'confluenceuser';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
mysql> 
mysql> CREATE USER 'confluenceuser'@'localhost' IDENTIFIED BY 'M6z#C#LzgJ26ysj3!S';
Query OK, 0 rows affected (0.10 sec)

mysql> GRANT ALL PRIVILEGES ON confluence.* TO 'confluenceuser'@'localhost';
Query OK, 0 rows affected (0.08 sec)

mysql> show databases;
 -------------------- 
| Database           |
 -------------------- 
| confluence         |
| information_schema |
| mysql              |
| performance_schema |
| sys                |
 -------------------- 
5 rows in set (0.00 sec)

mysql> show create database confluence;
 ------------ -------------------------------------------------------------------------------------- 
| Database   | Create Database                                                                      |
 ------------ -------------------------------------------------------------------------------------- 
| confluence | CREATE DATABASE `confluence` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_bin */ |
 ------------ -------------------------------------------------------------------------------------- 
1 row in set (0.00 sec)

mysql> show grants for 'confluenceuser'@'localhost';
 ------------------------------------------------------------------------ 
| Grants for confluenceuser@localhost                                    |
 ------------------------------------------------------------------------ 
| GRANT USAGE ON *.* TO `confluenceuser`@`localhost`                     |
| GRANT ALL PRIVILEGES ON `confluence`.* TO `confluenceuser`@`localhost` |
 ------------------------------------------------------------------------ 
2 rows in set (0.00 sec)

mysql> 
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@confluence mysql]# 

下载 Confluence

首先要下载安装包

下载 Download Confluence Server

代码语言:javascript复制
[root@confluence ~]# cd cf/
[root@confluence cf]# ls
atlassian-confluence-6.8.1-x64.bin  mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# 
[root@confluence cf]# du -sh atlassian-confluence-6.8.1-x64.bin 
563M	atlassian-confluence-6.8.1-x64.bin
[root@confluence cf]# md5sum atlassian-confluence-6.8.1-x64.bin 
04a95ebd8072785d41d41963ca32f559  atlassian-confluence-6.8.1-x64.bin
[root@confluence cf]# 

安装 Confluence

参考以下链接安装 Confluence

Installing Confluence on Linux

代码语言:javascript复制
[root@confluence ~]# cd cf
[root@confluence cf]# ls
atlassian-confluence-6.8.1-x64.bin  mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# chmod  x atlassian-confluence-6.8.1-x64.bin 
[root@confluence cf]# ls
atlassian-confluence-6.8.1-x64.bin  mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# ./atlassian-confluence-6.8.1-x64.bin 
Unpacking JRE ...
Starting Installer ...
四月 23, 2018 1:49:54 下午 java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
四月 23, 2018 1:49:54 下午 java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.

This will install Confluence 6.8.1 on your computer.
OK [o, Enter], Cancel [c]

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]


Where should Confluence 6.8.1 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]

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 6.8.1 is complete
Start Confluence now?
Yes [y, Enter], No [n]


Please wait a few moments while Confluence starts up.
Launching Confluence ...
Installation of Confluence 6.8.1 is complete
Your installation of Confluence 6.8.1 is now ready and can be accessed via
your browser.
Confluence 6.8.1 can be accessed at http://localhost:8090
Finishing installation ...
[root@confluence cf]# echo $?
0
[root@confluence cf]# netstat -ant 
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 192.168.56.218:22       192.168.56.1:57706      ESTABLISHED
tcp        0      0 192.168.56.218:22       192.168.56.1:59402      ESTABLISHED
tcp        0      0 192.168.56.218:22       192.168.56.1:59492      ESTABLISHED
tcp6       0      0 :::3306                 :::*                    LISTEN     
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::80                   :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
tcp6       0      0 :::8090                 :::*                    LISTEN     
tcp6       0      0 127.0.0.1:8000          :::*                    LISTEN     
tcp6       0      0 :::33060                :::*                    LISTEN     
tcp6       0      0 127.0.0.1:45156         127.0.0.1:8000          TIME_WAIT  
[root@confluence cf]# ps faux | grep -i confluence
avahi      698  0.0  0.0  30196  1708 ?        Ss   10:29   0:00 avahi-daemon: running [confluence.local]
root     18225  0.0  0.0 112660  1036 pts/0    S    13:52   0:00  |       _ grep --color=auto -i confluence
conflue  18146 36.5 22.5 3674912 911844 ?      Sl   13:51   0:21 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dconfluence.context.path= -Datlassian.plugins.startup.options= -Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 -Dsynchrony.enable.xhr.fallback=true -Xms1024m -Xmx1024m -XX: UseG1GC -Datlassian.plugins.enable.wait=300 -Djava.awt.headless=true -XX:G1ReservePercent=20 -Xloggc:/opt/atlassian/confluence/logs/gc-2018-04-23_13-51-33.log -XX: UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX: PrintGCDateStamps -XX:-PrintTenuringDistribution -Dignore.endorsed.dirs= -classpath /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
[root@confluence cf]# /opt/atlassian/confluence/jre//bin/java -version
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
[root@confluence cf]# java -version
openjdk version "1.8.0_161"
OpenJDK Runtime Environment (build 1.8.0_161-b14)
OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
[root@confluence cf]# 

防火墙

代码语言:javascript复制
[root@confluence cf]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3 enp0s8
  sources: 
  services: ssh dhcpv6-client http https
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
	
[root@confluence cf]# 
[root@confluence cf]# firewall-cmd --add-port 8090/tcp --permanent
success
[root@confluence cf]# firewall-cmd --reload
success
[root@confluence cf]# firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3 enp0s8
  sources: 
  services: ssh dhcpv6-client http https
  ports: 8090/tcp
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 
	
[root@confluence cf]#

确保开放了 8090 端口

SELINUX

代码语言:javascript复制
[root@confluence cf]# getenforce 
Disabled
[root@confluence cf]# 

Selinux 已经放行

破解

下载破解工具

下载confluence_keygen.jar注册机,见附件

链接:https://pan.baidu.com/s/1gg85p4Z 密码:3t5b

代码语言:javascript复制
[root@confluence cf]# cp /tmp/confluence_x.zip  . 
[root@confluence cf]# ls
atlassian-confluence-6.8.1-x64.bin  confluence_x.zip  mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# unzip confluence_x.zip 
Archive:  confluence_x.zip
  inflating: confluence╞╞╜т╣д╛▀/confluence_keygen.jar  
  inflating: confluence╞╞╜т╣д╛▀/keygen.bat  
  inflating: confluence╞╞╜т╣д╛▀/keygen.sh  
  inflating: confluence╞╞╜т╣д╛▀/keygen_MacOSX.sh  
[root@confluence cf]# ls
atlassian-confluence-6.8.1-x64.bin  confluence_x.zip  confluence╞╞╜т╣д╛▀  mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# 
[root@confluence cf]# mv confluence╞╞╜т╣д╛▀/ cf_x
[root@confluence cf]# ls
atlassian-confluence-6.8.1-x64.bin  cf_x  confluence_x.zip  mysql80-community-release-el7-1.noarch.rpm
[root@confluence cf]# cd cf_x/
[root@confluence cf_x]# ls
confluence_keygen.jar  keygen.bat  keygen_MacOSX.sh  keygen.sh
[root@confluence cf_x]#

atlassian-extras-decoder-v2-3.3.0.jar 拷贝出来

代码语言:javascript复制
[root@confluence lib]# pwd
/opt/atlassian/confluence/confluence/WEB-INF/lib
[root@confluence lib]# ll atlassian-extras-decoder-v2*
-rw-r--r-- 1 root root 6684 Apr  4 06:51 atlassian-extras-decoder-v2-3.3.0.jar
[root@confluence lib]# cp atlassian-extras-decoder-v2-3.3.0.jar /root/Desktop/atlassian-extras-2.4.jar
[root@confluence lib]# 

运行破解程序

打上补丁

0 人点赞