如何在Zimbra CentOS 7上安装Zextras Suite

时间:2020-02-23 14:31:19  来源:igfitidea点击:

最近,我负责将域,用户帐户和所有邮箱从在Ubuntu 16.04上运行的Zimbra 8.6迁移到在CentOS 7上运行的Zimbra 8.x的方法。
有两种潜在的实现方法:在CentOS 7上安装Zimbra 8.8并编写bash脚本以促进域,用户帐户,通讯组列表,联系人,日历,便笺,转发规则和所有其他用户首选项的迁移。
这将是一项艰巨的任务,过程将很慢且容易出错。
使用Zextras Suite在服务器之间迁移数据。
它支持从单服务器到多服务器设置的迁移。

系统要求:

就绪的Zimbra设置,可以是单服务器安装,也可以是多群集安装。
对于Zimbra的多服务器安装,请查看我们以前的指南–> https://theitroad.com/zimbra-multi-server-installation-on-centos-7/Downloaded Zextras Suite,它将安装在所有运行邮箱的服务器上守护程序。
请记住一一安装。
特别是如果LDAP服务器在邮箱服务器上运行。
ZeXtrasSuite使用端口8735和8736进行存储间通信,请确保服务器可以在此端口上相互访问,并且该端口对外部通信是封闭的。
我们可能需要禁用SELinux或者将其置于许可模式。

请注意,必须在所有商店服务器(运行了邮箱服务的服务器)上安装zeXtras Suite。

在Zimbra CentOS 7上安装Zextras Suite

下载最新版本的Zextras Suite:

wget http://download.zextras.com/zextras_suite-latest.tgz

该软件包包含以下组件:ZeXtras Suite Core,缩写为ZeXtras Core或者Core,是一个jar包,扩展了ZimbraZeXtras Suite Administrative Zimlet(缩写为ZeXtras Suite Zimlet)或者Zimlet(访问和管理Core.Zimlet的管理Zimlet)的功能。
Zimbra的开源抽象层。

安装脚本遵循上述结构,可为我们提供三个安装目标:核心,zimlet和全部。
后者等效于安装核心以及紧随其后的zimlet。
在防火墙上打开8735和8736 TCP端口:

sudo firewall-cmd --permanent --add-port 8735/tcp 
sudo firewall-cmd --permanent --add-port 8736/tcp 
sudo firewall-cmd --reload

解压缩Zextras Suite软件包

现在打开包装,以便开始安装。

tar xvf zextras_suite-latest.tgz

转到Zextras Suite目录:

cd zextras_suite

通过运行带有all选项的./install.sh bash脚本开始安装。

sudo ./install.sh all

要获取帮助,请运行:

# ./install.sh -h
./install.sh -h | ./install.sh [ -u ] [ -d ] all|zimlet|core
-h This very message
-d Activates debug mode for the install script
-u Uninstall the target
The targets available for (un)installation are:
core -- Core
zimlet -- Zimlet
all -- Core followed by Zimlet
* In order to use both
* core and zimlet need to be installed.

我们应该获得如下输出:

------------------------
Checking for existing installations ...
FOUND Zimbra 8.8.11 FOSS

Checking whether you are installing the latest version ...
Current release: 3.0.1
Latest  release: 2.4.13
For more information check the Changelog at
http://wiki.zextras.com/wiki/Changelog
This installer is up to date: version 3.0.1
------------------------
Checking whether the Core is already installed ...
Checking whether the ZAL is already installed ...
Checking whether the ZeXtras Suite Zimlet is already installed ...
Checking whether the ZeXtras Migration Tool Zimlet is already installed ...
------------------------
------------------------
No preexistent Core installation found.
No preexistent ZeXtras Migration Tool Zimlet installation found.
No preexistent ZeXtras Suite Zimlet installation found.
------------------------
---------------------------------------------------------------------
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
ZeXtras WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU FIRST
ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.
License Terms for this ZeXtras Suite Software:
https://www.zextras.com/eula/
---------------------------------------------------------------------

Do you agree with the terms of the software license agreement? [N] Y

