systemconfigcluster配置cluster_第1页
systemconfigcluster配置cluster_第2页
systemconfigcluster配置cluster_第3页
systemconfigcluster配置cluster_第4页
systemconfigcluster配置cluster_第5页
已阅读5页,还剩10页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、使用system-config-cluster配置集群下面将使用system-config-cluster图形化集群配置工具配置apache(httpd)高可用集群在node03,node04的/etc/hosts中增加如下内容6566分别在node03,node04上安装cmanrgmanagersystem-configure-clusterhttpd#yuminstallcmanrgmanagersystem-config-clusterhttpd在node03上运行system-config-cluster命令,如图13-46所示cluser文件框输入webcluster作为集群的名字

2、,然后单击确定4.集群配置主界面,如图13-48所示ConfigurationElClusterConfigurationChooseanameforthe匚IufwebclusteijFileTools旦已IpUsingDistributedLockManaClusterConfigurationCurrentFileName:iquratioCustomConfiaureMulticastUseaQuorumDiskInterval:Votes:MinimumScoreDevice:Label:5.选择6单击ClusterClusterNodesFenceDevicesManagedRes

3、ourcesFailoverDomainsResourcesServices图13-47集吨厶择窗口左侧树形菜单中的CaClusterNode按钮以增加集群节点,弹出如图14-50所示的对话框集群命名图13-48集群配置主界面usterNodes项,如图13-49所示PropertiesClusterPropertiesClusterNameAlias:webclusterActualClusterName:webclusteTheActualClusterNameshouldbeusedforstorageconfiguraticsuchasmakingaclusteredfileCanfi

4、gVersion:1NumberofMembers:0LockingType:Distributed在ClusterNodeo的FQDN域名SustEfProName文本框中输入集群node03III;7ClusterNoDomainsCurrentlyConficPropertiesFailoverDomains7FenceDevicesxenfenceManagedResourcesFailoverDomainsResourcesServices图13-53故障倒换域弹出如图13-54所示的对话框,在NameforNewFailoverDomain文本框中输入webinfo作为故障倒换域名

5、,如图13-54所示图13-54故障倒换域命名接着出现如图13-55所示的界面,单击AvailableClusterNodes下拉菜单,依次选择集群节点node03,node04,如图13-56所示。添加完node03,node04后,选择窗口左侧节点,并在右边选择PrioritizedList复选框,单击下方上下箭头图标按钮高速节点优先级,如图13-57所示rFailoverDonainConfigurationNameofFailoverDomain:webfoNameofFailoverDomain:webfoAvailableClusterNodesTAvailableClusterN

6、odes=丁亠一l-rr.RestnctFailoverToThisFatioverDomain-,ThisDomainsMembiiscurrentlyemptyMemberNode口RestrictFailoverToThisDomainsMembersPriaritizedListPrioritizedListAdjustPriorityAdjustPriorityRemoveMembfromDomainRemoveMemberfromDomainhi图13-55选择集群节点(1)选择system-config-cluster主窗口左侧树形菜单图13-56选择集群节点(2)二中的Reso

7、urces项,如图13-58所示。单击右下角XClose的CreateaResource按钮FailoverDonainConfigurationNameofFailoverDomain:webfoNoClusterNodesAvailable=MemberNodePriorityRestrictFaiThisDoma12団PrioritizedL图13-57氓置节点优先级4.弹出类似图13-59所示对话框,单击下00(浮动ip)RemovefromDeAdjustPriplResourceConfigurationResourceConfiguration回図15.重复第14步,添加apac

8、he(httpd)脚本资源,如图13-60所示。在Name文本框中输入apache作为脚本资源名,在File(withpath)文本框中指定apache初始化脚本路径/etc/init.d/httpd。ScriptIPAddressResourceConfigurationScriptResourceConfigfurationName:apacheFile(withpath)/etc/init.d/httpd|SelectaResourceType:IPAddress图13-60创建脚本资源CreateaServiceonitorLink图13-59创建IP资6选择system-config

9、-cluster主窗口左侧树形菜单中的Services项,如图11-61所示。单击右下角的ice按钮弹出如图13-62所示的界面,在Name文本框中输入集群服务名www弹出如图13-62所示的界面,在FailoverDomain下拉列表中选择之前创建的故障倒换域webfo单击AddaSharedResourcetothisservice按钮,在弹出的如图13-64所示的对话框中选择已经创建的apache脚本资源返回如图13-65所示的图面,单击AttachaShareResourcetotheselection按钮在弹出如图13-64所示的对话框中选择之前创建的IP地址资源(00).完成之后的

