0%

Centos6环境下搭建及破解confluence

Confluence是一个专业的企业知识管理与协同软件,也可以用于构建企业wiki。使用简单,但它强大的编辑和站点管理特征能够帮助团队成员之间共享信息、文档协作、集体讨论,信息推送。【来自百度百科】

我们只是需要一个知识库……
公司没有专门的知识库,企业wiki,团队的人资料文档都放在自己手里,你懂的?工作的文档一直都是svn提交,查看起来很不方便;长时间下来,没有技术共享、交流,积累;多方询问,别人推荐使用confluence,先搭建起来用用看。

系统环境

Centos 6.9
Jdk 1.8.112
Mysql 5.7.20
Atlassian-confluence-6.3.1

安装jdk

1
2
3
4
5
6
7
8
tar xf jdk-8u112-linux-x64.tar.gz -C /usr/local/
-- 配置环境变量
vim /etc/profile
export JAVA_HOME=/usr/local/jdk1.8.0_112/
export CLASSPATH=.:$JAVA_HOME/lib/:$JAVA_HOME/jre/lib/
export PATH=$JAVA_HOME/bin:$PATH
-- 使环境变量生效
source /etc/profile

安装mysql

1
2
3
4
5
6
7
8
9
10
11
12
wget https://mirrors.huaweicloud.com/repository/toolkit/mysql/Downloads/MySQL-5.7/mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar
tar xf mysql-5.7.20-1.el6.x86_64.rpm-bundle.tar
yum localinstall mysql-community-common-5.7.20-1.el6.x86_64.rpm mysql-community-client-5.7.20-1.el6.x86_64.rpm mysql-community-server-5.7.20-1.el6.x86_64.rpm mysql-community-libs-compat-5.7.20-1.el6.x86_64.rpm mysql-community-libs-5.7.20-1.el6.x86_64.rpm mysql-community-devel-5.7.20-1.el6.x86_64.rpm
-- 修改mysql参数
vim /etc/my.cnf
max_allowed_packet = 256M
innodb_log_file_size=512M
--启动mysqld服务
/etc/init.d/mysqld start
--查看初始密码
grep 'temporary password' /var/log/mysqld.log
2018-04-03T02:44:31.357861Z 1 [Note] A temporary password is generated for root@localhost: OUGiG=n-l8lY
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
[root@3g3MplC6 ~]# mysql -uroot -pOUGiG=n-l8lY
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 12
Server version: 5.7.20

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.
--mysql5.7密码策略比较高,设置一下复杂度和长度
mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)
--修改一下root用户的密码为'ffffff'(生产环境不建议这么操作)
mysql> alter user root@localhost identified by 'ffffff';
Query OK, 0 rows affected (0.00 sec)
--创建一个mysql数据库confluence,创建用户confluence,密码为confluencepwd
mysql -uroot -p'ffffff' -e "create database confluence default character set utf8 collate utf8_bin;grant all on confluence.* to 'confluence'@'%' identified by 'confluencepwd';"

安装confluence

1
2
3
4
5
6
7
8
9
wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-6.3.1-x64.bin
数据库驱动包和破解补丁包: 链接: https://pan.baidu.com/s/1YfwGC2NDBVs3udsVb-i6fA 密码: ix7u
chmod +x atlassian-confluence-6.3.1-x64.bin
./atlassian-confluence-6.3.1-x64.bin
/etc/init.d/confluence stop
上传以下两个包到此目录下/opt/atlassian/confluence/confluence/WEB-INF/lib
atlassian-extras-3.2.jar
mysql-connector-java-5.1.42-bin.jar
/etc/init.d/confluence start

可以看到安装目录为
Installation Directory: /opt/atlassian/confluence
Home Directory: /var/atlassian/application-data/confluence
默认端口为8090
confluence

配置confluence

http://192.168.6.186:8090

设置为中文语言

confluence

产品安装

confluence

直接下一步

confluence

复制服务器ID,点击获得授权码

confluence

参考图片设置

confluence
confluence

1
2
3
4
5
6
7
8
9
10
服务器ID:
BZ0A-OLZE-ZYYB-3PFX
授权码:
AAABLA0ODAoPeNptkF9rwjAUxd/zKQJ72PYQSaOiCIFp24FQragbU/aShesWqLHepKLffqmdzP15C
ISce8753dwsK6DDEilvU84HXT4QEY2TJRU86pMEnEZTerOzMt7ZTVGB1UDvFoAHwPvXAU0PqqhUP
UBihPMlUR5kbWe8w3ibBKNX2k/VFmTE+/2e6ImH/b6ld1uiQ2griOYA0mMFzcPCK/SAcqMKBxd/O
lGm+BPw3X/lz4wG62B5KuHcGueTSTqPx8OMFI30DOhqjyAh1XqwKuyVHkuDpyv8bo2f47uyxjUdR
3OrLGnWHydytOZDlmfrlK1XqxFrzx5fyCKdynBYFkWdnhC8S75wwnw2Tn5KZ9xptX0DzDdPLlBJF
l0M//PMKtQfysHvb/4EqFmR3DAtAhUAjJ5DzWcXkYufaw72NYIZs/rFeJgCFEocDK77ZwHKpPhhI
vo1bD3HDmJIX02f3

confluence

选择MySQL

confluence

选择JDBC

confluence
根据下图显示,在数据库URL添加?useSSL=false&useUnicode=true&characterEncoding=utf8
&是代替&,否则启动会报错,这里没有改的话,可以在/var/atlassian/application-data/confluence/confluence.cfg.xml文件中修改
confluence

选择空白站点

confluence

在Confluence中管理用户与组

confluence

配置系统管理员账户

confluence

配置完成

confluence

破解confluence

替换/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.2.jar包,进行破解

参考链接:
https://blog.csdn.net/wh211212/article/details/76131569
http://www.confluence.cn