欢迎光临
我们一直在努力

实现基于sql server存储账号的mdaemon群集_mdaemon server

建站超值云服务器,限时71元/月

·本章概述
MDaemon Server(以下简称 MDaemon) 的冗余方案有多种选择,本章将以微软公司出品的 SQL Server 2005 简体中文企业版(以下简称 SQL2005)作为 MDaemon 账户存储数据库,在微软群集(MSCS)上部署 SQL2005 虚拟服务器群集,从而实现 MDaemon 的故障自动转移,达到用户所要求的高可用性。

因为本章重点放在 MDaemon 群集的实现上,所以关于 MSCS 和 SQL2005 群集的部署请参考:
1.Windows Server 2003 群集的创建和配置
http://www.microsoft.com/china/technet/prodtechnol/windowsserver2003/technologies/clustering/confclus.mspx

2.部署SQL2005群集实战总结
http://goxia.maytide.net/p/sql2005_cluster.php
本次实验所使用的 MDaemon 版本是 v7.23 英文版,建议大家不论测试还是实际生产环境最好都使用英文版以避免不必要的错误故障,如果情况允许最好操作系统也选择英文版,因为在实际情况中发现英文版的 MDaemon 与中文系统存在兼容性会导致菜单显示不完整。

·测试环境
宿主:
硬件配置:PIV2.4G / 1.5G-DDR400 / 80G-7200pm / 8139C-NIC
操作系统:Windows XP Pro With SP2 ENU
虚拟平台:VMware GSX 3.2.1
—————————————————————————————————————-
NodeA:
硬件配置:PIV2.4G / 512M / 10G+0.5G(Qdisk)+4G(Sdisk) / vlance-NIC+vmxnet-NIC
操作系统:Windows Server 2003 EE With SP1 CHS
网络信息:vlance-NIC:10M 全速半双工 / Heartbeat / IP192.168.236.250
vmxnet-NIC:1000M 全速全双工 / Public / IP192.168.199.250
承载信息:DC+DNS+IIS+SQL2005+MSCS
—————————————————————————————————————-
NodeB:
硬件配置:PIV2.4G / 512M / 10G+0.5G(Qdisk)+4G(Sdisk) / vlance-NIC+vmxnet-NIC
操作系统:Windows Server 2003 EE With SP1 CHS
网络信息:vlance-NIC:10M 全速半双工 / Heartbeat / IP192.168.236.251
vmxnet-NIC:1000M 全速全双工 / Public / IP192.168.199.251
承载信息:DC+DNS+IIS+SQL2005+MSCS
—————————————————————————————————————-
MSCS:
MSCS:IP192.168.199.200 / HostName:CLUSTER
SQL2005 VirtualHost:IP192.168.199.201 /HostName:SQL2005

·理论概念 %26amp; 最终目标
使用 SQL2005 作为 MDaemon 账户存储数据库并基于群集模式,以保障 MDaemon 任何一个节点服务器出现故障后仍然能够提供域和帐户的验证及管理。

使用资源磁盘(以下简称Sdisk)来存储 MDaemon 的用户数据,以保障 MDaemon 任何一个节点服务器出现故障后,用户在通过验证后登录到 MDaemon 上取得的邮件与数据一致。

最后通过 MSCS 的故障自动转移,实现 MDaemon 的冗余。

为此,在 SQL2005 中创建一个用来保存 MDaemon 域和帐户信息的数据库,命名为 MDaemonUsers。然后将 MDaemon 账户存储方式配置为 ODBC 方式,并创建与 SQL2005 中 MDaemonUsers 数据库的连接,导入账户数据库查询。修改 MDaemon 默认账户模板的存储路径,在群集管理器中将 MDaemon 配置为群集中的一个“通用服务”资源。

·实施部署
首先在获得活动资源的节点服务器上安装 MDaemon ,请记录下安装时管理员的名称和密码,完成 MDaemon 的安装后,强烈建议重新启动一次系统,确保 MDaemon 服务正常运转。之后进行以下的操作:
1、打开数据库管理器,创建一个新的数据库,名称为:MDaemonUsers。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/2.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

