设为首页
加入收藏
广告投放
 | 网站首页 | 安全资讯 | 技术文章 | 下载中心 | 图片中心 | 网络技术 | 网站建设 | 精品图书 | 访客留言 | 网管论坛 | 

  没有公告

今天是:
| 新手学堂 | 操作系统 | 数据库 | 邮件系统 | 防火墙 | 系统安全 | 方案设计 | 视频教程 | 网站推广 | 认证考试 |
| 系统优化 | 硬件学堂 | 专家答疑 | 管理脚本 | 存储备份 | 交换路由 | ISA Server | 网管专区 | 推荐书籍 | 加密破解 |
| 办公教程 | SQL Server | Exchange 教程 | Photoshop | HTML 教程 | CSS 教程 | Dreamweaver| Flash教程 | ASP教程 |
您现在的位置: 天下网管联盟 >> 技术文章 >> 软件应用 >> 操作系统 >> 微软系统 >> 文章正文
Vmware gsx server 下RedHat Advanced Server 2.1集群配置         ★★★
Vmware gsx server 下RedHat Advanced Server 2.1集群配置
副标题:
作者:佚名 文章来源:网络 点击数: 更新时间:2006-8-17
         -----------By rdd

一.    宿主计算机硬件配置

P4 1.7G 384m内存 winxp系统

二.    虚拟硬件环境

两台vmware gsx server下安装的RedHat Advanced Server 2.1

主机1:主机名linuxone,网卡配置 ----------172.16.1.1(外部联网),1.1.1.1(心跳线)。

主机2:主机名 linuxtwo 网卡配置 ----------172.16.1.2(外部联网),1.1.1.2(心跳线)。

三.    系统安装

所需软件:vmware-gsx-server-installer-2.5.1-5336.exe

      RedHat Advanced Server 2.1

安装步骤:

1.    安装vmware-gsx-server-installer-2.5.1-5336.exe后,在vmware中新建虚拟机(分配内存128M)并保存在d:\zhongguochun\linuxad1,用redhat光盘安装RedHat Advanced Server 2.1,为了加快安装,你可以在boot:后面输入text进入文本安装模式。别的地方不说了。在选择安装类型那里选择custom,然后在包列表那里要选择上kernel source.

主机名设置为linuxone,ip地址设置为172.16.1.1 255.255.0.0

2.    ……….中间省略n多过程

3.    安装完成

4.    在d:\zhongguochun目录下新建目录linuxad2,并将d:\zhongguochun\linuxad1里面刚才安装好的虚拟操作系统复制一份到linuxad2

这样子,我们就得到了两个虚拟的RedHat Advanced Server 2.1了,当然,他们是一样的,我们需要进行些修改。

5.    进入d:\zhongguochun\linuxad2,用写字板打开linux.vmx,修改displayName = Linuxad1为displayName = Linuxad2,这样子,在vmware控制台,你就看到两个不同的名字了。尽管如此,如果你同时启动两个虚拟机,这两个虚拟系统还是一样的,所以,我们需要修改他们的ip地址,主机名字等。

6.    将linuxad2目录中的系统启动,修改主机名字

#vi /etc/sysconfig/network

将HOSTNAME=linuxone改为HOSTNAME=linuxtwo

接下来修改ip地址:

#vi /etc/sysconfig/network-scripts/ifcfg-eth0

将IPADDR=172.16.1.1改为IPADDR=172.16.1.2

改了名字,别忘记修改/etc/hosts哟

#vi /etc/hosts

加入

172.16.1.2 linuxtwo

7.Power off 这个虚拟机,这个样子,我们就得到了两个不同的系统拉,一个是linuxone,位于d:\zhongguochun\linuxad1,一个是linuxtwo 位于d:\zhongguochun\linuxad1

二.添加硬件

在两个系统都power off的状态下。我们需要分别给两个系统添加一块网卡,还要添加一个共享磁盘

1.用vmware 打开linuxone,注意不是power on 哦。在setting菜单下选择configuration edtior

