Oracle Grid Infrastructure und Oracle RAC bereitstellen

Beim Deployment der Oracle Grid Infrastructure- und Oracle RAC-Datenbank müssen Sie Oracle Automatic Storage Management (Oracle ASM)-Datenträger konfigurieren, Oracle Grid Infrastructure im Silent- oder GUI-Modus installieren, Oracle Clusterware neu starten, Oracle RAC-Datenbanksoftware installieren, eine Oracle RAC-Datenbank erstellen und das Deployment prüfen.

In den folgenden Schritten wird beschrieben, wie Sie Oracle Grid Infrastructure und Oracle RAC in Ihrem Private Cloud Appliance-System bereitstellen.
  1. Verwenden Sie asmcmd oder asmlib, um den Datenträger zu beschriften. Beispiel: GI_HOME/bin/asmcmd afd_label diskgroup_name disk_with_full_path --init. Weitere Informationen finden Sie im Oracle Grid Infrastructure Installation Guide.
    /u01/app/21.0.0/grid/bin/asmcmd afd_label OCR /dev/sdc ––init
    
  2. Erstellen Sie eine Antwortdatei. Sie können die Beispielantwortdatei in GI_Home/install/response verwenden und die Variablenwerte hinzufügen.
  3. Installieren Sie Oracle Grid Infrastructure im Silent-Modus. Beispiel: GI_HOME/gridSetup.sh -silent -responseFile responsefile_name_with_full_path.
    /u01/app/21.0.0/grid/gridSetup.sh -silent -responseFile /home/oracle/gridsetup.rsp
  4. Legen Sie die Umgebungsvariable HAIP_UNSUPPORTED=TRUE fest.
    Oracle Private Cloud Appliance X9-2 Rack verwendet den IP-Bereich 169.254.0.0/16 für iSCSI-Verbindungen zu Boot- und Block-Volumes, Instanzmetadaten und anderen Services. Dies wirkt sich auf die vom privaten Netzwerk verwendete HAIP-Kommunikation aus, sodass die Oracle Grid Infrastructure-Installation nicht erfolgreich verläuft. Diese Umgebungsvariable muss festgelegt werden, damit HAIP-Kommunikationen erfolgreich ausgeführt werden können.
    $ export HAIP_UNSUPPORTED=TRUE
  5. Führen Sie den Befehl ./root.sh auf jedem Knoten aus.
    $ ./root.sh
  6. Verwenden Sie das Cluster Verification-Utility Cluvfy, um nach der Installation zu prüfen. Beispiel: GI_HOME/bin/cluvfy -post crsinst -n node1, node2.
    u01/app/21.0.0/grid/bin/cluvfy -post crsinst -n racvm1,racvm2
  7. Prüfen Sie Oracle Clusterware-Ressourcen mit dem Befehl crsctl.
    [oracle@racvm1 ~]$ crsctl stat res -t 
    --------------------------------------------------------------------------------
    Name Target State Server State details 
    --------------------------------------------------------------------------------
    Local Resources
    --------------------------------------------------------------------------------
    ora.LISTENER.lsnr
     ONLINE ONLINE racvm1 STABLE
     ONLINE ONLINE racvm2 STABLE
    ora.chad
     ONLINE ONLINE racvm1 STABLE
     ONLINE ONLINE racvm2 STABLE
    ora.net1.network
     ONLINE ONLINE racvm1 STABLE
     ONLINE ONLINE racvm2 STABLE
    ora.ons
     ONLINE ONLINE racvm1 STABLE
     ONLINE ONLINE racvm2 STABLE
    --------------------------------------------------------------------------------
    Cluster Resources
    --------------------------------------------------------------------------------
    ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
     1 ONLINE ONLINE racvm1 STABLE
     2 ONLINE ONLINE racvm2 STABLE
    ora.DATA.dg(ora.asmgroup)
     1 ONLINE ONLINE racvm1 STABLE
     2 ONLINE ONLINE racvm2 STABLE
    ora.LISTENER_SCAN1.lsnr
     1 ONLINE ONLINE racvm2 STABLE
    ora.LISTENER_SCAN2.lsnr
     1 ONLINE ONLINE racvm2 STABLE
    ora.LISTENER_SCAN3.lsnr
     1 ONLINE ONLINE racvm1 STABLE
    ora.asm(ora.asmgroup)
     1 ONLINE ONLINE racvm1 STABLE
     2 ONLINE ONLINE racvm2 Started,STABLE
    ora.asmnet1.asmnetwork(ora.asmgroup)
     1 ONLINE ONLINE racvm1 STABLE
     2 ONLINE ONLINE racvm2 STABLE
    ora.cdp1.cdp
     1 ONLINE ONLINE racvm2 STABLE
    ora.cdp2.cdp
     1 ONLINE ONLINE racvm2 STABLE
    ora.cdp3.cdp
     1 ONLINE ONLINE racvm1 STABLE
    ora.cvu
     1 ONLINE ONLINE racvm2 STABLE
    ora.qosmserver
     1 ONLINE ONLINE racvm2 STABLE
    ora.racvm1.vip
     1 ONLINE ONLINE racvm1 STABLE
    ora.racvm2.vip
     1 ONLINE ONLINE racvm2 STABLE
    ora.scan1.vip
     1 ONLINE ONLINE racvm2 STABLE
    ora.scan2.vip
     1 ONLINE ONLINE racvm2 STABLE
    ora.scan3.vip
     1 ONLINE ONLINE racvm1 STABLE
    --------------------------------------------------------------------------------
    [oracle@racvm1 ~]$ 
  8. Verwenden Sie runInstaller als Benutzer RDBMS, um die Oracle RAC-Datenbanksoftware im Silent-Modus oder im GUI-Modus zu installieren. Weitere Informationen finden Sie im Oracle Real Application Clusters Installation Guide.
    Beispiel für den Silent-Modus: RDBMS_HOME/runInstaller -silent -responseFile response_file_name_with_full_path.
    /u01/app/oracle/product/21.0.0/dbhome_1/runInstaller -silent -responseFile 
    /u01/app/oracle/product/21.0.0/dbhome_1/install/response/db_install.rsp
  9. Mit Oracle Database Configuration Assistant (DBCA) können Sie eine Oracle RAC-Datenbank im Silent-Modus oder im GUI-Modus erstellen. Beispiel für den Silent-Modus: RDBMS_HOME/bin/dbca -silent -createDatabase -responseFile response_file_name_with_full_path.
    [oracle@racvm1 ~]$ /u01/app/oracle/product/21.0.0/dbhome_1/bin/dbca -silent -
    createDatabase -responseFile 
    /u01/app/oracle/product/21.0.0/dbhome_1/assistants/dbca/dbca.rsp
  10. Stellen Sie sicher, dass Oracle RAC erfolgreich erstellt wurde.
    [oracle@racvm1 ~]$ /u01/app/oracle/product/21.0.0/dbhome_1/bin/srvctl status db -d 
    PCARACDB
    Instance PCARACDB1 is running on node racvm1
    Instance PCARACDB2 is running on node racvm2
    oracle@racvm1 ~]$ crsctl stat res -t|grep -i db
    ora.pcaracdb.db
     1 ONLINE ONLINE racvm1 Open,HOME=/u01/app/o
     racle/product/21.0.0
    /dbhome_1,STABLE
     2 ONLINE ONLINE racvm2 Open,HOME=/u01/app/o
     racle/product/21.0.0
    /dbhome_1,STABLE