1. 程式人生 > 實用技巧 >confluence安裝配置完整記錄

confluence安裝配置完整記錄

confluence安裝配置完整記錄

confluence是一個專業的企業知識管理和協同軟體,可以用於構建企業知識庫。下面介紹安裝配置環境:

  1. jdk8
  2. centos7
  3. mysql5.7
  4. confluence6.9
安裝jdk8環境

由於centos之前已經安裝了jdk8,此處省略...

安裝mysql5.7

安裝參考文件:https://www.cnblogs.com/hujinzhong/p/11624889.html

官方推薦資料庫配置:https://confluence.atlassian.com/conf69/database-setup-for-mysql-950285439.html

mysql配置
#資料庫配置
[root@confluence mysql]# cat /etc/my.cnf
[mysqld]
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
transaction-isolation=READ-COMMITTED
max_allowed_packet = 512M
innodb_log_file_size=2GB
binlog_format=row

#啟動mysql
[root@confluence mysql]# /etc/init.d/mysql.server start
Starting MySQL. SUCCESS! 
[root@confluence mysql]# mysql -uroot -pmysql
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20 MySQL Community Server (GPL)

Copyright (c) 2000, 2017, 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>
建立confluence資料庫
mysql> create database confluence default character set utf8 collate utf8_bin;
mysql> grant all on confluence.* to 'confluence'@'%' identified by 'confluencepasswd';
mysql> flush privileges;
mysql> show databases;

如圖:

這裡操作flush privileges;報錯"1146 - Table 'mysql.servers' doesn't exist",解決方法:

第一步:drop table if exists mysql.servers;

第二步:執行建立指令碼,如下

CREATE TABLE `servers` (
        `Server_name` char(64) NOT NULL,
        `Host` char(64) NOT NULL,`Db` char(64) NOT NULL,
        `Username` char(64) NOT NULL,
        `Password` char(64) NOT NULL,
        `Port` int(4) DEFAULT NULL,
        `Socket` char(64) DEFAULT NULL,
        `Wrapper` char(64) NOT NULL,
        `Owner` char(64) NOT NULL,
        PRIMARY KEY (`Server_name`)
        ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';

第三步:再次執行flush privileges;,成功,如下圖

安裝confluence

軟體下載地址:https://www.atlassian.com/download

安裝配置:

#下載軟體包
[root@confluence app]# wget https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.9.0-x64.bin
[root@confluence app]# ls
atlassian-confluence-6.9.0-x64.bin  jdk-8u162-linux-x64.rpm

#授權
[root@confluence app]# chmod +x atlassian-confluence-6.9.0-x64.bin

#啟動
[root@confluence app]# ./atlassian-confluence-6.9.0-x64.bin 
Unpacking JRE ...
Starting Installer ...

This will install Confluence 6.9.0 on your computer.
OK [o, Enter], Cancel [c]
o
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

See where Confluence will be installed and the settings that will be used.
Installation Directory: /opt/atlassian/confluence 
Home Directory: /var/atlassian/application-data/confluence 
HTTP Port: 8090 
RMI Port: 8000 
Install as service: Yes 
Install [i, Enter], Exit [e]
i

Extracting files ...
                                                                           

Please wait a few moments while we configure Confluence.

Installation of Confluence 6.9.0 is complete
Start Confluence now?
Yes [y, Enter], No [n]
y

Please wait a few moments while Confluence starts up.
Launching Confluence ...

Installation of Confluence 6.9.0 is complete
Your installation of Confluence 6.9.0 is now ready and can be accessed via
your browser.
Confluence 6.9.0 can be accessed at http://localhost:8090
Finishing installation ...
[root@confluence app]#

這裡需要注意預設安裝埠號是8090,而安裝時埠號已經佔用,所以更改為8999

訪問測試:http://192.168.1.101:8999/

選擇外掛:

獲取授權碼:重要!重要!重要!

破解步驟
#關閉confluence
[root@confluence ~]# /etc/init.d/confluence stop
executing using dedicated 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 /opt/atlassian/confluence/logs/catalina.out
---------------------------------------------------------------------------
Using Java: /opt/atlassian/confluence/jre//bin/java
2019-11-29 10:56:20,576 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /opt/atlassian/confluence/conf/server.xml. No further action is required
---------------------------------------------------------------------------
Using CATALINA_BASE:   /opt/atlassian/confluence
Using CATALINA_HOME:   /opt/atlassian/confluence
Using CATALINA_TMPDIR: /opt/atlassian/confluence/temp
Using JRE_HOME:        /opt/atlassian/confluence/jre/
Using CLASSPATH:       /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar
Using CATALINA_PID:    /opt/atlassian/confluence/work/catalina.pid
Tomcat stopped.

#備份jar檔案
[root@confluence lib]# cd /opt/atlassian/confluence/confluence/WEB-INF/lib/
[root@confluence lib]# pwd
/opt/atlassian/confluence/confluence/WEB-INF/lib
[root@confluence lib]# cp atlassian-extras-decoder-v2-3.3.0.jar{,.bak}

#將該檔案移動並重命名為atlassian-extras-2.4.jar並上傳至本地windows破解
[root@confluence lib]# mv atlassian-extras-decoder-v2-3.3.0.jar /opt/atlassian-extras-2.4.jar

執行keygen:需要在window上安裝jdk(軟體位置:連結:https://pan.baidu.com/s/1gZvmHLUsHbt5XwmBweHsow
提取碼:c75d)

選擇從centos伺服器上下載到本地的atlassian-extras-2.4.jar檔案進行破解操作,會重新生成檔案,如下:

上傳破解後jar包到/opt/atlassian/confluence/confluence/WEB-INF/lib,並重命名為atlassian-extras-decoder-v2-3.3.0.jar

[root@confluence opt]# cd /opt/atlassian/confluence/confluence/WEB-INF/lib
[root@confluence lib]# ll atlassian-extras-2.4.jar
[root@confluence lib]# mv atlassian-extras-2.4.jar atlassian-extras-decoder-v2-3.3.0.jar

上傳mysql驅動至/opt/atlassian/confluence/confluence/WEB-INF/lib

重啟confluence服務

[root@confluence lib]# /opt/atlassian/confluence/bin/stop-confluence.sh
[root@confluence lib]# /opt/atlassian/confluence/bin/start-confluence.sh

重新訪問web頁面:

複製key內的內容,到confluence,然後設定資料庫:(這裡如果mysql的驅動沒有安裝,這裡會提示並且有下載地址!!!)

這裡如果資料庫設定不符合要求可能會提示"Confluence設定MySQL資料庫報錯:必須使用'READ-COMMITTED'作為預設隔離級別。"修復方法:

mysql -u root -p123456
SET GLOBAL tx_isolation='READ-COMMITTED';
 

#mysql資料庫建立

#1、設定mysql隔離級別 
#SET GLOBAL tx_isolation='READ-COMMITTED';
#2、設mysql 編碼utf8_bin
#3、設定連結編碼?useUnicode=true&characterEncoding=utf8

可以選擇示範站點:

安裝預設下一步即可完成操作。

安裝至此我們可以看一下版本使用期限,右上角小齒輪按鈕----一般設定---左側邊欄最下方--授權細節:

參考致謝:https://www.cnblogs.com/hujinzhong/p/11955880.html