云网牛站
所在位置:首页 > Linux云服务器 > 在Zimbra CentOS 7上安装Zextras Suite的方法

在Zimbra CentOS 7上安装Zextras Suite的方法

2019-02-20 16:08:30作者:戴进稿源:云网牛站

我的任务是将运行在Ubuntu上的Zimbra的域,用户帐户和所有邮箱迁移到运行在CentOS 7上的Zimbra,有两种方法:第一种是在CentOS 7上安装Zimbra并编写bash脚本以便于迁移域,用户帐户,通讯组列表,联系人,日历,备注,转发规则和所有其他用户首选项,这将是一项艰巨的任务,而且流程将很慢并且容易出错。第二种是使用Zextras Suite在服务器之间迁移数据,它支持从单个服务器迁移到多服务器设置。

 

系统要求

1、准备好Zimbra设置,这可以是单服务器安装或多群集设置,对于Zimbra的多服务器安装,请参考在CentOS 7系统上安装Zimbra Multi-Server的步骤

2、下载Zextras Suite,它将安装在运行mailboxd守护程序的所有服务器上,记得逐个安装它们,特别是如果你在邮箱服务器上运行LDAP服务器。

3、ZeXtras Suite使用端口8735和8736进行存储到存储通信,确保你的服务器可以在此端口上相互访问,并且相同的端口对外部流量是封闭的,可能需要禁用SELinux或将其置于许可模式,参考在RHEL 8/CentOS 8系统中禁用SELinux的方法

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

 

在Zimbra CentOS 7上安装Zextras Suite

1、下载Zextras Suite,可到zextras网站中下载:

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

该软件包包含以下组件:

ZeXtras Suite Core,缩写为ZeXtras Core或Core,它是一个扩展Zimbra的jar包

ZeXtras Suite管理Zimlet缩写为ZeXtras Suite Zimlet或Zimlet,一个访问和管理Core的管理zimlet。

ZAL,Zimbra的开源抽象层。

安装脚本遵循上述结构,允许你使用三个安装目标:core,zimlet和all,后者相当于安装核心和紧随其后的zimlet。

在防火墙上打开8735和8736 TCP端口:

# firewall-cmd --permanent 8735/tcp 

# firewall-cmd --permanent --add-port 8735/tcp 

# firewall-cmd --reload

success

2、解压缩Zextras Suite包

现在解压缩包,以便开始安装:

# tar xvf zextras_suite-latest.tgz

更改为Zextras Suite目录:

# cd zextras_suite-<version>

对我来说,我会这样做:

# cd zextras_suite-2.6.4

通过运行带有所有选项的./install.sh bash脚本来启动安装:

# ./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.

应该得到下面的输出:

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.2/zal-2.2-8.8.8.jar ==> 301 Moved Permanently (1s)

** GET http://openzal.org/2.2/zal-2.2.1-8.8.8.jar ==> 200 OK (1s)

Download succeeded and validated for ZAL branch 2.2 variant 8.8.8

ZeXtras Suite Core will now be installed. Proceed? [Y] Y

出现提示时确认Zimbra Web Application停止:

Do you wish to stop the Zimbra Web Application (mailboxd)? [Y] Y

在下一个提示中确认所有内容:

****************  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 2.6.4

[] INFO: Enabling Zimlet com_zextras_zextras

[] INFO: Deploying on service node mx-01

[] INFO: post to server mx-01, data size 834976

[] INFO: Deploy initiated. Check the server mx-01's mailbox.log for the status.

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.

In order to clear your server's Zimlet cache, simply run

« zmprov fc -a zimlet »

as the zimbra user.

E.g. « su - zimbra -c 'zmprov fc -a zimlet' »

清除服务器缓存:

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

 

在NFS上配置ZxBackup(可选)

如果你对为ZxBackup配置NFS感兴趣,请按照以下步骤操作,如果要使用/opt/zimbra/backup/zextras/的默认备份路径,请跳过此部分。

第1步:为ZeXtras Backup备份数据添加磁盘并在其上创建文件系统:

# parted /dev/xvdc mklabel gpt

# parted /dev/xvdc mkpart primary 0% 100%

# mkfs.xfs /dev/xvdc1

第2步:挂载文件系统

我将/dev/xvdc1挂载到/mnt目录并为ZeXtras备份创建一个单独的目录:

# mount /dev/xvdc1 /mnt

# df -hT | grep /mnt

/dev/xvdc1 xfs 200G 33M 200G 1% /mnt

# mkdir /mnt/zextras

# chown -R zimbra:zimbra /mnt/zextras

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

# yum -y install nfs-utils

# vim /etc/idmapd.conf

Domain = domain.com

获取Zimbra用户的UID/GID:

# id zimbra

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

配置导出文件:

# 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服务

# systemctl start rpcbind nfs-server 

# systemctl enable rpcbind nfs-server

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

# firewall-cmd --add-service=nfs --permanent

# firewall-cmd --reload

# exportfs -rvv

第6步:在所有邮箱服务器(源和目标)上安装NFS路径

一切都准备就绪,继续配置nfs客户端:

# yum -y install nfs-utils

# systemctl start rpcbind && systemctl enable rpcbind

配置fstab以进行持久安装:

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

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

# mkdir -p /mnt/zextras

# chown -R zimbra:zimbra /mnt/zextras

# mount -a

# df -hT | grep /mnt/ze

192.168.1.10:/mnt/zextras nfs4 200G 33M 200G 1% /mnt/zextras

 

初始化Zextras备份及初始化指南

1、初始化Zextras备份

现在安装完成,让我们初始化Zextras Backup,要正常工作,ZeXtras Backup需要文件系统上的专用目录来保存其所有配置和所有备份数据,该目录的默认路径是/opt/zimbra/backup/zextras/。

初始化过程自动创建所需的文件夹结构和配置文件,你需要执行初始化过程:

1]、安装ZeXtras Suite后立即。

2]、每次在ZeXtras Administration Zimlet的ZxBackup选项卡中更改“备份目标路径”。

2、初始化指南

要初始化ZeXtras备份模块,请按照以下步骤运行SmartScan:

1]、访问Zimbra Admin界面。

2]、在管理控制台的左窗格中,选择ZeXtras以显示ZeXtras面板。

3]、单击“备份”选项卡(需要ZeXtras Suite试用版或有效的许可证)。

4]、在“基本备份配置”下,单击“立即初始化”

如果配置了NFS部分,请记住将路径从/opt/zimbra/backup/zextras/更改为/mnt/zextras:

在Zimbra CentOS 7上安装Zextras Suite的方法

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

# su - zimbra -c "zxsuite backup monitor"

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

# su - zimbra

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

 

ZeXtras Suite卸载、安装后和卸载后

1、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

2、安装后和卸载后

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

$ zmprov fc zimlet

 

相关主题

使用Firewall及ufw配置Zimbra的方法

精选文章
热门文章