環境介紹html
系統:centos7.2java
IP:172.16.91.140node
mysql:5.7.27mysql
confluence:6.17.5nginx
java:1.8.0_65git
參考連接:https://gitee.com/pengzhile/atlassian-agent/blob/master/README.mdweb
(一)下載安裝mysql5.7.27軟件包,刪除系統自帶的mariadb軟件包sql
(1)官網下載:mysql-5.7.27-1.el7.x86_64.rpm-bundle數據庫
[root@localhost ~]# rpm -qa | grep mariadb mariadb-libs-5.5.44-2.el7.centos.x86_64 [root@localhost ~]# rpm -e mariadb-libs-5.5.44-2.el7.centos.x86_64 --nodeps [root@localhost ~]# mkdir /usr/local/tools #將mysql安裝包放到/usr/local/tools下 [root@localhost tools]# ls mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar [root@localhost tools]# tar xvf mysql-5.7.27-1.el7.x86_64.rpm-bundle.tar mysql-community-libs-5.7.27-1.el7.x86_64.rpm mysql-community-embedded-devel-5.7.27-1.el7.x86_64.rpm mysql-community-libs-compat-5.7.27-1.el7.x86_64.rpm mysql-community-devel-5.7.27-1.el7.x86_64.rpm mysql-community-embedded-compat-5.7.27-1.el7.x86_64.rpm mysql-community-common-5.7.27-1.el7.x86_64.rpm mysql-community-client-5.7.27-1.el7.x86_64.rpm mysql-community-server-5.7.27-1.el7.x86_64.rpm mysql-community-test-5.7.27-1.el7.x86_64.rpm mysql-community-embedded-5.7.27-1.el7.x86_64.rpm [root@localhost tools]# rpm -ivh mysql-community-common-5.7.27-1.el7.x86_64.rpm warning: mysql-community-common-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-common-5.7.27-1.e################################# [100%] [root@localhost tools]# rpm -ivh mysql-community-libs-5.7.27-1.el7.x86_64.rpm warning: mysql-community-libs-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-libs-5.7.27-1.el7################################# [100%] [root@localhost tools]# rpm -ivh mysql-community-client-5.7.27-1.el7.x86_64.rpm warning: mysql-community-client-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-client-5.7.27-1.e################################# [100%] [root@localhost tools]# rpm -ivh mysql-community-server-5.7.27-1.el7.x86_64.rpm warning: mysql-community-server-5.7.27-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql-community-server-5.7.27-1.e################################# [100%] [root@bogon tools]# grep 'temporary password' /var/log/mysqld.log 2019-08-29T11:25:07.899785Z 1 [Note] A temporary password is generated for root@localhost: b7oyaNs&OZoy [root@bogon tools]# mysql -u root -p Enter password: mysql>
(2)修改mysql管理員密碼,建立confluence數據庫及confluence用戶centos
mysql> set password for root@localhost = password('Mysql@123'); Query OK, 0 rows affected, 1 warning (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'@'172.16.91.140' identified by 'Confluence@123'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec)
(二)官網下載confluence安裝包,拷貝到系統中,開始安裝及破解
(1)下載路徑:https://www.atlassian.com/software/confluence/download,選擇Linux64位
下載下來的安裝包名稱:atlassian-confluence-6.15.7-x64
(2)上傳安裝包到系統目錄下,開始安裝
[root@bogon tools]# chmod 755 atlassian-confluence-6.15.7-x64.bin [root@bogon tools]# ./atlassian-confluence-6.15.7-x64.bin Unpacking JRE ... Starting Installer ... This will install Confluence 6.15.7 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.15.7 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.15.7 is complete Your installation of Confluence 6.15.7 is now ready and can be accessed via your browser. Confluence 6.15.7 can be accessed at http://localhost:8090 Finishing installation ...
經過安裝步驟,confluence已默認安裝到/opt/atlassian/confluence和/var/atlassian/application-data/confluence目錄下,監聽端口:8090
安裝完成,經過web端開始訪問:172.16.91.140:8090
選擇生產安裝-->下一步
下一步
記住服務器ID:B44B-W8G9-SZDD-G0JM(本身搭建的confluence的ID)
使用破解工具進行破解(破解工具下載地址:http://www.pc6.com/softview/SoftView_476126.html)
解壓後的文件有:
[root@bogon key]# ls atlassian-extras-2.4.bak confluence_keygen.jar keygen.bat keygen_MacOSX.sh keygen.sh
將/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar重命名並破解
[root@bogon ~]#mv /opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.3.0.jar /opt/atlassian-extras-2.4.jar
運行破解程序,輸入Name、Server ID點擊.patch,根據目錄找到/opt/atlassian-extras-2.4.jar,而後點擊,gen!,就會出現破解碼
[root@bogon key]# java -jar confluence_keygen.jar
將/opt/atlassian-extras-2.4.jar 從新修更名稱並放回原目錄並重啓confluence
[root@bogon ~]#mv /opt/atlassian-extras-2.4.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.3.0.jar [root@bogon ~]#/etc/init.d/confluence restart
從新訪問172.16.91.140:8090,輸入破解碼
鏈接數據庫
輸入相關信息,出現報錯:
您的數據庫必須使用「READ-COMMITTED」做爲默認隔離級別
修改數據庫:
[root@bogon key]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 9 Server version: 5.7.27 MySQL Community Server (GPL) Copyright (c) 2000, 2019, 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> SET GLOBAL tx_isolation='READ-COMMITTED'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.10 sec)
從新測試鏈接成功,下一步,等待數據庫初始化
用戶名,密碼:wiki
初次登陸,出現以下報錯,登陸管理員界面,查看具體報錯信息
能夠查看「我該如何解決」,查看解決方法
設置NGINX反向代理
[root@localhost ~]#cat /usr/local/nginx/conf/vhost/cf.ilanni.com.conf upstream confluence { server 127.0.0.1:8090; } server { listen 80; server_name cf.ilanni.com; server_tokens off; client_max_body_size 0; access_log /var/log/confluence_access.log access; error_log /var/log/confluence_error.log; location / { proxy_read_timeout 300; proxy_connect_timeout 300; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto http; proxy_pass http://confluence; } }
設置NGINX代理完畢以後,設置confluence的配置文件,修改/opt/atlassian/confluence/conf下的server.xml
而後重啓confluence及NGINX。