---------------------------------------------------------------------
In order to be operational, ZeXtras Suite requires the "ZAL" library
to be installed.
ZAL is released under the GNU General Public License version 2.
Due to license restraints, the ZAL library can't be distributed with
ZeXtras Suite , and therefore must be downloaded from the ZAL website.
---------------------------------------------------------------------

Do you wish for ZeXtras Suite to automatically download, install and upgrade the ZAL Library? [Y/N] [] Y

Checking for the most up-to-date version of the ZAL library...

===========================
Beginning Core installation procedure ...

** **** **** **** **** **** **** **  Note  ** **** **** **** **** **** **** **
In addition to the ZeXtras Suite Zimlet a command line tool
is also available, "zxsuite" .
Run it as the zimbra user in order to see the available options.
** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **
Press ENTER to continue ...

按<Enter>继续。
应该开始下载ZAL库,并要求我们确认安装,请按Y继续。

** **** **** **** **** **** **  WARNING:  ** **** **** **** **** **** **
ZeXtras Suite needs to bind on TCP ports 8735 and 8736 in order
to operate, for inter-instance communication.
The ZeXtras Chat module needs to bind on TCP ports 5222 and/or 
5223 in order for any XMPP feature to be functional.
Please verify no other service listens on these ports and that 
ports 8735 and 8736 are properly filtered from public access 
by your firewall.
** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **
Downloading the ZAL library. It might take a few minutes ...
** GET http://openzal.org/2.8/zal-2.8-8.8.11.jar ==> 301 Moved Permanently
** GET http://openzal.org/2.8/zal-2.8.0-8.8.11.jar ==> 200 OK (1s)
Download succeeded and validated for ZAL branch 2.8 variant 8.8.11

ZeXtras Suite Core will now be installed. Proceed? [Y] Y
The Zimbra Web Application must be restarted 
in order to perform the installation.

出现提示时,确认Zimbra Web应用程序已停止:

Do you wish to stop the Zimbra Web Application (mailboxd)? [Y] Y
Stopping mailboxd...done.
zimbra-chat package detected
ZeXtras Suite Chat is a superset of zimbra-chat with its own database and can't be run together
Uninstall zimbra-chat? [Y] Y
done
ZeXtras Core installation successfully completed.
* Be warned that ZeXtras Suite needs for the
* related zimlet to be installed in order to operate.
Starting The Zimbra Web Application (mailboxd) ....
mailboxd is running.
Waiting 60s for Zimbra to initialize ...
===========================
===========================
Beginning ZeXtras Suite Zimlet installation procedure ...

The ZeXtras Suite Zimlet will now be installed. Proceed? [Y] Y
Checking whether the Core is already installed ...
ZeXtras Suite Core detected.

** **** **** **** **** **** **** **  Note  ** **** **** **** **** **** **** **
WARNING: Zimbra 8.x users might experience slowness and AJAX errors
when accessing the Zimbra Administration Console because of the
Zimbra DOS Filter. In this case, raising the number of Maximum Requests
per Second is suggested (see http://wiki.zextras.com/DosFilter
for further informations)
** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** **
Press ENTER to continue ...
Deploying zimlet ...
[] INFO: Deploying Zimlet com_zextras_zextras in LDAP.
[] INFO: Installing Zimlet com_zextras_zextras on this host.
[] INFO: Upgrading Zimlet com_zextras_zextras to 3.0.1
[] INFO: Enabling Zimlet com_zextras_zextras
The ZeXtras Suite Zimlet has been successfully installed.
===========================
After installing/uninstalling ZeXtras Suite Zimlet,
it's highly suggested to clear both your browser's and server's cache.

清除服务器缓存:

sudo su - zimbra -c 'zmprov fc -a zimlet'

初始化Zextras备份

安装完成后,让我们初始化Zextras Backup。
为了正常工作,ZeXtras Backup在文件系统上需要一个专用目录来保存其所有配置和所有备份数据。
该目录的默认路径是/opt/zimbra/backup/zextras /。
初始化过程会自动创建文件夹结构和所需的配置文件。
我们需要执行初始化过程:在安装ZeXtras Suite之后,立即在ZeXtras Administration Zimlet的ZxBackup选项卡中更改"备份目标路径"。

