在正常的节点
[root@db1 ~]# xhost +
access control disabled, clients can connect from any host
[root@db1 ~]# su - grid
+ASM1:/home/grid@db1>export DISPLAY=:1.0
+ASM1:/home/grid@db1>$ORACLE_HOME/gridSetup.sh
[root@db2 ~]# /tmp/GridSetupActions2021-09-16_09-25-02PM/CVU_19.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.
[root@db2 grid]#
[root@db2 ~]# /u01/app/19.0.0/grid_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /u01/app/19.0.0/grid_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
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.0.0/grid_1/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/db2/crsconfig/rootcrs_db2_2021-09-16_09-37-12PM.log
2021/09/16 21:37:32 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2021/09/16 21:37:32 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2021/09/16 21:37:32 CLSRSC-363: User ignored prerequisites during installation
2021/09/16 21:37:33 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2021/09/16 21:37:33 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2021/09/16 21:37:39 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
Redirecting to /bin/systemctl restart rsyslog.service
2021/09/16 21:37:39 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2021/09/16 21:37:40 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2021/09/16 21:37:41 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2021/09/16 21:37:41 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2021/09/16 21:37:52 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2021/09/16 21:37:52 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2021/09/16 21:37:53 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2021/09/16 21:37:54 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2021/09/16 21:38:19 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2021/09/16 21:38:19 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2021/09/16 21:38:41 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2021/09/16 21:38:42 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2021/09/16 21:38:53 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/09/16 21:39:12 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2021/09/16 21:40:01 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/09/16 21:40:01 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
clscfg: EXISTING configuration version 19 detected.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
2021/09/16 21:40:17 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/09/16 21:40:27 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@db2 ~]#
[root@db1 ~]# xhost +
access control disabled, clients can connect from any host
kfptdb1:/home/oracle@db1>$ORACLE_HOME/addnode/addnode.sh "CLUSTER_NEW_NODES={db2}"
[root@db2 ~]# /u01/app/oracle/product/19.0.0/db_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/19.0.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
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.
[root@db2 ~]#
[root@db1 ~]# su - oracle
orcl1:/home/oracle@db1> dbca -silent -addInstance -nodeName db2 -gdbName orcl -instanceName orcl2 -sysDBAUserName sys -sysDBAPassword Orcl#2017
Prepare for db operation
40% complete
Adding instance
48% complete
52% complete
56% complete
60% complete
64% complete
68% complete
72% complete
80% complete
Completing instance management.
86% complete
100% complete
Instance "orcl2" added successfully on node "db2".
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl/orcl0.log" for further details.
orcl1:/home/oracle@db1>