wiki—-Confluence搭建

一、 参考文档

官方用户手册: https://www.cwiki.us/pages/viewpage.action?pageId=32998578

本手册 安装 文档 :

https://www.cnblogs.com/heaven-xi/p/11147073.html

https://www.cnblogs.com/crazyjump/p/10929111.html

二、安装前必要环境:jdk,mysql

M ysql5.7(理论上5.6+应该也可以),jdk1.8

三、安装包下载

安装版本:6.15.6

下载安装包

https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.15.6-x64.bin

下载破解工具

wget https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.zip

下载mysql驱动

wget https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.rar

四、安装步骤

chmod +x atlassian-confluence-6.15.6-x64.bin

./atlassian-confluence-6.15.6-x64.bin

 

安装中提示:

  • o确定安装,c取消

This will install Confluence 6.15.6 on your computer.

OK [o, Enter], Cancel [c]

o

Click Next to continue, or Cancel to exit Setup.

  • 选择2自定义安装

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]

2

  • 指定安装的目录,会自动创建,不输入直接回车就是使用默认路径

Select the folder where you would like Confluence 6.9.1 to be installed,

then click Next.

Where should Confluence 6.15.6 be installed?

[/opt/atlassian/confluence]

/home/o2oadmin/confluence/confluence

  • 指定路径存储数据

Default location for Confluence data

[/var/atlassian/application-data/confluence]

/home/o2oadmin/confluence/application-data/confluence

 

  • 使用默认的端口,8090和8000

Configure which ports Confluence will use.

Confluence requires two TCP ports that are not being used by any other

applications on this machine. The HTTP port is where you will access

Confluence through your browser. The Control port is used to Startup and

Shutdown Confluence.

Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]

1

  • 安装为后台进程,可后台运行

Confluence can be run in the background.

You may choose to run Confluence as a service, which means it will start

automatically whenever the computer restarts.

Install Confluence as Service?

Yes [y, Enter], No [n]

y

 

Extracting files ...

 

Please wait a few moments while we configure Confluence.

 

  • 确定开始安装

Installation of Confluence 6.15.6 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.6 is complete

Your installation of Confluence 6.15.6 is now ready and can be accessed via

your browser.

Confluence 6.15.6 can be accessed at http://localhost:8090

Finishing installation ...

 

五、mysql配置

1、配置文件

cat /etc/my.cnf

 

[mysqld]

init_connect='SET collation_connection = utf8_unicode_ci'

init_connect='SET NAMES utf8'

character-set-server=utf8

collation-server=utf8_bin

skip-character-set-client-handshake[client]

default-character-set=utf8

[mysql]

default-character-set=utf8

 

改完后重启

备注:

init_connect='SET collation_connection = utf8_unicode_ci'

init_connect='SET NAMES utf8'

这两个字段是必须设置的,其余设置也可以安装o2o数据库安装规范来配置。

2、建库

create database confluence default character set utf8 collate utf8_bin;

grant all on confluence.* to 'confluence'@'%' identified by '123456';

flush privileges;

SET GLOBAL tx_isolation='READ-COMMITTED'; #不设置这个安装过程中会报错

3、mysql驱动安装

解压confluence破解工具.rar包,上传mysql驱动文件mysql-connector-java-5.1.44-bin.jar 到目录/home/o2oadmin/confluence/confluence/confluence/WEB-INF/lib

六、破解

  1. 备份jar包 mv /home/o2oadmin/confluence/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.3.0.jar /opt/atlassian-extras-2.4.jar

  2. 将atlassian-extras-2.4.jar传到本地windows机器 破解jar需要在本地windows上安装java环境,这里不详细记录 将下载的包confluence破解工具.zip 解压后,将confluence_keygen.jar 传到windows机器,然后在windows机器中进入命令行运行confluence_keygen.jar

、启动配置

1、启停

停止:sh /home/o2oadmin/confluence/confluence/bin/stop-confluence.sh

启动:sh /home/o2oadmin/confluence/bin/start-confluence.sh

另外,日志获取可以查看: /home/o2oadmin/confluence/application-data/confluence/logs/atlassian-confluence.log

2、访问和初始化

访问:http://ip:8090

 

八、字体乱码问题解决

新导入的confluence可能在附件预览的时候出现中文乱码问题,可以使⽤用如下方式解 决:

1) 先安装想要的字体, 如微软雅⿊黑, 宋体等, 从windows/font下拷到linux的/usr/share/fonts下, 新建个⽬目录⽐比如msttcore放进去, 请⾃自⾏行行搜索linux下新字体的安装⽅方法

2) 在confluence的安装⽬目录, 如/opt/atlassian/confluence/bin下找到setenv.sh, 找到 CATALINA_OPTS, 加入一行

CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/msttcore/ ${CATALINA_OPTS}"

3) 清空confluence的home下viewfile⽬目录和shared-home/dcl-document⽬目录⾥里里的所有缓存⽂文档 ⽂文件, 不不清空的话, confluence预览旧⽂文件时还是会显示⽅方框,只有新⽂文件才会正常.

4)重启confluence就OK了了 注意:建议直接把所有中⽂文字体全部导⼊入,否则如果附件中的⼀一些字体未安装,同样会报

乱码问题。

 

1、中文字体库安装

参考:ankao ttps://blog.csdn.net/q260996583/article/details/78904331

 

1、yum install -y fontconfig mkfontscale

2、fc-list :lang=zh 查看是否有中文字体,fc-list查看所有安装字体

3、安装好后/usr/share目录下多两个目录fonts和fontconfig

4、首先在/usr/share/fonts目录下新建一个目录chinese

5、到C:\Windows\Fonts目录下上传你需要的字体到/usr/shared/fonts/chinese目录下

6、修改chinese权限

chmod -R 755 /usr/share/fonts/chinese

7、接下来需要安装ttmkfdir来搜索目录中所有的字体信息,并汇总生成fonts.scale文件,输入命令:

yum -y install ttmkfdir

8、最后一步就是修改字体配置文件了,首先通过编辑器打开配置文件:

vi /etc/fonts/fonts.conf

 

<!-- Font directory list -->

<dir>/usr/share/fonts</dir>

<dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>

<dir prefix="xdg">fonts</dir>

<dir>/usr/share/fonts/chinese<dir>

<!-- the following element will be removed in the future -->

<dir>~/.fonts</dir>

 

9、fc-cache刷新

10、fc-list可以看到刚刚的配置了

 

九 、 修改web端口为80

前面的八步 是confluence的正常安装破解手册,参照该手册 可以完成confluence的搭建。

但是 由于o2o搭建confluence需要使用 web端口为 80端口,所以在安装完成后, 我们需要对配置文件进行修改(confluence执行安装时默认的启动账户时程序自建的“confluence”账号,所以在安装过程中,是不能直接修改成80端口的)。

详细步骤如下:

1、 将启动账户改成root

修改 /home/o2oadmin/confluence/confluence/bin/user.sh, 将账户改成root。

2、 修改端口号

vim /home/o2oadmin/confluence/confluence/conf/server.xml

 

重启启动confluence

posted @ 2020-03-27 13:39  Me无情  阅读(1254)  评论(0编辑  收藏  举报