文章目錄
1. 下載 Confluence 6.3.4 安裝包
wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-6.3.4-x64.bin
安裝較低版本是爲了可以使用 onlyoffice 的插件,該插件 1.1.0 版本只支持到 confluence 6.4。
2. 安裝 mysql (若已安裝則跳過)
安裝 mysql :
sudo apt-get install mysql-server
在 mysql 命令行中運行下面命令:
#創建數據庫:
create database confluence character set utf8 collate utf8_bin;
#添加用戶並授權:
grant all privileges on confluence.* to confluence@localhost identified by 'password';
#刷新數據庫權限:
flush privileges;
3. 開始安裝
運行命令:
sudo ./atlassian-confluence-6.3.4-x64.bin
然後按照提示一步步設置。
安裝完成後,
- 默認 confluence 安裝在 /opt/atlassian/confluence
- 默認數據存放在 /var/atlassian/application-data/confluence
- 默認端口 8090 (後續修改端口: /opt/atlassian/confluence/conf/server.xml)
安裝完成後暫時不要啓動 confluence 。
4. 添加 mysql 驅動
從 mysql 官網下載 java 版的連接器,這裏下載的是:
mysql-connector-java-5.1.46-bin.jar
把這個文件複製到 /opt/atlassian/confluence/confluence/WEB-INF/lib/ 目錄中。
5. 初始化 confluence
sudo service confluence start
啓動 confluence , 打開頁面 http://localhost:8090 ,進入系統安裝頁面。
- 第一步,選擇自己設置,用於生產環境。
- 第二步,配置數據庫,根據實際需求填寫。(還支持postgresql, oracle, ms sql server)
- 第三步,輸入許可證。 這裏點擊 “生成 JIRA 試用許可證” 鏈接,到官網申請一個試用許可證,再填到這裏。
- 第四步,設置管理員賬戶。
注意,mysql 需要加額外參數,示例如下:
jdbc:mysql://localhost:3306/confluence?sessionVariables=tx_isolation='READ-COMMITTED’
參考鏈接:https://confluence.atlassian.com/confkb/confluence-fails-to-start-and-throws-mysql-session-isolation-level-repeatable-read-is-no-longer-supported-error-241568536.html
初始化完成。
6. 使用 nginx 進行端口轉發
參照官方文檔:
https://confluence.atlassian.com/confkb/how-to-use-nginx-to-proxy-requests-for-confluence-313459790.html
https://confluence.atlassian.com/doc/running-confluence-behind-nginx-with-ssl-858772080.html
7. 其他
關於crack,下載對應的包,替換 /opt/atlassian/confluence/confluence/WEB-INF/lib/ 目錄中的同名文件即可。注意需要在申請許可證之前做這個步驟。