,点击add,添加一块网卡,这个就不需要讲了吧。还需要添加一个虚拟磁盘,还是点add,硬件类型是Hard disk,然后”Creat a new virtual disk”,大小我分配了0.5G,并选择上下面的“Allocate all disk space”.下一步是给共享磁盘起名字叫”sharedisk.pln”,然后确定。这样子就添加好了。

2.用vmware 打开linuxtwo,注意不是power on 哦。同样添加一块网卡。接着添加虚拟磁盘,这次是”Use an existing virtual disk”,然后选择我们刚才在linuxone中创建的sharedisk.pln,按照提示就可以了。

3.磁盘和网卡都添加好了。这里,还需要注意,由于vmware中的系统启动后会锁定磁盘,所以当你启动linuxone后共享磁盘被锁定了,你的linuxtwo就起不来了。因此,我们需要处理一下先。首先,到d:\zhongguochun\linuxad1下,用写字板打开linux.vmx,在最后一行加入

    Disk.locking = false

然后到d:\zhongguochun\linuxad2,同样修改linux.vmx, 在最后一行加入

    Disk.locking = false

保存退出。

4.好了,到此为止,两个系统的硬件都配置好了呀



注:最好在Configuration editor 里面修改共享磁盘的”Vitual disk node”为scsi 1:0

三.为我们新添加的网卡配置ip地址先

1.Power On linuxone,启动过程中kudzu就会检测到新网卡,但是尽管你选择配置新网卡,启动完成后,

#ifconfig

还是只显示一块网卡的。所以,我们需要执行下面的命令拉

#cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1

#vi /etc/sysconfig/network-scripts/ifcfg-eth1

将里面的ip地址和mask改为:1.1.1.1 255.0.0.0

#service network restart

#ifconfig

显示两块网卡的正确配置拉。

2.同时Power On linuxtwo

#cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1

#vi /etc/sysconfig/network-scripts/ifcfg-eth1

将里面的ip地址和mask改为:1.1.1.2 255.0.0.0

#service network restart

#ifconfig

显示两块网卡的正确配置拉。

三.修改两主机/etc/hosts

#vi /etc/hosts

172.16.1.1 linuxone

172.16.1.2 linuxtwo

1.1.1.1   linuxone

1.1.1.2   linuxtwo

172.16.1.3 redhatcluster

注意,最后一个ip是集群管理用



三。集群配置

(一)配置我们的共享磁盘

1.    切换到linuxone

#fdisk /dev/sdb

创建250m /dev/sdb1

  250m /dev/sdb2



在两台服务器上分别编辑/etc/sysconfig/rawdevices文件,以便将分区绑定到裸设备。

#vi /etc/sysconfig/rawdevices

加入

/dev/raw/raw1 /dev/sdb1

/dev/raw/raw2 /dev/sdb2

重启服务

#service rawdevices restart

看了些文档说要

#cludiskutil ?p验证Quoram分区

我这里显示没有/etc/cluster.conf

不过,不管它。

2.切换到linuxtwo做同样的操作



(二)配置集群

切换到linuxone

#/sbin/cluconfig

你将看到以下输出:



Enter cluster name [Cluster]:redhatcluster

Enter IP address for cluster alias [x.x.x.x]: 172.16.1.1

--------------------------------

Information for Cluster Member 0

--------------------------------

Enter name of cluster member [linuxone]: linuxone

Looking for host one (may take a few seconds)...

Enter number of heartbeat channels (minimum = 1) [1]: 1

Information about Channel 0

Channel type: net or serial [net]:

Enter hostname of the cluster member on heartbeat channel 0 \

[linnuxone]: linnuxone

Looking for host linnuxone (may take a few seconds)...

Information about Quorum Partitions

Enter Primary Quorum Partition [/dev/raw/raw1]: /dev/raw/raw1

Enter Shadow Quorum Partition [/dev/raw/raw2]: /dev/raw/raw2

Information About the Power Switch That Power Cycles Member ’ linnuxone’

Choose one of the following power switches:

o NONE

o RPS10

o BAYTECH

o APCSERIAL

o APCMASTER

o WTI_NPS

Power switch [NONE]: NONE



Information for Cluster Member 1

