静默安装
本安装示例中,使用response文件进行静默安装,省去了Linux桌面机器的配置,如需通过GUI界面的方式安装,请参考Oracle RAC的安装手册。
Oracle Grid的默认静默安装配置文件位于 /u01/app/grid_home/install/response/gridsetup.rsp ,需要
Oracle DBA修改其中的配置项,一些关键的配置项如:
- loracle.install.crs.config.clusterNodes=rac-node01:rac-node01-vip,rac-node02:rac - node02-vip :设定集群节点。
- oracle.install.crs.config.networkInterfaceList=ens2:192.168.100.0:5,ens5:192.168.0. 0:1 :设定PUBLIC 和ASM&PRIVATE网络使用的网卡。
- oracle.install.asm.diskGroup.disks=/dev/vdc,/dev/vdd,/dev/vde :设定仲裁盘。
静默安装的配置文件准备好之后,可先进行依次尝试安装(切换到grid用户,并切换到 /u01/app/grid_home/ 目录):
[grid@rac-node01 grid_home]$ ./gridSetup.sh -silent -responseFile
install/response/gridsetup.rsp
尝试安装如果失败,需要提示的报错日志,依次排查报错项,处理完错误问题或确认遗留问题可忽略,则可以通过添加-ignorePrereqFailure参数跳过依赖报错问题。
[grid@rac-node01 grid_home]$ ./gridSetup.sh -silent -ignorePrereqFailure -
responseFile install/response/gridsetup.rsp
安装后执行脚本
安装完成之后,执行输出会提示需要以root账号执行脚本,分别在各个节点上执行:
[root@rac-node01 ~]# /u01/app/oraInventory/orainstRoot.sh
[root@rac-node01 ~]# /u01/app/grid_home/root.sh
安装后检查
注意由于心跳线haip功能暂时无法使用,心跳通信受阻,OCR disk group会显示未正常挂载。没有心跳线负载均衡需求的用户,可以通过禁用haip功能,将集群状态恢复。
[root@rac-node01 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
ora.chad
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
ora.net1.network
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
ora.ons
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac-node01 STABLE
2 ONLINE ONLINE rac-node02 STABLE
3 OFFLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac-node01 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE rac-node01 STABLE
2 OFFLINE OFFLINE STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE rac-node01 Started,STABLE
2 ONLINE OFFLINE Instance Shutdown,ST
ABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE rac-node01 STABLE
2 ONLINE ONLINE rac-node02 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE rac-node01 STABLE
ora.qosmserver
1 ONLINE OFFLINE STABLE
ora.rac-node01.vip
1 ONLINE ONLINE rac-node01 STABLE
ora.rac-node02.vip
1 ONLINE ONLINE rac-node02 STABLE
ora.scan1.vip
1 ONLINE ONLINE rac-node01 STABLE
--------------------------------------------------------------------------------
查看public和private网卡使用情况:
[root@rac-node01 ~]# oifcfg iflist
ens2 192.168.100.0
ens5 192.168.0.0
[root@rac-node01 ~]# oifcfg getif
ens2 192.168.100.0 global cluster_interconnect,asm
ens5 192.168.0.0 global public
Grid安装后配置(重要)
对于没有多条心跳线需要做心跳线高可用、负载均衡的用户,可以通过以下步骤将interconnect HAIP 功能禁用。禁用此功能,不影响Oracle RAC正常功能使用。
- 所有node上停止crs。
crsctl stop crs
- 依次在各个节点上,执行以下禁用haip作为依赖的命令
crsctl start crs -excl -nocrs
crsctl stop res ora.asm -init
crsctl modify res ora.cluster_interconnect.haip -attr "ENABLED=0" -init
crsctl modify res ora.asm -attr
"START_DEPENDENCIES='hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.drivers.acfs)',STOP_DEPENDENCIES='hard(intermediate:ora.cssd)'" -init
crsctl stop crs
- 顺序启动各个节点
crsctl start crs
- 检查集群状态,OCR diskgroup 已ONLINE
[root@rac-node01 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
ora.chad
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
ora.net1.network
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
ora.ons
ONLINE ONLINE rac-node01 STABLE
ONLINE ONLINE rac-node02 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac-node01 STABLE
2 ONLINE ONLINE rac-node02 STABLE
3 ONLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac-node01 STABLE
ora.OCR.dg(ora.asmgroup)
1 ONLINE ONLINE rac-node01 STABLE
2 ONLINE ONLINE rac-node02 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE rac-node01 Started,STABLE
2 ONLINE ONLINE rac-node02 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE rac-node01 STABLE
2 ONLINE ONLINE rac-node02 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE rac-node01 STABLE
ora.qosmserver
1 ONLINE ONLINE rac-node01 STABLE
ora.rac-node01.vip
1 ONLINE ONLINE rac-node01 STABLE
ora.rac-node02.vip
1 ONLINE ONLINE rac-node02 STABLE
ora.scan1.vip
1 ONLINE ONLINE rac-node01 STABLE
--------------------------------------------------------------------------------