10、界面如图13-66所示IllhioNameEIIIIIIttacliaSharapacheScriptSharedRe.回区|ServicelanagenentCiServicelanagMentSharedRe.00IPAddressapacheScriptSharedCreateaforthisserviceEditSelectedPrivateResou匸己PropertiesResourServiceName:wwwFailoverDomain:webfoNameTypeScopeRecoveryPolicyRestartQ0IPAddressAddaShared非Resourceto

11、图13-63集群服务配置(1)iHlniiir*r*iftiiII卜c卜Ir严、厂|严卜i舌、厂匚|图13-64选择资源ServiceName:wwwFailoverDomainapachmScript0AutostartThisServiceRunExclusivORelocateCreateaforthisSErvicEAttachanewPrivateResourcetotheSelectionEditSelectedPrivateResourcePropertiesODisableelectaSharembleResource:ODisableServiceResourceListSe

12、lectaShareableResource:rcRecoveryPolicyRestartRelocmtmNameTypeScopeName0AutostartThisServiceRunExclusiveviceResouremListAttachanewPrivateResourcetotheSelectionAttachaShared1365集群服务配置(2)totheselectionAddaSharedResourceto_thisservicewebfoXCancelXClosenx昜newresounce昜newresource图13-67所示。单20.弹出如图13-68所示的

13、界面。单击右下解的AddaNewFenceLevel按钮图13-68Fence配置(1)界面变为如图13-69所示的界面,单击右下角的AddaNewFencetothisLevel按钮弹出如图13-70所示的对话框。在Domain文本框填入虚拟机node03的域名标识node03FenceConfiguration13回区FenceConfigurationforClusterNode:nodeO3.Fenc$-Level-1PropertiesFenceLevel1FmnLevelFence配置(3)e會置(2)心F已n匸亡tc图規70咄,图13-69Fen!3完成上述操作之后的配置界面如图

14、4重复19步至23步,为集群node03添加Fence设备5单击system-config-cluster主窗口文件”-”保存”菜单,如图斐72所示13-71所示tliisLewi图13-71Fence配置(4)26.弹出如图13-73所示的对话框。默认cluster.conf文件名,保存于/etc/cluster目录下。图13-73集群配置文件保存路径将节点node03的集群配置文件复制到node04scp/etc/cluster/:/etc/cluster如果DomO上没有安装cman软件包,刚使用yum-yinstallcman命令安装.cman软件包中提供fence_xvmd程序创建X

15、VMFence密钥,并将其复制到其它节点和Dom0的/etc/cluster目录下面ddif=/dev/urandomof=/etc/cluster/fence_xvm.keybs=4O96count=1#scp/etc/cluster/fence_:/etc/cluster在Dom0上执行fence_xvmd-LX命令,启用XVMFence辅助功能依次在node03,node04上启动集群服务,并配置它们开机随系统启动servicecmanstartservicergmanagerstartchkconfigcmanonchkconfigrgmanageron重新进入system-confi

16、g-cluster配置界面,选择ClusterManagement标签,如图13-74所示。可以看到集群节点已经正在运行。使用”Enable”Disable”Restart”按钮进行启用禁用重启集群等服务选择“SCSI0:1”,分别打开两台虚拟机目录中的.vmx文件,在最后一行添加:disk.locking=FALSEscsi0:1.SharedBus=Virtual34.使用system-config-cluster创建资源,”在窗口左侧树形菜单中选择Resource”项,如图share-1所示,单击右下角处的CreateResource按钮,弹出的对话框如图share-2所示,在下拉开框中

17、选择FileSystem,在”Name文本框中输入webdata作为资源名,在FileSystemType中选择ext3的文件格式,MountPoint文本框中输入data作为文件系统的挂载点,Device文本框中指定设备节点/dev/sdb5口share-3OTypeIIIin置置i.H:apacheScriptSha駅ServicewwwSelectaResourceType:CurrentFileNameFileSystemResourceConfigurationnodeOJ.ex.tomClusterODisableClusterNodesFenceDevicesKEnfEnMana

18、gedResourcesClusterConfigurationElResourceConfigurationFilebols旦elpClusterConfigurationClusterMmnagementClusterClusterNodesMountPoint:Device:名viceResou亡己ListEditServiceProperties迫Delete弓erviceName:Name00IPAddressSharedwebdataFileSystemSharedwebdataFileSystemType:ext3/data/dev/sdb5FenceDevicesOptions

19、:FileSystemID:FailoverDomains団ReboothostnodEifunmountfmils出图Share-2资源配置lilitil-1RJeJbals旦elpFailoverDomain:webfoe:wwwClusterConfigurationClusterMmnagementCurrentFileName:RelocateServiceManagement7!ForceunrriountManagedResources団AutostartThisServiceRunExclusiveServicefmRecoveryPaliRestart菜单中选择”Servicewww”项,单击右下角”Edit羽

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论