@[TOC](VMware下Linux7安装Oracle19C_RAC集群搭建Part2:GI(Grid Infrastructure)安装)
此部分包括了:GI(Grid Infrastructure)的安装过程。具体过程记录如下:
GI的安装包在官网可以下载到,此次安装全程都在节点1安装,节点2自动复制。安装用户为grid用户
官网地址为:https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html
软件包名称为:LINUX.X64_193000_grid_home.zip
上传和解压GI软件
sftp> lcd d:/ //上传
sftp> put LINUX.X64_193000_grid_home.zip
Uploading LINUX.X64_193000_grid_home.zip to /root/LINUX.X64_193000_grid_home.zip
100% 2821469KB 16794KB/s 00:02:48
d:\LINUX.X64_193000_grid_home.zip: 2889184573 bytes transferred in 168 seconds (16794 KB/s)
[root@rac1 ~]# mv LINUX.X64_193000_grid_home.zip /u01/app/19.3.0/grid //移动到安装目录
[root@rac1 ~]# cd /u01/app/19.3.0/grid
[root@rac1 grid]# ll
total 2821472
-rw-r--r-- 1 root root 2889184573 Apr 17 16:23 LINUX.X64_193000_grid_home.zip
[root@rac1 grid]# chown grid:oinstall LINUX.X64_193000_grid_home.zip //修改安装包的宿主用户
[root@rac1 grid]# su - grid
1. 上传和解压GI软件
[grid@rac1 grid]$ ls -l
total 2821472
-rw-r--r-- 1 grid oinstall 2889184573 Apr 17 16:23 LINUX.X64_193000_grid_home.zip
[grid@rac1 ~]# cd $ORACLE_HOME
[grid@rac1 grid]$ unzip LINUX.X64_193000_grid_home.zip //解压到此目录
使用图形化界面通过grid用户配置GI
从Vmvare图形化界面grid用户登录。
[grid@rac1 ~]# cd $ORACLE_HOME
[grid@rac1 ~]# ./gridSetup.sh
接下来就是19c的GI配置图形化安装的过程图片。
因为每个节点设置的CPU才4核,跑下面两个脚本也花了非常久时间大约40分钟,建议设置成8核每个节点。
[root@rac1 ~]# /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@rac1 ~]# /u01/app/19.3.0/grid/root
root.sh root.sh.old root.sh.old.2 rootupgrade.sh
[root@rac1 ~]# /u01/app/19.3.0/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/19.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/19.3.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/rac1/crsconfig/rootcrs_rac1_2020-04-26_11-41-03PM.log
2020/04/26 23:42:08 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2020/04/26 23:42:12 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2020/04/26 23:42:18 CLSRSC-363: User ignored prerequisites during installation
2020/04/26 23:42:22 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2020/04/26 23:42:39 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2020/04/26 23:42:45 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2020/04/26 23:42:46 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2020/04/26 23:42:53 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2020/04/26 23:43:59 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2020/04/26 23:44:16 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2020/04/26 23:44:29 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2020/04/26 23:44:39 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2020/04/26 23:44:39 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2020/04/26 23:44:46 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2020/04/26 23:44:47 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2020/04/26 23:46:22 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
Message from syslogd@rac1 at Apr 26 23:48:33 ...
kernel:NMI watchdog: BUG: soft lockup - CPU#3 stuck for 23s! [modprobe:59227]
2020/04/26 23:51:04 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2020/04/26 23:52:27 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2020/04/26 23:52:34 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
[INFO] [DBT-30161] Disk label(s) created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-200426PM115737.log for details.
2020/04/27 00:02:21 CLSRSC-482: Running command: '/u01/app/19.3.0/grid/bin/ocrconfig -upgrade grid oinstall'
CRS-4256: Updating the profile
Successful addition of voting disk 65069b018fae4fa3bfe16bb901651325.
Successful addition of voting disk a2a2a2fc9dee4f73bff864b44489b4c2.
Successful addition of voting disk 7d7226daaa154f0ebf214c24589f116f.
Successfully replaced voting disk group with +ORS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 65069b018fae4fa3bfe16bb901651325 (AFD:ORS1) [ORS]
2. ONLINE a2a2a2fc9dee4f73bff864b44489b4c2 (AFD:ORS2) [ORS]
3. ONLINE 7d7226daaa154f0ebf214c24589f116f (AFD:ORS3) [ORS]
Located 3 voting disk(s).
2020/04/27 00:04:22 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2020/04/27 00:06:19 CLSRSC-343: Successfully started Oracle Clusterware stack
2020/04/27 00:06:19 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2020/04/27 00:08:27 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2020/04/27 00:10:11 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
至此GI的配置已经完成
验证crsctl集群状态
crsctl stat res -t查看集群资源状态信息,有做很多的精简,更趋于稳定性因素考虑~
[grid@rac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.chad
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.net1.network
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.ons
ONLINE ONLINE rac1 STABLE
ONLINE ONLINE rac2 STABLE
ora.proxy_advm
OFFLINE OFFLINE rac1 STABLE
OFFLINE OFFLINE rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 ONLINE OFFLINE STABLE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rac1 STABLE
ora.ORS.dg(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.asm(ora.asmgroup)
1 ONLINE ONLINE rac1 Started,STABLE
2 ONLINE ONLINE rac2 Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
1 ONLINE ONLINE rac1 STABLE
2 ONLINE ONLINE rac2 STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE rac1 STABLE
ora.qosmserver
1 ONLINE ONLINE rac1 STABLE
ora.rac1.vip
1 ONLINE ONLINE rac1 STABLE
ora.rac2.vip
1 ONLINE ONLINE rac2 STABLE
ora.scan1.vip
1 ONLINE ONLINE rac1 STABLE
--------------------------------------------------------------------------------
[grid@rac1 ~]$ crsctl stat res -t -init
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE rac1 Started,STABLE
ora.cluster_interconnect.haip
1 ONLINE ONLINE rac1 STABLE
ora.crf
1 ONLINE ONLINE rac1 STABLE
ora.crsd
1 ONLINE ONLINE rac1 STABLE
ora.cssd
1 ONLINE ONLINE rac1 STABLE
ora.cssdmonitor
1 ONLINE ONLINE rac1 STABLE
ora.ctssd
1 ONLINE ONLINE rac1 OBSERVER,STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.driver.afd
1 ONLINE ONLINE rac1 STABLE
ora.drivers.acfs
1 ONLINE ONLINE rac1 STABLE
ora.evmd
1 ONLINE ONLINE rac1 STABLE
ora.gipcd
1 ONLINE ONLINE rac1 STABLE
ora.gpnpd
1 ONLINE ONLINE rac1 STABLE
ora.mdnsd
1 ONLINE ONLINE rac1 STABLE
ora.storage
1 ONLINE ONLINE rac1 STABLE
--------------------------------------------------------------------------------
上述还可以通过关机检查集群状态,下面是集群日志位置
--如果忘记,可以使用adrci查看日志位置
[grid@rac1 trace]$ pwd
/u01/app/grid/diag/crs/rac1/crs/trace
[grid@rac1 trace]$ tail -20f alert.log
2020-04-27 10:57:44.593 [OCSSD(13219)]CRS-1621: The IPMI configuration data for this node stored in the Oracle registry is incomplete; details at (:CSSNK00002:) in /u01/app/grid/diag/crs/rac1/crs/trace/ocssd.trc
2020-04-27 10:57:44.593 [OCSSD(13219)]CRS-1617: The information required to do node kill for node rac1 is incomplete; details at (:CSSNM00004:) in /u01/app/grid/diag/crs/rac1/crs/trace/ocssd.trc
2020-04-27 10:57:44.596 [OCSSD(13219)]CRS-1605: CSSD voting file is online: AFD:ORS1; details in /u01/app/grid/diag/crs/rac1/crs/trace/ocssd.trc.
2020-04-27 10:57:44.606 [OCSSD(13219)]CRS-1605: CSSD voting file is online: AFD:ORS3; details in /u01/app/grid/diag/crs/rac1/crs/trace/ocssd.trc.
2020-04-27 10:57:44.618 [OCSSD(13219)]CRS-1605: CSSD voting file is online: AFD:ORS2; details in /u01/app/grid/diag/crs/rac1/crs/trace/ocssd.trc.
2020-04-27 10:57:53.746 [OCSSD(13219)]CRS-1601: CSSD Reconfiguration complete. Active nodes are rac1 .
2020-04-27 10:57:54.905 [OCSSD(13219)]CRS-1720: Cluster Synchronization Services daemon (CSSD) is ready for operation.
2020-04-27 10:57:55.441 [OCTSSD(13976)]CRS-8500: Oracle Clusterware OCTSSD process is starting with operating system process ID 13976
2020-04-27 10:57:55.782 [OCTSSD(13976)]CRS-2403: The Cluster Time Synchronization Service on host rac1 is in observer mode.
2020-04-27 10:57:57.418 [OCTSSD(13976)]CRS-2407: The new Cluster Time Synchronization Service reference node is host rac1.
2020-04-27 10:57:57.419 [OCTSSD(13976)]CRS-2401: The Cluster Time Synchronization Service started on host rac1.
2020-04-27 10:58:05.458 [OLOGGERD(14072)]CRS-8500: Oracle Clusterware OLOGGERD process is starting with operating system process ID 14072
2020-04-27 10:58:26.517 [CRSD(14480)]CRS-8500: Oracle Clusterware CRSD process is starting with operating system process ID 14480
2020-04-27 10:58:28.921 [CRSD(14480)]CRS-1012: The OCR service started on node rac1.
2020-04-27 10:58:29.038 [CRSD(14480)]CRS-1201: CRSD started on node rac1.
2020-04-27 10:58:32.568 [ORAAGENT(14604)]CRS-8500: Oracle Clusterware ORAAGENT process is starting with operating system process ID 14604
2020-04-27 10:58:32.623 [ORAROOTAGENT(14614)]CRS-8500: Oracle Clusterware ORAROOTAGENT process is starting with operating system process ID 14614
2020-04-27 10:58:37.770 [CRSD(14480)]CRS-2772: Server 'rac1' has been assigned to pool 'Free'.
2020-04-27 11:30:05.179 [OCSSD(13219)]CRS-1601: CSSD Reconfiguration complete. Active nodes are rac1 rac2 .
2020-04-27 11:31:08.230 [CRSD(14480)]CRS-2772: Server 'rac2' has been assigned to pool 'Free'.