本文旨在记录过程,不作过多描述。具体参数信息请参考官方文档。数据库
主机配置信息以下图:
共享磁盘信息以下图:网络
以root身份登陆任意一节点,执行installer程序,而后输入I,以下图:oracle
[root@odb01 ~]# /mnt/rhel7_x86_64/installer
选择Veritas InfoScale Enterprise,安装完成后不当即进行配置。而后输入要安装的主机名,以空格隔开。
若是有正式的license输入便可;若是没有就使用keyless licensing选项。app
[root@odb01 ~]# /opt/VRTS/install/installer -configure
选择SF Oracle RAC选项,输入集群几点的主机名,下一步。
接着配置集群名称以及心跳:less
[root@odb01 ~]# /opt/VRTS/install/installer -fencing
这里选择Configure disk based fencing选项。
可使用下面命令进行验证:
配置完成后,默认会在集群中添加一个新的资源组vxfendg;可使用hagrp命令进行验证:ide
在安装oracle rac以前,必须配置好ocr和vote。能够建立基于文件系统的,也能够建立基于裸设备的,这里使用基于文件系统的ocr和vote。code
[root@odb01 ~]# /opt/VRTS/install/installer -configure
配置完成后,集群服务会增长一个cvm资源组,可使用以下命令验证查询:ci
--初始化磁盘 [root@odb01 ~]# vxdisksetup -if odb01_vmdk0_0 --建立磁盘组 [root@odb01 ~]# vxdg -s init datadg odb01_vmdk0_0=odb01_vmdk0_0 --建立两个volume [root@odb01 ~]# vxassist -g datadg make vol01 50G [root@odb01 ~]# vxassist -g datadg make vol02 50G --建立vxfs文件系统 [root@odb01 ~]# mkfs -t vxfs -o bsize=8192,largefiles /dev/vx/dsk/datadg/vol01 [root@odb01 ~]# mkfs -t vxfs -o bsize=8192,largefiles /dev/vx/dsk/datadg/vol02 --建立挂载点 [root@odb01 ~]# mkdir -p /u02/{oradata,archive} [root@odb02 ~]# mkdir -p /u02/{oradata,archive}
[root@odb01 ~]# haconf -makerw --建立资源组rhn_rg [root@odb01 ~]# hagrp -add rhn_rg [root@odb01 ~]# hagrp -modify rhn_rg Parallel 1 [root@odb01 ~]# hagrp -modify rhn_rg SystemList odb01 0 odb02 1 [root@odb01 ~]# hagrp -modify rhn_rg AutoStartList odb01 odb02 --添加datadg_rs资源 [root@odb01 ~]# hares -add datadg_rs CVMVolDg rhn_rg [root@odb01 ~]# hares -modify datadg_rs CVMDiskGroup datadg [root@odb01 ~]# hares -modify datadg_rs CVMActivation sw [root@odb01 ~]# hares -modify datadg_rs CVMVolume vol01 vol01 [root@odb01 ~]# hares -modify datadg_rs NodeList odb01 odb02 [root@odb01 ~]# hares -modify datadg_rs Critical 0 --添加文件系统资源 [root@odb01 ~]# hares -add oradata_mnt CFSMount rhn_rg [root@odb01 ~]# hares -add archive_mnt CFSMount rhn_rg [root@odb01 ~]# hares -modify oradata_mnt MountPoint "/u02/oradata" [root@odb01 ~]# hares -modify archive_mnt MountPoint "/u02/archive" [root@odb01 ~]# hares -modify oradata_mnt BlockDevice /dev/vx/dsk/datadg/vol01 [root@odb01 ~]# hares -modify archive_mnt BlockDevice /dev/vx/dsk/datadg/vol02 [root@odb01 ~]# hares -modify archive_mnt Critical 0 [root@odb01 ~]# hares -modify oradata_mnt Critical 0 --启用资源组并online [root@odb01 ~]# hagrp -enableresources rhn_rg [root@odb01 ~]# haconf -dump -makero [root@odb01 ~]# hagrp -online rhn_rg -any [root@odb01 ~]# chown -R oracle:oinstall /u02
这里不详细描述oracle grid和database的安装过程,只作如下说明:
一、安装配置grid组件时,对应的ocr和vote位置选择对应的文件系统;
二、建立数据库实例时,数据文件和归档选择对应的文件系统。资源
向已建立的rhn_rg资源组添加数据库实例资源信息,以下:文档
[root@odb01 ~]# haconf -makerw --添加rhn_rs资源 [root@odb01 ~]# hares -add rhn_rs Oracle rhn_rg [root@odb01 ~]# hares -modify rhn_rs Owner oracle [root@odb01 ~]# hares -modify rhn_rs Home /u01/app/oracle/product/11.2.0/db_1 [root@odb01 ~]# hares -modify rhn_rs StartUpOpt SRVCTLSTART [root@odb01 ~]# hares -modify rhn_rs ShutDownOpt SRVCTLSTOP --设置各个节点对应的实例名称 [root@odb01 ~]# hares -local rhn_rs Sid [root@odb01 ~]# hares -modify rhn_rs Sid rhndb1 -sys odb01 [root@odb01 ~]# hares -modify rhn_rs Sid rhndb2 -sys odb02 [root@odb01 ~]# hares -modify rhn_rs Critical 0 --设置资源之间的依赖关系 [root@odb01 ~]# hares -link oradata_mnt datadg_rs [root@odb01 ~]# hares -link archive_mnt datadg_rs [root@odb01 ~]# hares -link rhn_rs oradata_mnt [root@odb01 ~]# hares -link rhn_rs archive_mnt [root@odb01 ~]# hagrp -link rhn_rg cvm online local firm [root@odb01 ~]# hagrp -enableresources rhn_rg [root@odb01 ~]# haconf -dump -makero [root@odb01 ~]# hagrp -online rhn_rg -any