搭建公司wiki系统-confluence

搭建公司wiki系统-confluence 

一、环境

# uname -a
Linux client02 2.6.32-754.el6.x86_64 #1 SMP Tue Jun 19 21:26:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
# java -version
java version "1.8.0_192"
Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)
# mysql --version
mysql  Ver 14.14 Distrib 5.7.33, for Linux (x86_64) using  EditLine wrapper

二、安装confluence

版本:atlassian-confluence-7.4.8

下载地址

https://www.atlassian.com/software/confluence/download-archives

安装

# chmod +x atlassian-confluence-7.4.8-x64.bin 
# ./atlassian-confluence-7.4.8-x64.bin 
Unpacking JRE ...
Starting Installer ...

This will install Confluence 7.4.8 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 7.4.8 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 7.4.8 is complete
Your installation of Confluence 7.4.8 is now ready and can be accessed via
your browser.
Confluence 7.4.8 can be accessed at http://localhost:8090
Finishing installation ...

主要的配置文件路径

Installation Directory: /opt/atlassian/confluence
Home Directory: /var/atlassian/application-data/confluence
HTTP Port: 8090
RMI Port: 8000

安装完成,浏览器打开

 

 

 

三、破解

破解需要两步,一是破解文件,二是获取授权码

一、破解文件

1、请将confluence7.4破解包下载到本机电脑上

http://down.whsir.com/downloads/confluence7.4pojie.zip

2、请将java8程序下载安装到本机电脑上

http://down.whsir.com/downloads/jdk-8u172-windows-x64.exe

注:安装java用于运行confluence7.4破解程序

3、破解文件

在CentOS服务器上下载/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jarw文件到本地重命名为atlassian-extras-2.4.jar

通过java运行confluence_keygen.jar(文中最开始的那个破解包,在windows上运行,需要在windows上安装好java)

选择.patch!找到刚才重命名的那个文件打开

# cd /opt/atlassian/confluence/confluence/WEB-INF/lib/
# sz atlassian-extras-decoder-v2-3.4.1.jar 
rz
Starting zmodem transfer.  Press Ctrl+C to cancel.
Transferring atlassian-extras-decoder-v2-3.4.1.jar...
  100%       6 KB       6 KB/sec    00:00:01       0 Errors  

 

 

 

 

打开后在当前目录下可以看到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.4.1.jar

然后上传回CentOS服务器/opt/atlassian/confluence/confluence/WEB-INF/lib/目录,覆盖掉原来的atlassian-extras-decoder-v2-3.4.1.jar文件

此时要重启confluence服务:/etc/init.d/confluence restart

 

二、获取授权码

访问web页面,获取服务器ID,http://IP:8090

 

 

 复制网页中的服务器ID,运行破解工具confluence_keygen.jar,破解复制Key到Confluence里,获得授权码,进行下一步

 

 三、连接配置

 

 

 

提示要安装一个驱动

 依照操作安装驱动

配置MySQL驱动:https://confluence.atlassian.com/doc/database-jdbc-drivers-171742.html

mysql-connector-java-5.1.46-bin.jar是confluence连接mysql数据库相关的jar包。

# wget http://down.whsir.com/downloads/mysql-connector-java-5.1.46.tar.gz
--2021-04-02 11:39:18--  http://down.whsir.com/downloads/mysql-connector-java-5.1.46.tar.gz
Resolving down.whsir.com... 205.185.115.165
Connecting to down.whsir.com|205.185.115.165|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4434926 (4.2M) [application/octet-stream]
Saving to: “mysql-connector-java-5.1.46.tar.gz”

100%[===============================================================>] 4,434,926   1.63M/s   in 2.6s    

2021-04-02 11:39:21 (1.63 MB/s) - “mysql-connector-java-5.1.46.tar.gz” saved [4434926/4434926]

# tar -zxvf 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


配置MySQL:https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html

配置数据库

mysql>  create user confluence@'*' identified by 'confluence';
Query OK, 0 rows affected (0.01 sec)

mysql> 
mysql> create database confluence character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on confluence.* to confluence@'*';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> 

 

 

 

 测试连接成功后,点下一步,会安装服务

 

 

选择加载空白站点

 

 创建管理员账号

 

 

 

 

 安装成功

 

 

 

 

 

 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

连接数据库时报错

 

 

解释下这2个名词的意思:

1)utf8_bin:将字符串中的每一个字符用二进制数据存储,区分大小写。 
2)utf8_general_ci:不区分大小写,ci为case insensitive的缩写,即大小写不敏感。速度比较快 
3)utf8_general_cs:区分大小写,cs为case sensitive的缩写,即大小写敏,感速度比较快

4)utf8_unicode_ci:校对规则仅部分支持Unicode校对规则算法,一些字符还是不能支持,不能完全支持组合的记号。 
utf8_general_ci是一个遗留的 校对规则,不支持扩展,它仅能够在字符之间进行逐个比较。这意味着utf8_general_ci校对规则进行的比较速度很快,但是与使用 utf8_unicode_ci的校对规则相比,比较正确性较差。

修改数据库

mysql> alter database confluence default collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

mysql>
mysql>

 

posted @ 2021-04-07 12:22  Justtosee  阅读(1824)  评论(0编辑  收藏  举报