环境介绍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。