Confluence 实现公司wiki

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Confluence 实现公司wiki相关的知识,希望对你有一定的参考价值。

安装并配置mysql

[[email protected] ~]# tail  -13 /etc/my.cnf
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
max_allowed-packet=34M
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
innodb_log_file_size=256M
init_connect=‘SET collation_connection = utf8_unicode_ci‘
init_connect=‘SET NAMES utf8‘

[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[[email protected] ~]#

重启mysqld服务,并创建confluence使用的库及授权相关用户:

[[email protected] ~]# systemctl restart mysqld
[[email protected] ~]# mysql -p

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

mysql> grant all on confluence.* to ‘confluenceAdmin‘@‘192.%‘ identified by ‘[email protected]‘;
Query OK, 0 rows affected, 1 warning (0.00 sec)

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

mysql> \q
Bye
[[email protected] ~]# 

安装atlassian-confluence

[[email protected] confluence]# ls
atlassian-confluence-6.3.1-x64.bin
atlassian-extras-decoder-v2-3.2.jar
atlassian-universal-plugin-manager-plugin-2.22.jar
[[email protected] confluence]# chmod +x atlassian-confluence-6.3.1-x64.bin 
[[email protected] confluence]# ./atlassian-confluence-6.3.1-x64.bin 
Unpacking JRE ...
Starting Installer ...

This will install Confluence 6.3.1 on your computer.
OK [o, Enter], Cancel [c]
o
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.3.1 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.3.1 is complete
Your installation of Confluence 6.3.1 is now ready and can be accessed via
your browser.
Confluence 6.3.1 can be accessed at http://localhost:8090
Finishing installation ...
[[email protected] confluence]# lsof -i:8090
COMMAND   PID       USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
java    24169 confluence   36u  IPv6 1465531      0t0  TCP *:8090 (LISTEN)
[[email protected] confluence]# lsof -i:8000
COMMAND   PID       USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
java    24169 confluence   54u  IPv6 1466046      0t0  TCP localhost:irdmi (LISTEN)
[[email protected] confluence]# 

通过以上可以看出confluence安装到了/opt/atlassian/confluence和/var/atlassian/application-data/confluence目录下,并且confluence默认监听的端口是8090.一路默认安装即可!
注意:confluence的主要配置文件为/opt/atlassian/confluence/conf/server.xml,和jira类似。此server.xml相当于tomcat中的server.xml配置文件,如果要修改访问端口,可以这里修改。
如果要修改confluence的数据目录,可以在安装的时候,在安装过程中进行更换(默认是/var/atlassian/application-data/confluence)

设置firewalld 开放相关port

[[email protected] confluence]# firewall-cmd --zone=public --add-port=8090/tcp --permanent
success
[[email protected] confluence]# firewall-cmd --zone=public --add-port=8000/tcp --permanent
success
[[email protected] confluence]# firewall-cmd --reload
success
[[email protected] confluence]#

在浏览器中输入confluence的地址及port,访问如下所示:
技术分享图片

根据向导安装产品,如下所示:
技术分享图片

然后系统服务server _Id 并需要用户输入 授权码,如下所示:
技术分享图片

接下来需要破解confluence,首先停止confluence服务,如下所示:

[[email protected] 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
2018-05-03 17:31:28,470 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.
[[email protected] confluence]# 
[[email protected] ~]# sz /opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.2.jar 

从/opt/atlassian/confluence/confluence/WEB-INF/lib中,拷贝atlassian-extras-decoder-v2- 3.2.jar到windows,并重命名为atlassian-extras-2.4.jar。

在windows下,生成License Key。
1)cmd 中执行: java -jar confluence_keygen.jar,如下所示
技术分享图片

2)然后把上面保存的Server ID(服务器ID)粘贴进去,然后点击“.gen!”,保存生成的key,如下所示:
技术分享图片

3)打补丁。点击“.patch!”,选择第2步中重命名的atlassian-extras-2.4.jar,会生成新的atlassian-extras-2.4.jar,旧的jar包会被改为.bak。
技术分享图片

4)将新的atlassian-extras-2.4.jar和mysql-connector-java-5.1.39-bin.jar到/opt/atlassian/confluence/confluence/WEB-INF/lib,并且删除旧的atlassian-extras-decoder-v2-3.2.jar。

[[email protected] ~]# rz  (接收破解后的atlassian-extras-2.4.jar文件)
[[email protected] ~]# cp atlassian-extras-2.4.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/
[[email protected] ~]# rm -f /opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.2.jar
[[email protected] ~]# cp mysql-connector-java-5.1.39-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/

启动confluence
[[email protected] confluence]# /etc/init.d/confluence start

To run Confluence in the foreground, start the server with start-confluence.sh -fg
executing using dedicated user: confluence
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
2018-05-03 17:34:36,954 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 started.
[[email protected] confluence]# lsof -i:8090
COMMAND   PID       USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
java    24442 confluence   36u  IPv6 1468808      0t0  TCP *:8090 (LISTEN)
[[email protected] confluence]# 

接下来回到浏览器 ,选择数据库类型,如下所示:
技术分享图片

然后配置数据库,如下所示:
技术分享图片

设置mysql的jdbc ,如下所示:
技术分享图片

选择空白站点,如下所示:
技术分享图片

配置用户管理,如下所示:
技术分享图片

配置管理密码,如下所示:
技术分享图片

创建空间,以存储内容:
技术分享图片

查看授权的详细信息:点击一般设置-->管理-->授权细节,可以查看license信息。
技术分享图片

以上是关于Confluence 实现公司wiki的主要内容,如果未能解决你的问题,请参考以下文章

confluence

Confluence wiki——CentOS6.8搭建详解

升级公司confluence版本

confluence 安装部署

敏捷团队协作:Confluence简易教程

confluence wiki 安装