Installing Oracle Grid Infrastructure Using Command-Line Interface

Starting with Oracle Grid Infrastructure 23ai, you can install and configure Oracle Grid Infrastructure using the command-line interface.

  1. As the grid user, download the Oracle Grid Infrastructure image files and extract the files into the Grid home.
    mkdir -p /u01/app/23.3.0/grid 
    chown grid:oinstall /u01/app/23.3.0/grid 
    cd /u01/app/23.3.0/grid 
    unzip -q download_location/grid.zip
    grid.zip is the name of the Oracle Grid Infrastructure image zip file.

    Note:

    • You must extract the zip image software into the directory where you want your Grid home to be located.

    • Download and copy the Oracle Grid Infrastructure image files to the local node only. During installation, the software is copied and installed on all other nodes in the cluster.

    • Oracle home or Oracle base cannot be symlinks, nor can any of their parent directories, all the way to up to the root directory.

  2. Configure the shared disks for use with Oracle ASM Filter Driver:
    1. Ensure that the disk devices that you are using for Oracle ASMFD are owned by the user performing the Oracle Grid Infrastructure installation.
      # chown grid:asmdba /dev/sdb
      # chown grid:asmdba /dev/sdc
      # chown grid:asmdba /dev/sdd
    2. Log in as the root user and set the environment variable ORACLE_HOME to the location of the Grid home.

      For C shell:

      su root
      setenv ORACLE_HOME /u01/app/23.3.0/grid
      

      For bash shell:

      su root
      export ORACLE_HOME=/u01/app/23.3.0/grid
      
    3. Use Oracle ASM command line tool (ASMCMD) to provision the disk devices for use with Oracle ASM Filter Driver.
      cd /u01/app/23.0.0/grid/bin
      ./asmcmd afd_label DATA1 /dev/sdb --init
      ./asmcmd afd_label DATA2 /dev/sdc --init
      ./asmcmd afd_label DATA3 /dev/sdd --init
    4. Verify the device has been marked for use with Oracle ASMFD.
      ./asmcmd afd_lslbl /dev/sdb
      ./asmcmd afd_lslbl /dev/sdc
      ./asmcmd afd_lslbl /dev/sdd
  3. As the grid user, run the gridSetup.sh command with the -silent option and specify the configuration parameters.
    /u01/app/23.3.0/grid/gridSetup.sh -silent -configureCluster -OSDBA sysdba -OSOPER osoper -OSASM osasm -ORACLE_BASE /u01/app/grid -clusterName myrac 
    -scanName cluster-scan -scanPort 1521 -clusterNodes myrac1,myrac2 -networkInterfaceList ens3:100.70.80.0:1,ens4:192.168.1.0:5,ens5:192.168.2.0:3 
    -clusterUsage RAC -storageOption FLEX_ASM_STORAGE -diskGroupName DATA -diskList /dev/sdb,/dev/sdc,/dev/sdd -redundancy NORMAL-auSize 8 -diskString '/dev/sd*' 
    -configureAFD -executeRootScript -configMethod ROOT -enableAutoFixup -managementOption NONE -INVENTORY_LOCATION /u01/app/oraInventory
  4. Provide the root user password when prompted.