首先需要说明的,我的RAC搭建不是在虚拟机上完成的,而是在实际部署中,二者之间有些许差异,本人水平有限,请见谅。
其中,每台机器至少需要配置3个IP地址,在安装操作系统的过程中,我们需要配置公网IP和私有IP即可,虚拟IP在安装集群件时分配。
Public IP、Virtual IP、SCAN IP必须配置在同一网段。
private IP与他们不能在同一网段内。
SCAN IP是Oracle 11g新推出的,在配置11g RAC时需要指定。
Hostname |
Short Hostname |
Type |
IP Address |
Interface |
node1.localdomain |
node1 |
Public IP |
172.16.0.191 |
eth0 |
node1-vip.localdomain |
node1-vip |
Virtual IP |
172.16.0.193 |
eth0:1 |
node1-priv.localdomain |
node1-priv |
Private IP |
192.168.94.11 |
eth1 |
node2.localdomain |
node2 |
Public IP |
172.16.0.192 |
eth0 |
node2-priv.localdomain |
node2-vip |
Virtual IP |
172.16.0.194 |
eth0:1 |
node2-priv.localdomain |
node2-priv |
Private IP |
192.168.94.12 |
eth1 |
scan-cluster.localdomain |
scan-cluster |
SCAN IP |
172.16.0.203 |
eth0 |
IP分配之后,配置/etc/hosts文件
事例: 修改节点1的/etc/hosts配置文件
[[email protected] ~]# cp /etc/hosts /etc/hosts.bak [[email protected] ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost ::1 localhost6.localdomain6 localhost6 # node1 172.16.0.191 node1.localdomain node1 172.16.0.193 node1-vip.localdomain node1-vip 192.168.94.11 node1-priv.localdomain node1-priv # node2 172.16.0.192 node2.localdomain node2 172.16.0.194 node2-vip.localdomain node2-vip 192.168.94.12 node2-priv.localdomain node2-priv # scan-ip 172.16.0.203 scan-cluster.localdomain scan-cluster |