在NFS上配置ZxBackup(可选)

如果我们有兴趣为ZxBackup配置NFS,请执行以下步骤。
如果要使用默认的备份路径/opt/zimbra/backup/zextras /步骤1:为ZeXtras Backup备份数据添加磁盘并在其上创建文件系统,请跳过此部分。

sudo parted /dev/xvdc mklabel gpt
sudo parted /dev/xvdc mkpart primary 0% 100%
sudo mkfs.xfs /dev/xvdc1

第2步:挂载文件系统我将/dev/xvdc1挂载到/mnt目录,并为ZeXtras备份创建一个单独的目录。

sudo mount /dev/xvdc1 /mnt
sudo mkdir /mnt/zextras
sudo chown -R zimbra:zimbra /mnt/zextras

步骤3:安装和配置NFS服务器

sudo yum -y install nfs-utils

获取Zimbra用户的UID/GID

# id zimbra
uid=996(zimbra) gid=993(zimbra) groups=993(zimbra),5(tty)

配置导出文件

$sudo vim /etc/exports
/mnt/zextras 192.168.1.0/24(rw,anonuid=996,anongid=993,no_root_squash)

将192.168.1.0/24替换为我们需要可从中访问NFS服务的子网。
步骤4:启动并启用NFS服务

sudo systemctl start rpcbind nfs-server 
sudo systemctl enable rpcbind nfs-server

步骤5:在防火墙上打开nfs端口

sudo firewall-cmd --add-service=nfs --permanent
sudo firewall-cmd --reload
sudo exportfs -rvv

步骤6:在所有邮箱服务器(源和目标)上安装NFS路径一切都应准备就绪,继续配置nfs客户端。

sudo yum -y install nfs-utils
sudo systemctl start rpcbind && sudo systemctl enable rpcbind

配置fstab以进行持久挂载:

192.168.1.10:/mnt/zextras /mnt/zextras nfs defaults 0 0

创建/mnt/zextras目录,并将所有权更改为zimbra用户和组:

sudo mkdir -p /mnt/zextras
sudo chown -R zimbra:zimbra /mnt/zextras
sudo mount -a
sudo df -hT | grep /mnt/ze

初始化指南

要初始化ZeXtras备份模块,只需执行以下步骤即可运行SmartScan:访问Zimbra Admin界面。
在管理控制台的左窗格中,选择ZeXtras以显示ZeXtras面板。
单击Backup选项卡(需要ZeXtras Suite Trial或者有效许可证)。
在"基本备份配置"下,单击"立即初始化"。
如果配置了NFS部件,请记住将路径从/opt/zimbra/backup/zextras /更改为/mnt/zextras。

使用以下命令查看初始化进度:

sudo su - zimbra -c "zxsuite backup monitor"

一旦完成SmartScan,ZxBackup将被完全初始化并正常工作!该操作被推入队列,操作完成后将立即通知我们。
为了监视此操作的进度,请以zimbra用户身份在shell中运行以下命令:

sudo su - zimbra
$zxsuite backup monitor 29b58b66-4a41-4816-b5c8-6a4e035cf50f

ZeXtras Suite卸载

拆卸过程与安装过程大致相似。
需要在所有目标之前放置-u开关。
该脚本将验证任何ZeXtras Suite组件的存在并提示将其删除。

./install.sh -u all

这将同时卸载ZeXtras Core和ZeXtras Administration Zimlet要仅卸载ZeXtras Core,请运行:

./install.sh -u core

通过运行以下命令删除ZeXtras Administration Zimlet:

./install.sh -u zimlet

安装后和卸载后

在安装或者卸载ZeXtras Suite之后,强烈建议我们清除浏览器和服务器的缓存。
要清除服务器的Zimlet缓存,请以zimbra用户身份运行以下命令:

$zmprov fc zimlet