confluence安裝

簡介

  • Confluence是一個專業的企業知識管理與協同軟件,也能夠用於構建企業wiki。使用簡單,但它強大的編輯和站點管理特徵可以幫助團隊成員之間共享信息、文檔協做、集體討論,信息推送。
  • Confluence爲團隊提供一個協做環境。在這裏,團隊成員齊心合力,各擅其能,協同地編寫文檔和管理項目。今後打破不一樣團隊、不一樣部門以及我的之間信息孤島的僵局,Confluence真正實現了組織資源共享。

實驗環境

服務器centos7.2(建議內存至少2G以上),windows系統客戶端一臺,win7x64便可html

安裝部署jdk

服務器和客戶端都須要安裝jdk,jdk下載url:java

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmlmysql

confluence安裝

windows系統客戶端操做:linux

下載confluence破解包,破解包須要java來運行nginx

https://www.lanzous.com/i19po4d 密碼:2zghsql

客戶端下載安裝java數據庫

jdk-8u172-windows-x64.exevim

服務器端安裝confluence

服務器操做:windows

一、安裝jdkcentos

yum install jdk-8u172-linux-x64.rpm

二、下載confluence
下載confluence6.9.0:

wget -O atlassian-confluence-6.9.0-x64.bin https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.9.0-x64.bin

三、設置文件執行權限

chmod +x atlassian-confluence-6.9.0-x64.bin

四、安裝

./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
    這裏輸入數字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
    輸入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 ...

注意:防火牆放行8090端口

安裝完成會自動啓動

五、打開網頁獲取ID

訪問http://IP:8090

confluence安裝

confluence安裝

confluence安裝

confluence安裝

能夠看到服務器ID了,接下來就要開始破解了

六、破解

破解須要分兩步:

  • 一是破解文件
  • 二是獲取受權碼

1、破解文件

從服務器上下載/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.3.0.jar文件到windows客戶端重命名爲atlassian-extras-2.4.jar
運行confluence_keygen.jar(文中最開始的那個破解包,在windows上運行,須要在windows上安裝好java)
confluence安裝

confluence安裝

選擇.patch!找到剛纔重命名的那個文件打開

confluence安裝

打開後在當前目錄下能夠看到atlassian-extras-2.4.jar和atlassian-extras-2.4.bak兩個文件,這裏atlassian-extras-2.4.jar已是破解好的了,將atlassian-extras-2.4.jar名字改回來atlassian-extras-decoder-v2-3.3.0.jar
上傳到服務器上的/opt/atlassian/confluence/confluence/WEB-INF/lib/目錄,覆蓋原來的atlassian-extras-decoder-v2-3.3.0.jar

2、獲取受權碼

複製網頁中的服務器ID,運行破解工具confluence_keygen.jar,破解複製Key到Confluence裏,得到受權碼,進行下一步

confluence安裝
confluence安裝

confluence安裝

七、重啓服務

service confluence restart

八、配置mysql數據庫,我這裏使用的是mysql5.5版本(mysql數據庫安裝此處不做說明)

mysql -uroot -p
mysql> create user confluence@localhost identified by 'confluence123456';
mysql> select user,host,password from mysql.user;
mysql> create database confluence character set utf8 collate utf8_bin;
mysql> grant all privileges on confluence.* to confluence@'localhost';
mysql> quit

此時建立了一個confluence用戶,來管理confluence數據庫,此處密碼設置爲confluence123456

修改/etc/my.cnf配置,在[mysqld]下設置一條

# vim /etc/my.cnf
transaction-isolation=READ-COMMITTED

若是不設置,後續配置時會提示「您的數據庫必須使用'READ-COMMITTED'做爲默認隔離級別」

九、回到網頁中繼續設置數據庫

confluence安裝

根據提示下載mysql驅動程序

wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
    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

重啓confluence

service confluence restart

重啓完成後刷新當前頁面

十、輸入數據庫對應的主機端口及賬號密碼,最後點擊測試鏈接,鏈接成功繼續下一步

confluence安裝

十一、建立一個空白站點

confluence安裝

十二、配置賬號

confluence安裝

confluence安裝

confluence安裝

confluence安裝

confluence安裝

1三、最後再驗證下

配置完成登陸系統,驗證下受權
管理→通常配置→受權細節

confluence安裝

配置nginx反向代理confluence

# vim /etc/nginx/vhost/itks.oceanwing.com.conf

[root@lnmp ~]# cat /etc/nginx/vhost/itks.oceanwing.com.conf
server
{
    listen 80;
    server_name itks.oceanwing.com itks.anker-in.com;

    if ($host != 'itks.anker-in.com' ) {
        rewrite  ^/(.*)$  http://itks.anker-in.com/  permanent;
    }
    #PROXY-START
    location ~ /purge(/.*) {
        proxy_cache_purge cache_one $host$request_uri$is_args$args;
        access_log /var/log/nginx/itks.oceanwing.com_purge_cache.log;
        allow 127.0.0.1;
        allow 10.1.116.4;
        allow 10.1.46.189;
        deny all;
    }
    location ~ .*\.(gif|jpg|png|htm|html|flv|ico|mp4|swf)\?(.*)
    {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header REMOTE-HOST $remote_addr;
        proxy_pass http://172.16.20.247:8090;
        proxy_redirect off;
        proxy_cache cache_one;

    }
    location /
    {
        proxy_pass http://172.16.20.247:8090;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header REMOTE-HOST $remote_addr;

        #緩存相關配置
        proxy_cache cache_one;
        proxy_cache_key $host$request_uri$is_args$args;
        proxy_cache_valid 200 304 301 302 1h;

        #持久化鏈接相關配置
        #proxy_connect_timeout 30s;
        #proxy_read_timeout 86400s;
        #proxy_send_timeout 30s;
        #proxy_http_version 1.1;
        #proxy_set_header Upgrade $http_upgrade;
        #proxy_set_header Connection "upgrade";
        proxy_cache_valid 200 302 1h;

        proxy_cache_valid 301 1d;

        proxy_cache_valid any 1m;

        add_header X-Cache $upstream_cache_status;

        expires 12h;
    }

    #PROXY-END
    access_log /var/log/nginx/${host}_access.log format1;
}

檢查nginx:

# nginx -t

從新加載nginx配置:

# nginx -s reload

confluence安裝

相關文章
相關標籤/搜索