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;

如图:

image-20200916171049080

这里操作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;,成功,如下图

image-20200916171137961

安装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

image-20200916172208620

image-20200916172513264

访问测试:http://192.168.1.101:8999/

image-20200917101354990

选择插件:

image-20200917101427950

获取授权码:重要!重要!重要!

image-20200916173015439

破解步骤
#关闭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)

image-20200917102232223

选择从centos服务器上下载到本地的atlassian-extras-2.4.jar文件进行破解操作,会重新生成文件,如下:

image-20200917102430925

上传破解后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页面:

image-20200917102743766

复制key内的内容,到confluence,然后设置数据库:(这里如果mysql的驱动没有安装,这里会提示并且有下载地址!!!)

image-20200916182858034

这里如果数据库设置不符合要求可能会提示"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

可以选择示范站点:

image-20200917102923335

安装默认下一步即可完成操作。

安装至此我们可以看一下版本使用期限,右上角小齿轮按钮----一般设置---左侧边栏最下方--授权细节:

image-20200917103411849

参考致谢:https://www.cnblogs.com/hujinzhong/p/11955880.html

posted @ 2020-09-17 11:29  janehost  阅读(1541)  评论(0编辑  收藏  举报