RAC 攻击 - Oracle 集群数据库实战 / 安装 Grid 基础架构(共享文件系统)
外观
在大型集群数据库部署中,几个 NFS 设备和大型机集群文件系统非常常见。我们将在这里使用 OCFS2 来练习使用文件系统的 11gR2 RAC。
- 作为oracle用户,启动网格安装程序。在第一个屏幕上,选择安装和配置集群的 Grid 基础架构,然后单击下一步。 [oracle@collabn1 ~]$ /mnt/cdrom*/grid/runInstaller
- 选择高级安装,然后单击下一步。
- 接受默认语言(英语),然后选择下一步。
- 将集群命名为collab,并确保 SCAN 名称是collab-scan,端口为1521,然后单击下一步。
- 添加节点collabn2,其 VIP 为collabn2-vip,然后选择下一步以验证集群配置。
- 验证 192.168.78.0 子网上的 eth0 是公共的,而 172.16.100.0 子网上的 eth1 是私有的,然后单击下一步。
- 选择将集群软件文件存储在共享文件系统中,然后选择下一步。
- 对于 OCR,选择外部冗余,并键入路径 /u61/cluster/ocr。(这是来自错误解决方法的 NFS 位置。)单击下一步以继续。
- 对于投票磁盘,执行相同的操作 - 选择外部冗余,并键入路径 /u61/cluster/vdsk。(同样,这是来自错误解决方法的 NFS 位置。)单击下一步以继续。
- 不要使用 IPMI。单击下一步。
- 将 OSDBA 组设置为 asmdba,将 OSOPER 组设置为 asmoper,将 OSASM 组设置为 asmadmin。然后单击下一步。
- 接受 ORACLE_BASE 位置 /u01/app/oracle,并使用 ORACLE_HOME 位置 /u01/grid/oracle/product/11.2.0/grid_1。然后单击下一步。
- 接受默认的清单位置,然后选择下一步
- 先决条件检查将执行。将发出警告,提示三个检查失败:物理内存、交换空间和网络时间协议。单击复选框以忽略全部,然后单击下一步。
-
在 oracle 用户的主目录中保存一个名为 grid.rsp 的响应文件。然后单击完成以安装网格基础架构。
- 出现提示时,以root用户身份打开终端并运行两个root.sh脚本。确保在两个节点上都运行两个脚本!
[oracle@collabn1 ~]$ su - Password: racattack [root@collabn1 ~]# /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. [root@collabn1 ~]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/grid/oracle/product/11.2.0/grid_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin Copying dbhome to /usr/bin ... Copying oraenv to /usr/bin ... Copying coraenv to /usr/bin ... 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. 2011-03-30 16:49:13: Parsing the host name 2011-03-30 16:49:13: Checking for super user privileges 2011-03-30 16:49:13: User has super user privileges Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/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 'collabn1' CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1' CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1' CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1' CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'collabn1' CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1' CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1' CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded 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 'collabn1' CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded Now formatting voting disk: /u61/cluster/vdsk. CRS-4603: Successful addition of voting disk /u61/cluster/vdsk. ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 59f9f62cc0f44f35bff552ced06e35ee (/u61/cluster/vdsk) [] Located 1 voting disk(s). CRS-2673: Attempting to stop 'ora.crsd' on 'collabn1' CRS-2677: Stop of 'ora.crsd' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'collabn1' CRS-2677: Stop of 'ora.asm' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'collabn1' CRS-2677: Stop of 'ora.ctssd' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'collabn1' CRS-2677: Stop of 'ora.cssdmonitor' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'collabn1' CRS-2677: Stop of 'ora.cssd' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'collabn1' CRS-2677: Stop of 'ora.gpnpd' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'collabn1' CRS-2677: Stop of 'ora.gipcd' on 'collabn1' succeeded CRS-2673: Attempting to stop 'ora.mdnsd' on 'collabn1' CRS-2677: Stop of 'ora.mdnsd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.mdnsd' on 'collabn1' CRS-2676: Start of 'ora.mdnsd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'collabn1' CRS-2676: Start of 'ora.gipcd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn1' CRS-2676: Start of 'ora.gpnpd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn1' CRS-2676: Start of 'ora.cssdmonitor' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'collabn1' CRS-2672: Attempting to start 'ora.diskmon' on 'collabn1' CRS-2676: Start of 'ora.diskmon' on 'collabn1' succeeded CRS-2676: Start of 'ora.cssd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'collabn1' CRS-2676: Start of 'ora.ctssd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'collabn1' CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'collabn1' CRS-2676: Start of 'ora.crsd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'collabn1' CRS-2676: Start of 'ora.evmd' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'collabn1' CRS-2676: Start of 'ora.asm' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.DATA.dg' on 'collabn1' CRS-2676: Start of 'ora.DATA.dg' on 'collabn1' succeeded CRS-2672: Attempting to start 'ora.registry.acfs' on 'collabn1' CRS-2676: Start of 'ora.registry.acfs' on 'collabn1' succeeded collabn1 2011/03/30 16:59:35 /u01/grid/oracle/product/11.2.0/grid_1/cdata/collabn1/backup_20110330_165935.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 968 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oraInventory 'UpdateNodeList' was successful.
[root@collabn1 ~]# ssh collabn2 root@collabn2's password: racattack -bash: oraenv: No such file or directory [root@collabn2 ~]# /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. [root@collabn2 ~]# /u01/grid/oracle/product/11.2.0/grid_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/grid/oracle/product/11.2.0/grid_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: /usr/bin Copying dbhome to /usr/bin ... Copying oraenv to /usr/bin ... Copying coraenv to /usr/bin ... 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. 2011-03-30 17:04:26: Parsing the host name 2011-03-30 17:04:26: Checking for super user privileges 2011-03-30 17:04:26: User has super user privileges Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/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 collabn1, 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 'collabn2' CRS-2676: Start of 'ora.mdnsd' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'collabn2' CRS-2676: Start of 'ora.gipcd' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'collabn2' CRS-2676: Start of 'ora.gpnpd' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'collabn2' CRS-2676: Start of 'ora.cssdmonitor' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'collabn2' CRS-2672: Attempting to start 'ora.diskmon' on 'collabn2' CRS-2676: Start of 'ora.diskmon' on 'collabn2' succeeded CRS-2676: Start of 'ora.cssd' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'collabn2' CRS-2676: Start of 'ora.ctssd' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.drivers.acfs' on 'collabn2' CRS-2676: Start of 'ora.drivers.acfs' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'collabn2' CRS-2676: Start of 'ora.asm' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'collabn2' CRS-2676: Start of 'ora.crsd' on 'collabn2' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'collabn2' CRS-2676: Start of 'ora.evmd' on 'collabn2' succeeded collabn2 2011/03/30 17:12:32 /u01/grid/oracle/product/11.2.0/grid_1/cdata/collabn2/backup_20110330_171232.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 1205 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /u01/app/oraInventory 'UpdateNodeList' was successful.
- 运行完两个脚本后,返回安装程序窗口并单击确定以继续运行配置助手。
- 集群验证实用程序将失败,因为 NTP 未运行。如果你想,可以在日志文件的最后查看错误消息。然后单击确定以关闭消息框,并单击下一步以继续。
- 你现在应该看到最终屏幕!单击关闭退出安装程序。