分类: Oracle
2008-04-24 16:52:05
最近在aix 5.3下做了一个9i的rac测试环境,大概记录如下
1、配置hosts文件
主机1
192.168.112.11 pub1 test1
192.168.1.11 priv1 test1
192.168.112.12 pub2 test2
192.168.1.12 priv2 test2
192.168.112.13 vip1 test1
192.168.112.14 vip2 test2
主机2
192.168.112.11 pub1 test1
192.168.1.11 priv1 test1
192.168.112.12 pub2 test2
192.168.1.12 priv2 test2
192.168.112.13 vip1 test1
192.168.112.14 vip2 test2
2、建立主机信任关系
配置/.rhosts文件
主机1
# more /.rhosts
pub1
priv1
vip1
pub2
priv2
vip2
主机2一样
修改为600权限 chmod 600 /.rhosts
测试配置是否成功
rlogin pub2
rlogin pub1
rlogin priv1
rlogin priv2
3、配置心跳
smit tty增加一个tty1设备
lsdev -Cc tty可以看到新增的tty1
主机2类似设置
在两台主机上执行stty 会有如下显示
# stty
speed 9600 baud; -parity hupcl
eol2 = ^?
brkint -inpck -istrip icrnl -ixany ixoff onlcr tab3
echo echoe echok
如果没有显示则说明tty配置不成功
主机一上执行
cat /etc/hosts >/dev/tty1
主机二上执行
cat 会有主机一的hosts文件内容显示
4、安装hacmp5.3
smit install
在安装过程中可能提示需要一些额外的安装包,可根据提示把需要的包一一装上即可.
两台主机分别安装.
5、配置共享磁盘
A、配置pv
# chdev -l hdisk1 -a pv=yes
hdisk1 changed
# lspv
hdisk0 0040600180d
hdisk1 0002399fef
hdisk2 none None
hdisk3 none None
# chdev -l hdisk2 -a pv=yes
hdisk2 changed
# lspv
hdisk0 0040600180d
hdisk1 0002399fef
hdisk2 0002399fef451104 None
hdisk3 none None
# chdev -l hdisk3 -a pv=yes
hdisk3 changed
# lspv
hdisk0 0040600180d
hdisk1 0002399fef
hdisk2 0002399fef451104 None
hdisk3 0002399fef451283 None
B、创建共享vg
smit hacmp
Add a Volume Group
Add an Original Volume Group
注意选择并发模式
C、主机二上导入vg
smit importvg
6、配置hacmp
A、定义cluster
主机一
smit hacmp
选择 Initialization and Standard Configuration
选择 Add Nodes to an HACMP Cluster
[Entry Fields]
* Cluster Name [test]
New Nodes (via selected communication paths) [] +
Currently Configured Node(s)
B、定义节点
主机一节点
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Nodes
选择Add a Node to the HACMP Cluster
[Entry Fields]
* Node Name [test1]
Communication Path to Node []
在主机上定义主机二节点,在主机一上做
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Nodes
选择Add a Node to the HACMP Cluster
[Entry Fields]
* Node Name [test2]
Communication Path to Node []
C、定义网络
定义串口网络
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Networks
选择Add a Network to the HACMP Cluster
注意:选择# Pre-defined Serial Device Types中的RS232
[Entry Fields]
* Network Name [net_rs232_01]
* Network Type rs232
定义IP网络(私有)
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Networks
选择Add a Network to the HACMP Cluster
选择# Pre-defined IP-based Network Types中的ether
[Entry Fields]
* Network Name [net_ether_01]
* Network Type ether
* Netmask [255.255.255.0] +
* Enable IP Address Takeover via IP Aliases [No] +
IP Address Offset for Heartbeating over IP Aliases []
定义IP网络(公有)
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Networks
选择Add a Network to the HACMP Cluster
选择# Pre-defined IP-based Network Types中的ether
[Entry Fields]
* Network Name [net_ether_02]
* Network Type ether
* Netmask [255.255.255.0] +
* Enable IP Address Takeover via IP Aliases [No] +
IP Address Offset for Heartbeating over IP Aliases []
D、定义网络接口
定义priv1
smit hacmp
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Communication Interfaces/Devices
选择Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
[Entry Fields]
* IP Label/Address [priv1] +
* Network Type ether
* Network Name net_ether_01
* Node Name [test1] +
Network Interface []
定义priv2
smit hacmp
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Communication Interfaces/Devices
选择Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces
[Entry Fields]
* IP Label/Address [priv2] +
* Network Type ether
* Network Name net_ether_01
* Node Name [test2] +
Network Interface []
定义pub1
smit hacmp
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Communication Interfaces/Devices
选择Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces 选择net_ether_02
[Entry Fields]
* IP Label/Address [pub1] +
* Network Type ether
* Network Name net_ether_02
* Node Name [test1] +
Network Interface []
定义pub2
smit hacmp
选择Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Communication Interfaces/Devices
选择Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择 Communication Interfaces 选择net_ether_02
[Entry Fields]
* IP Label/Address [pub2] +
* Network Type ether
* Network Name net_ether_02
* Node Name [test2] +
Network Interface []
定义串口
选择 Extended Configuration
选择Extended Topology Configuration
选择Configure HACMP Communication Interfaces/Devices
选择Add Communication Interfaces/Devices
选择 Add Pre-defined Communication Interfaces and Devices
选择Communication Devices
[Entry Fields]
* Device Name [tty1]
* Network Type rs232
* Network Name net_rs232_01
* Device Path [/dev/tty1]
* Node Name [test1]
主机二
[Entry Fields]
* Device Name [tty2]
* Network Type rs232
* Network Name net_rs232_01
* Device Path [/dev/tty1]
* Node Name [test2]
E、定义资源组
# smitty hacmp
选择Initialization and Standard Configuration
选择Configure HACMP Resource Group
选择Add a Resource Group
* Resource Group Name [datavg]
* Participating Nodes (Default Node Priority) [test1 test2] +
Startup Policy Online On All Available Nodes +
Fallover Policy Bring Offline (On Error Node Only) +
Fallback Policy Never Fallback +
F、修改刚定义的资源组属性
# smitty hacmp
选择Initialization and Standard Configuration
选择Configure HACMP Resource Group
选择Change/Show Resources for a Cascading Resource Group(standard)
Resource Group Name datavg
Participating Nodes (Default Node Priority) test1 test2
Startup Policy Online On All Available Nodes
Fallover Policy Bring Offline (On Error Node Only)
Fallback Policy Never Fallback
Concurrent Volume Groups [datavg] +
Use forced varyon of volume groups, if necessary true +
Application Servers [] +
G、同步HACMP
# smitty hacmp
选择Initialization and Standard Configuration
选择Verify and Synchronize HACMP Comfiguration
H、启动hacmp
smit clstart每个节点分别执行
7、安装ORACLE9201 RAC
A、按照安装手册上讲的先做好安装的准备工作
1)创建ORACLE用户和用户组
2)ORACLE用户环境变量
3)操作系统包和补丁是否全装上
4)主机信任关系
5)所需要的LV
等等
B、安装过程截图