Installing Oracle Grid Infrastructure for a Standalone Server Using Command-Line Interface

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

You should have your network information, storage information, and operating system users and groups available to you before you start the installation. You should also be prepared to run root scripts or provide information to automate root scripts.

  1. Log in as the Oracle Restart software owner user (oracle).
  2. If this is the first time you are installing Oracle software, then create the Oracle base and the Oracle inventory directories as per the Oracle Optimal Flexible Architecture (OFA) recommendations. Specify the correct owner, group, and permissions for these directories.
    # mkdir -p /u01/app/oracle
    # mkdir -p /u01/app/oraInventory
    # chown -R oracle:oinstall /u01/app/oracle
    # chown -R oracle:oinstall /u01/app/oraInventory
    # chmod -R 775 /u01/app
  3. Download the Oracle Grid Infrastructure for a standalone server installation image files, create the grid home directory, and extract the image files in this grid home directory.

    For example:

    $ mkdir -p /u01/app/oracle/product/23.0.0/grid
    $ cd /u01/app/oracle/product/23.0.0/grid
    $ unzip -q /tmp/grid_home.zip

    Note:

    • Ensure that the Grid home directory path you create is in compliance with the Oracle Optimal Flexible Architecture recommendations. Also, unzip the installation image files only in this Grid home directory that you created.
    • Oracle home or Oracle base cannot be symlinks, nor can any of their parent directories, all the way to up to the root directory.
  4. Configure and provision the shared disks for use with Oracle ASM Filter Driver (Oracle ASMFD).
    1. Log in as root and set $ORACLE_HOME to the grid home location and $ORACLE_BASE to a temporary location.
      su root
      # set ORACLE_HOME=/u01/app/oracle/product/23.0.0/grid
      # set ORACLE_BASE=/tmp
      

      You set $ORACLE_BASE to a temporary location to avoid creating diagnostic or trace files in the Grid home before the Oracle Grid Infrastructure installation.

    2. Use the ASMCMD afd_label command to provision disk devices for use with Oracle ASM Filter Driver. For example:
      cd /u01/app/oracle/product/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
    3. Use the ASMCMD afd_lslbl command to verify the device has been marked for use with Oracle ASMFD. For example:
      ./asmcmd afd_lslbl /dev/sdb
      ./asmcmd afd_lslbl /dev/sdc
      ./asmcmd afd_lslbl /dev/sdd
    4. Unset $ORACLE_BASE.
      # unset ORACLE_BASE
      
  5. As the grid user, run the gridSetup.sh command with the -silent option and specify the configuration parameters.
    gridSetup.sh -configureStandaloneServer -OSDBA sysdba -OSASM osasm -OSOPER osoper -ORACLE_BASE /u01/app/oracle -dbDiskGroupName DATA 
    -diskList /dev/sdb,/dev/sdc,/dev/sdd -executeConfigTools -executeRootScript -configMethod ROOT -redundancy NORMAL -auSize 8 -diskString /dev/sd* -configureAFD -managementOption NONE -INVENTORY_LOCATION /u01/app/oraInventory
  6. Provide the root user password when prompted.