基于 VMware vSphere 环境安装 Oracle21c RAC (三)
安装 Grid 软件
以 grid 用户登录系统,将软件直接解压缩到 GRID_HOME 目录,此操作只需要在 orac1 节点执行:
[root@orac01 ~]# su - grid
[grid@orac01 ~]$ unzip -d /u01/app/21.3.0/grid/ /u01/orasoft/LINUX.X64_213000_grid_home.zip
安装 cvuqdisk 包
两个节点都需要执行此操作:
[root@orac01 ~]# rpm -ivh /u01/app/21.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm
[root@orac01 ~]# scp /u01/app/21.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm root@orac02:/u01/orasoft/
[root@orac02 ~]# rpm -ivh /u01/orasoft/cvuqdisk-1.0.10-1.rpm
执行 grid 软件安装
打开控制台

























在 orac01、02 节点以 root 身份执行脚本orainstRoot.sh
[root@ORAC01 /]# /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@ORAC02 ~]# /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.
在 orac1、2 节点以 root 身份执行脚本root.sh
[root@ORAC01 ~]# /u01/app/21.3.0/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/21.3.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 script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/21.3.0/grid/crs/install/crsconfig_params
2024-07-22 11:09:55: Got permissions of file /u01/app/grid/crsdata/orac01/crsconfig: 0775
2024-07-22 11:09:55: Got permissions of file /u01/app/grid/crsdata: 0775
2024-07-22 11:09:55: Got permissions of file /u01/app/grid/crsdata/orac01: 0775
The log of current session can be found at:
/u01/app/grid/crsdata/orac01/crsconfig/rootcrs_orac01_2024-07-22_11-09-55AM.log
2024/07/22 11:10:10 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2024/07/22 11:10:10 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2024/07/22 11:10:10 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2024/07/22 11:10:12 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2024/07/22 11:10:13 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
Redirecting to /bin/systemctl restart rsyslog.service
2024/07/22 11:10:14 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2024/07/22 11:10:14 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2024/07/22 11:10:50 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2024/07/22 11:10:55 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2024/07/22 11:11:11 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2024/07/22 11:11:11 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2024/07/22 11:11:16 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2024/07/22 11:11:16 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2024/07/22 11:11:37 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2024/07/22 11:11:37 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2024/07/22 11:11:41 CLSRSC-4002: Successfully installed Oracle Autonomous Health Framework (AHF).
2024/07/22 11:11:42 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2024/07/22 11:11:47 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2024/07/22 11:13:17 CLSRSC-482: Running command: '/u01/app/21.3.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk 4cae02f4e9dc4f32bfc4ba0f837b0bf6.
Successful addition of voting disk a13f255ac0ff4ff6bfcf616fbd28be73.
Successful addition of voting disk a05a5df7eb484f16bf6a182182a33a46.
Successfully replaced voting disk group with +OCRVOTE.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 4cae02f4e9dc4f32bfc4ba0f837b0bf6 (/dev/asmdiskc) [OCRVOTE]
2. ONLINE a13f255ac0ff4ff6bfcf616fbd28be73 (/dev/asmdiskd) [OCRVOTE]
3. ONLINE a05a5df7eb484f16bf6a182182a33a46 (/dev/asmdiske) [OCRVOTE]
Located 3 voting disk(s).
2024/07/22 11:14:17 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2024/07/22 11:15:28 CLSRSC-343: Successfully started Oracle Clusterware stack
2024/07/22 11:15:28 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2024/07/22 11:16:48 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2024/07/22 11:17:20 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@ORAC02 ~]# /u01/app/21.3.0/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/21.3.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 script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/21.3.0/grid/crs/install/crsconfig_params
2024-07-22 12:42:38: Got permissions of file /u01/app/grid/crsdata/orac02/crsconfig: 0775
2024-07-22 12:42:38: Got permissions of file /u01/app/grid/crsdata: 0775
2024-07-22 12:42:38: Got permissions of file /u01/app/grid/crsdata/orac02: 0775
The log of current session can be found at:
/u01/app/grid/crsdata/orac02/crsconfig/rootcrs_orac02_2024-07-22_12-42-38AM.log
2024/07/22 12:42:43 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2024/07/22 12:42:43 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2024/07/22 12:42:43 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2024/07/22 12:42:44 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2024/07/22 12:42:44 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
Redirecting to /bin/systemctl restart rsyslog.service
2024/07/22 12:42:44 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2024/07/22 12:42:45 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2024/07/22 12:42:46 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2024/07/22 12:42:46 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2024/07/22 12:42:57 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2024/07/22 12:42:57 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2024/07/22 12:42:58 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2024/07/22 12:42:58 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2024/07/22 12:43:25 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2024/07/22 12:43:25 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2024/07/22 12:43:27 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2024/07/22 12:43:28 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2024/07/22 12:43:50 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2024/07/22 12:43:53 CLSRSC-4002: Successfully installed Oracle Autonomous Health Framework (AHF).
2024/07/22 12:44:38 CLSRSC-343: Successfully started Oracle Clusterware stack
2024/07/22 12:44:38 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2024/07/22 12:44:44 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2024/07/22 12:44:49 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded



配置剩余磁盘组




检查ASM磁盘组命令:
[root@ORAC01 ~]# su - grid
[grid@ORAC01 ~]$ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 4194304 71680 71540 0 71540 0 N ARCH/
MOUNTED EXTERN N 512 512 4096 4194304 61440 61300 0 61300 0 N DATA/
MOUNTED EXTERN N 512 512 4096 4194304 51200 51056 0 51056 0 N MGMT/
MOUNTED NORMAL N 512 512 4096 4194304 46080 45092 15360 14866 0 Y OCRVOTE/
[grid@ORAC01 ~]$