--------------------------------

Enter name of cluster member [linuxtwo]: linuxtwo

Looking for host linuxtwo (may take a few seconds)...

Information about Channel 0

Enter hostname of the cluster member on heartbeat channel 0 \

[linuxtwo]: linuxtwo

Looking for host linuxtwo (may take a few seconds)...

Information about Quorum Partitions

Enter Primary Quorum Partition [/dev/raw/raw1]: /dev/raw/raw1

Enter Shadow Quorum Partition [/dev/raw/raw2]: /dev/raw/raw2

Information About the Power Switch That Power Cycles Member ’ linuxtwo’

Choose one of the following power switches:

o NONE

o RPS10

o BAYTECH

o APCSERIAL

o APCMASTER

o WTI_NPS

Power switch [NONE]: NONE



.

.

.

省略部分输出--------------------

Member 0 Information

--------------------

Name: linuxone

Primary quorum partition: /dev/raw/raw1

Shadow quorum partition: /dev/raw/raw2

Heartbeat channels: 1

Channel type: net, Name: linuxone

Power switch IP address or hostname:linuxone

--------------------

Member 1 Information

--------------------

Name: linuxtwo

Primary quorum partition: /dev/raw/raw1

Shadow quorum partition: /dev/raw/raw2

Heartbeat channels: 1

Channel type: net, Name: linuxtwo

Save the cluster member information? yes/no [yes]:

Writing to configuration file...done

Configuration information has been saved to /etc/cluster.conf.

----------------------------

Setting up Quorum Partitions

----------------------------

Running cludiskutil -I to initialize the quorum partitions: done

Saving configuration information to quorum partitions: done

Do you wish to allow remote monitoring of the cluster? yes/no \

[yes]: yes

----------------------------------------------------------------

Configuration on this member is complete.

To configure the next member, invoke the following command on that system:

# /sbin/cluconfig --init=/dev/raw/raw1

See the manual to complete the cluster installation



3.切换到linuxtwo

#cluconfig --init=/dev/raw/raw1

………显示好多东西。。。直到出现

Press to continue. --按回车继续

………又是好多东西,直到出现

Save the cluster member information? yes/no [yes]: --回车继续

………最后的总结信息

Configuration on this member is complete.

Execute /sbin/service cluster start to start the cluster software.



4.启动Cluster服务

在linuxone上,linuxtwo上依次

#service cluster start

回到linuxone

#cluadmin



cluadmin>cluster status

显示集群的两个节点

Linuxone,linuxtwo的状态都是up,good

好了,完成。



后记:因为明天要忙项目,今天写这个东西匆忙的很,错漏难免。另外,我也参考了一些网上兄弟的美文,有的部分甚至是拷贝粘贴。这里不一一列举,但表示衷心感谢。写此文的目的只是想帮助那些需要帮助的兄弟,因为我自己也是一路摸索一路辛苦过来,所以想帮帮他们。别无他意。高手莫见笑,错误请指正。
文章录入:追风    责任编辑:追风 
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。本站地址:Http://Www.99191.com
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    推荐文章[组图]Windows Server活
    普通文章网速变慢的故障分析
    普通文章做个优秀网管,掌握局域
    普通文章[组图]从网吧ARP欺骗看
    推荐文章[组图]如何配置RAID磁盘
    普通文章使用GHOST备份/恢复系统
    普通文章收藏到一个极好的 DLL 
    普通文章XP系统网络网上邻居不能
    推荐文章[组图]Windows Server活
    推荐文章[组图]Windows Server活
    推荐文章[组图]Windows Server活
    推荐文章[组图]如何配置RAID磁盘
    推荐文章阻止Exchange服务器开放
    推荐文章[组图]备份与恢复Win20
    推荐文章[组图]WIN2000中如何 利
    推荐文章DNS在活动目录中的使用
    RAID级别你选谁
    在VMware中安装W

    个人家庭电脑安全登

    最简单有效的提高Wi

    导出、备份,导入、恢

    加密vbs脚本中的代码
    (只显示最新10条。评论内容只代表网友观点,与本站立场无关!)