confluence7.2.1的部署与迁移---呕心沥血版

1.概述

Confluence是一个专业的企业知识管理与协同软件,也可以用于构建企业wiki。使用简单,但它强大的编辑和站点管理特征能够帮助团队成员之间共享信息、文档协作、集体讨论,信息推送。
到官网下载最新版本,截止目前最新版本为7.2.1
默认可以免费试用30天,如果还想继续使用,就需要购买license或者破解,本次部署使用的是正版confluence。
新版已将汉化包集成,所以不需要去下载额外的汉化包,这就方便多了。
Confluence默认选的数据库是PostgreSQL,MySQL也行,建议用PostgreSQL,本次部署使用的阿里云RDS。

2.安装

\==至官网下载最新的版本

cd /opt
wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-7.2.1-x64.bin

\==授予执行权限

chmod +x atlassian-confluence-7.2.1-x64.bin
==安装
sudo ./atlassian-confluence-7.2.1-x64.bin

可以自定义安装,也可以默认安装,笔者采用自定义安装,需要制定安装路径和数据存放路径

Unpacking JRE ...
Starting Installer ...
Oct 11, 2017 6:09:21 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Oct 11, 2017 6:09:21 PM

java.util.prefs.FileSystemPreferences$2 run
INFO: Created system preferences directory in java.home.
This will install Confluence 6.4.2 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]
2
Where should Confluence 6.4.2 be installed?
[/opt/atlassian/confluence]
/usr/local/confluence
Default location for Confluence data
[/var/atlassian/application-data/confluence]
/mnt/confluence-data
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]

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.4.2 is complete
Start Confluence now?
Yes [y, Enter], No [n]
n (参考下面红字处选择n)

Please wait a few moments while Confluence starts up.
Launching Confluence ...
Installation of Confluence 6.4.2 is complete
Your installation of Confluence 6.4.2 is now ready and can be accessed via
your browser.

Confluence 6.4.2 can be accessed at http://localhost:8090
Finishing installation ...

#此处可以先执行n不启动,把mysql插件mysql-connector-java-5.0.8-bin.jar拷贝到/opt/atlassian/confluence/confluence/WEB-INF/lib/目录下以后,再启动
# 启动方式为cd /opt/atlassian/confluence/bin/ ./startup.sh

至此,可以在浏览器中输入http://localhost:8090 或者http://ip:8090,即可看到初始化界面
因为是在ECS上安装的,所以需要在实例安全组中开放8090端口

选择产品安装

此处按需选择,也可以不选择直接下一步

把购买的正版授权码添加进去或是使用试用版授权码,后期可在confluence配置界面使用管理员账号进行配置

获取使用授权后根据提示注册邮箱并登陆

此时会跳出运行连接,或是回到填写授权码界面输入


下一步

选择数据库这里我选的是mysql,我使用的阿里云RDS数据库

使用mysql连接工具对数据库排序规则进行更改

使用mysql客户端连接工具 或者是navicat for mysql

到此安装完毕

下面进行迁移操作

confluence安装分为两种方式confluence+jira(用户管理)方式和单confluence(自行管理用户)方式

迁移1   confluence+jira(用户管理)方式   向  confluence+jira(用户管理)方式 迁移

迁移2  confluence+jira(用户管理)方式    向   单confluence(自行管理用户)方式   迁移    {需要修改用户目录如下图}

迁移3   单confluence(自行管理用户)方式   向 单confluence(自行管理用户)方式  迁移

**本章节展示的是迁移3

将源主机上的最新备份文件拷贝到迁移目的主机上,备份文件路径为/var/atlassian/application-data/confluence/backups/**

将备份文件拷贝到目的主机/var/atlassian/application-data/confluence/restore下

使用管理员账号登录confluence 然后一般配置中选择 《备份与还原》

然后点击选中备份文件,进行导入

此时会进入导入界面,请耐心等待      进度达到100%时可将此页面关掉,cho

1.导入完成后登录管理员账号则会变为源wiki的账号,使用源wiki的管理员账号登录即可

2.在目的服务器配置nginx,并在阿里云将域名地址解析到目的服务器的ip

3.然后使用管理员账号(参考1.)登录新的congfluence并在一般配置管理中修改url

修改完成之后,右上角会弹出报错界面(此界面未截图),报错原因是部署时使用的ip+端口形式,在配置界面改为域名访问时,tomcat会发生域名无法匹配的报错,此报错解决方法为

在目的confluence服务器/opt/atlassian/confluence/conf/server.xml文件里添加以下行

然后重启confluence

重启方式,将进程杀掉,然后执行/opt/atlassian/confluence/bin/startup.sh &

重启后登录将秘钥添加到新的confluence

在----》一般配置《-----》授权细节《   授权码框中添加保存即可

以上部署迁移全部完成!

你可能感兴趣的:(confluence7.2.1的部署与迁移---呕心沥血版)