安装Grid7.1 解压安装包

以root身份解压grid安装包和database安装包。

Node1:

[root@tim1 ~]#cd /soft [root@tim1 soft]#ls

asm linux_11gR2_database_1of2.zip linux_11gR2_database_2of2.zip linux_11gR2_grid.zip

[root@tim1 soft]#unzip linux_11gR2_grid.zip [root@tim1 soft]#unzip linux_11gR2_database_1of2.zip [root@tim1 soft]#unzip linux_11gR2_database_2of2.zip

7.2 矫正时间

root用户在Node1和Node2下操作,以Node1的时间为基准,使用date -s命令在两节点上同时进行,误差几秒没关系。

7.3检查两个节点的共享盘

看到的共享盘ASMDisk已经准备就绪。

Node1:

[root@tim1 ~]#ll /dev/raw/raw*

Node2:同上

[root@tim2 ~]#ll /dev/raw/raw* 两节点看到的盘一致。

可以在安装grid 之前先做个检查。

[root@tim1 ~]# su - grid [grid@tim1 ~]$ cd /soft/grid [grid@tim1 grid]$ ./runcluvfy.sh stage -pre -h [grid@tim1 grid]$ ./runcluvfy.sh stage -pre crsinst -n tim1,tim2

7.4启动GRID安装界面

1)启动Xmanager Passive,一般端口是[:0.0]

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(1)

DISPLAY的意思是把图形显示到某个客户端上,这里是win7本地

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(2)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(3)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(4)

SCAN Name按照/etc/hosts改。

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(5)

Grid只认出了Node1节点,Node2需要手动添加一下。

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(6)

公网、私网的网段要正确。

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(7)

使用ASM,ORACLE11gR2取消了raw选项。

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(8)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(9)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(10)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(11)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(12)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(13)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(14)

2)配置yum install安装工具

yum工具可以自动解决软件包之间的依赖关系,使用之前要先创建软件仓库。

【创建方法】:

Node1:(root用户执行)

[root@tim1 ~]# cd /etc/yum.repos.d

进入到该目录下生成一个配置文件:

[root@tim1 yum.repo]# ls [root@tim1 yum.repos.d]# cp rhel-debuginfo.repo yum.repo [root@tim1 yum.repos.d]#vi yum.repo

文件内容改为如下:

[base] name=Red Hat Enterprise linux baseurl=File:///media/Server enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

media这个就是安装光盘挂载所在位置,Server下就是一些安装包,S是大写。enabled=1表示启动,gpgcheck=0表示校验关闭。

把yum.repo复制到Node2

[root@tim2 ~]# cd /etc/yum.repos.d/ [root@tim2 yum.repos.d]# scp tim1:/etc/yum.repos.d/yum.repo ./ root@tim1's password: beijing yum.repo 100% 146 0.1KB/s 00:00 Node1:

1)分配linux 安装镜像文件给光驱

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(15)

这一步相当于把光盘插入光驱。

2)手工mount光盘

[root@tim1 yum.repos.d]#mount /dev/cdrom /media

查看一下目录下文件,看到许多包,至此,yum仓库构建完成。

[root@tim1 yum.repos.d]# ls /media/Server|more 安装时千万不要进入这个目录

3)根据Grid安装界面提示,使用yum安装缺失软件包

[root@tim1 yum.repos.d]# yum install libaio-devel* -y 一定要看到 Complete!才行 [root@tim1 yum.repos.d]# yum install sysstat* -y [root@tim1 yum.repos.d]# yum install unixODBC-2* -y [root@tim1 yum.repos.d]# yum install unixODBC-devel* -y [root@tim1 yum.repos.d]# umount /media

4)别忘了从虚机中移除光驱,否则下次引导不了磁盘。

Node2:同上

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(16)

【注】:两个节点都要安装这四个包。

不放心也可以验证一下是否装好了这些包,命令如下:

[root@tim1 ~]# rpm -qa libaio-devel*

Check Again继续安装。

3)继续安装Grid

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(17)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(18)

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(19)

Node1执行第一个脚本(root用户)

[root@tim1 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete.

Node2执行第一个脚本(root用户)

[root@tim2 ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete.

Node1 执行第二个脚本(root用户) 【这步才是关键】!!!

[root@tim1 /]# /u01/11.2.0/grid/root.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@tim1 /]# /u01/11.2.0/grid/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: Oracle_OWNER= grid ORACLE_HOME= /u01/11.2.0/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. 2015-11-13 00:02:18: Parsing the host name 2015-11-13 00:02:18: Checking for super user privileges 2015-11-13 00:02:18: User has super user privileges Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params Creating trace directory LOCAL ADD MODE Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. root wallet root wallet cert root cert export peer wallet profile reader wallet pa wallet peer wallet keys pa wallet keys peer cert request pa cert request peer cert pa cert peer root cert TP profile reader root cert TP pa root cert TP peer pa cert TP pa peer cert TP profile reader pa cert TP profile reader peer cert TP peer user cert pa user cert Adding daemon to inittab CRS-4123: Oracle High Availability Services has been started. ohasd is starting CRS-2672: Attempting to start 'ora.gipcd' on 'tim1' CRS-2672: Attempting to start 'ora.mdnsd' on 'tim1' CRS-2676: Start of 'ora.gipcd' on 'tim1' succeeded CRS-2676: Start of 'ora.mdnsd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'tim1' CRS-2676: Start of 'ora.gpnpd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim1' CRS-2676: Start of 'ora.cssdmonitor' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'tim1' CRS-2672: Attempting to start 'ora.diskmon' on 'tim1' CRS-2676: Start of 'ora.diskmon' on 'tim1' succeeded CRS-2676: Start of 'ora.cssd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'tim1' CRS-2676: Start of 'ora.ctssd' on 'tim1' succeeded ASM created and started successfully. DiskGroup OCR_VOTE created successfully. clscfg: -install mode specified Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-2672: Attempting to start 'ora.crsd' on 'tim1' CRS-2676: Start of 'ora.crsd' on 'tim1' succeeded CRS-4256: Updating the profile Successful addition of voting disk 4e8f4e6229f84f4abf68122bc013ca1a. Successful addition of voting disk ae254012f9b14f46bf99e51e57d1c57e. Successful addition of voting disk 3d4e443c740f4f83bf4bbaa54dfc5936. Successfully replaced voting disk group with OCR_VOTE. CRS-4256: Updating the profile CRS-4266: Voting file(s) successfully replaced ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 1e7f803c179d4fcfbf2615830d5534cf (/dev/raw/raw1) [OCR_VOTE] 2. ONLINE 100a31a3e78a4f81bf4013a1a27c8fce (/dev/raw/raw2) [OCR_VOTE] 3. ONLINE 0978acb212554f5ebf5efab28cc6c6a6 (/dev/raw/raw3) [OCR_VOTE] Located 3 voting disk(s). CRS-2673: Attempting to stop 'ora.crsd' on 'tim1' CRS-2677: Stop of 'ora.crsd' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'tim1' CRS-2677: Stop of 'ora.asm' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'tim1' CRS-2677: Stop of 'ora.ctssd' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'tim1' CRS-2677: Stop of 'ora.cssdmonitor' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'tim1' CRS-2677: Stop of 'ora.cssd' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'tim1' CRS-2677: Stop of 'ora.gpnpd' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'tim1' CRS-2677: Stop of 'ora.gipcd' on 'tim1' succeeded CRS-2673: Attempting to stop 'ora.mdnsd' on 'tim1' CRS-2677: Stop of 'ora.mdnsd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.mdnsd' on 'tim1' CRS-2676: Start of 'ora.mdnsd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'tim1' CRS-2676: Start of 'ora.gipcd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'tim1' CRS-2676: Start of 'ora.gpnpd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim1' CRS-2676: Start of 'ora.cssdmonitor' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'tim1' CRS-2672: Attempting to start 'ora.diskmon' on 'tim1' CRS-2676: Start of 'ora.diskmon' on 'tim1' succeeded CRS-2676: Start of 'ora.cssd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'tim1' CRS-2676: Start of 'ora.ctssd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'tim1' CRS-2676: Start of 'ora.asm' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'tim1' CRS-2676: Start of 'ora.crsd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'tim1' CRS-2676: Start of 'ora.evmd' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'tim1' CRS-2676: Start of 'ora.asm' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.OCR_VOTE.dg' on 'tim1' CRS-2676: Start of 'ora.OCR_VOTE.dg' on 'tim1' succeeded CRS-2672: Attempting to start 'ora.registry.acfs' on 'tim1' CRS-2676: Start of 'ora.registry.acfs' on 'tim1' succeeded tim1 2015/11/13 00:09:21 /u01/11.2.0/grid/cdata/tim1/backup_20151113_000921.olr Preparing packages for installation... cvuqdisk-1.0.7-1 Configure Oracle Grid Infrastructure for a Cluster ... succeeded Updating inventory properties for clusterware Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 4095 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oraInventory 'UpdateNodeList' was successful.

Node2 执行第二个脚本(root用户)

[root@tim2 ~]# /u01/11.2.0/grid/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/11.2.0/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. 2015-11-13 00:15:30: Parsing the host name 2015-11-13 00:15:30: Checking for super user privileges 2015-11-13 00:15:30: User has super user privileges Using configuration parameter file: /u01/11.2.0/grid/crs/install/crsconfig_params Creating trace directory LOCAL ADD MODE Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Adding daemon to inittab CRS-4123: Oracle High Availability Services has been started. ohasd is starting CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on Node tim1, number 1, and is terminating An active cluster was found during exclusive startup, restarting to join the cluster CRS-2672: Attempting to start 'ora.mdnsd' on 'tim2' CRS-2676: Start of 'ora.mdnsd' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'tim2' CRS-2676: Start of 'ora.gipcd' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'tim2' CRS-2676: Start of 'ora.gpnpd' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'tim2' CRS-2676: Start of 'ora.cssdmonitor' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'tim2' CRS-2672: Attempting to start 'ora.diskmon' on 'tim2' CRS-2676: Start of 'ora.diskmon' on 'tim2' succeeded CRS-2676: Start of 'ora.cssd' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'tim2' CRS-2676: Start of 'ora.ctssd' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.drivers.acfs' on 'tim2' CRS-2676: Start of 'ora.drivers.acfs' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'tim2' CRS-2676: Start of 'ora.asm' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'tim2' CRS-2676: Start of 'ora.crsd' on 'tim2' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'tim2' CRS-2676: Start of 'ora.evmd' on 'tim2' succeeded tim2 2015/11/13 00:20:09 /u01/11.2.0/grid/cdata/tim2/backup_20151113_002009.olr Preparing packages for installation... cvuqdisk-1.0.7-1 Configure Oracle Grid Infrastructure for a Cluster ... succeeded Updating inventory properties for clusterware Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 4095 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oraInventory 'UpdateNodeList' was successful.

[root@tim2 /]#

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(20)

最后一步,点击Close,结束图形安装。

4)添加全局环境变量

目的是让root用户能找到Grid用户路径下的可执行文件。

Node1:

[root@tim1 ~]# vi /etc/profile 添加:export PATH=$PATH:/u01/11.2.0/grid/bin [root@tim1 ~]# source /etc/profile

Node2:同上

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(21)

两个节点分别自动启动CRS。

安装oracle11g不满足环境最低要求(Oracle11gR2RAC)(22)

一共有四个OFFLINE,这是正常的。

至此,grid全部安装完成。

the end !!!

@jackman 共筑美好!

,