3、因为 MDaemon 当前只绑定在 192.168.199.251 上,群集 IP 不在绑定范围,会导致实际中出现访问故障。为此,打开 MDaemon 管理器并点击导航栏上的“Setup”,选择“Primary domain…”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/4.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

5、为了让 MDaemon 的用户数据都保存在 Sdisk 下,需要修改默认新用户配置。为此,点击导航栏上的“Accounts”,选择“New account defaults…”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/6.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

7、因为在 MDaemon 安装时创建了一个管理员,为了保证每个节点中 MDaemon 管理员的一致性,则需要将管理员的数据也迁移到 Sdisk 中。为此,点击导航栏上的“Accounts”,选择“Account manager…”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/8.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

9、现在进行 MDaemon 账户存储方式的修改,将其改为 ODBC 中的 SQL Server 存储方式。为此,点击导航栏上的“Accounts”,选择“Account database…”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/10.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

11、进入配置页面后,点击“New DSN”,开始创建数据源。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/12.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

13、在“创建新数据源”配置中,选择数据源类型为“系统数据源(只用于当前机器)”,并点击“下一步”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/14.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

15、至此,就完成了以 SQL Server 为连接类型的系统数据源的创建,点击“完成”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/16.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

17、验证与连接配置中,我是按照默认配置的。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/18.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

19、其他选项为默认,并点击“完成”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/20.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

21、至此就在本节点服务器上建立了一个以 SQL Server 连接,名为“MDaemonUsers”的 ODBC 机器数据源。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/22.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

23、因为 ODBC 中的“MDaemonUsers”数据源所对应的 SQL2005 下的数据库“MDaemonUsers”中没有 MDaemon 所需要的表,所以我们运行 MDaemon 自带的脚本来创建它。为此,点击“Run a script to created the necessary tables…”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/24.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

25、此时会弹出“Tables created successfully!”的提示,如果失败请重新检查之前的步骤确保数据源创建成功。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/26.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

27、MDaemon 开始转换数据,并给出提示。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/28.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

29、在“新建资源”中填写相关信息,这里我为资源命名为“MDaemon Server”,因为 MDaemon 本身并不支持群集,而它的群集实现纯粹是靠 DIY 出来的,所以为了能够使 MDaemon 被 MSCS 所支持,在“资源类型”中选择“通用服务”,完成后点击“下一步”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/30.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

31、在“依存”关系中,请将 MDaemon 群集依赖的资源添加到“资源依存”中,完成后点击“下一步”。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/32.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

33、完成资源添加后,“MDaemon Server”便出现在“组0”中,将其联机后,系统会自动启动 MDaemon。
520)this.width=520;” src=”http://www.knowsky.com/http://goxia.maytide.net/up/MDaemonCluster/34.JPG” onload=”javascript:if(this.width>520)this.width=520;” align=absMiddle border=0 twffan=”done”>

·结尾
MDaemon 的群集创建结束了,下来我们可以开启第一台节点进行灾难模拟,以检验此次部署实施的 MDaemon 冗余方案的效果。经过测试,当一台节点停止后,另一台节点迅速接管群集资源,并启动 MDaemon 服务。小注:当只剩下一台节点时,通过 MDaemon 自身来停止服务是无效的,经过测试关闭 MDaemon 服务后,系统会自动再次开启 MDaemon 服务,如果在此环境下作 MDaemon 的停机维护,需要通过群集管理器将 MDaemon Server 脱机。

关于 MDaemon 的群集打算做成一个系列,而这个系列的名字就以需求为根本,名为《MDaemon Server 冗余方案系列》,在今后还将推出多种 MDaemon 的冗余方式供大家参考选择。不过,个人认为此次群集的实施方式所达到的冗余,可能只有在大环境中才能得到真正的应用。如果能够脱离微软群集(MSCS)来实现 MDaemon 的冗余就会有很大的应用市场。

欢迎大家与我共同探讨关于 MDaemon 的冗余实现技术,同时希望大家能参与到讨论中。
欢迎大家对本文进行讨论,论坛地址如下:
http://www.5dmail.net/bbs/Announce/Announce.asp?BoardID=34%26amp;ID=135513

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 实现基于sql server存储账号的mdaemon群集_mdaemon server
分享到: 更多 (0)