分类: LINUX
2006-09-28 15:11:50
1 通过"Home"->"Open Existing Virtual Machine"打开rac1,启动rac1.
2 在rac1上,修改/etc/network/interfaces文件添加如下内容
iface eth1 inet static
address 10.10.10.181
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
并修改
auto eth0
为
auto eth0 eth1
修改完成后,可以使用/etc/init.d/networking restart重新启动网络。
3 在rac1上,为硬盘进行分区
rac1:~# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1566.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1566, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1566, default 1566): +1024M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (126-1566, default 126):
Using default value 126
Last cylinder or +size or +sizeM or +sizeK (126-1566, default 1566): +1024M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (251-1566, default 251):
Using default value 251
Last cylinder or +size or +sizeM or +sizeK (251-1566, default 1566): +1024M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Selected partition 4
First cylinder (376-1566, default 376):
Using default value 376
Last cylinder or +size or +sizeM or +sizeK (376-1566, default 1566):
Using default value 1566
Command (m for help): p
Disk /dev/sdb: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 125 1004031 83 Linux
/dev/sdb2 126 250 1004062+ 83 Linux
/dev/sdb3 251 375 1004062+ 83 Linux
/dev/sdb4 376 1566 9566707+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
rac1:~# fdisk -l /dev/sd?
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1498 12032653+ 83 Linux
/dev/sda2 1499 1566 546210 5 Extended
/dev/sda5 1499 1566 546178+ 82 Linux swap / Solaris
Disk /dev/sdb: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 125 1004031 83 Linux
/dev/sdb2 126 250 1004062+ 83 Linux
/dev/sdb3 251 375 1004062+ 83 Linux
/dev/sdb4 376 1566 9566707+ 83 Linux
rac1:~#
4 通过"Home"->"Open Existing Virtual Machine"打开rac2,启动rac2.
5 在rac1上,修改/etc/network/interfaces文件添加如下内容
iface eth1 inet static
address 10.10.10.182
netmask 255.255.255.0
network 10.10.10.0
broadcast 10.10.10.255
并修改
auto eth0
为
auto eth0 eth1
修改完成后,使用/etc/init.d/networking restart重新启动网络。
6 在rac2上使用fdisk -l /dev/sd?查看分区情况。
rac2:~# fdisk -l /dev/sd?
Disk /dev/sda: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1498 12032653+ 83 Linux
/dev/sda2 1499 1566 546210 5 Extended
/dev/sda5 1499 1566 546178+ 82 Linux swap / Solaris
Disk /dev/sdb: 12.8 GB, 12884901888 bytes
255 heads, 63 sectors/track, 1566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 125 1004031 83 Linux
/dev/sdb2 126 250 1004062+ 83 Linux
/dev/sdb3 251 375 1004062+ 83 Linux
/dev/sdb4 376 1566 9566707+ 83 Linux
rac2:~#
7 修改/etc/hosts为如下内容
127.0.0.1 localhost.localdomain localhost
192.168.0.181 rac1
192.168.0.182 rac2
192.168.0.191 rac1-vip
192.168.0.192 rac2-vip
10.10.10.181 rac1-priv
10.10.10.182 rac2-priv
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts