Dung (Donny) Nguyen

Senior Software Engineer

Installing and Setting up Oracle Grid Infrastructure

Oracle Grid Infrastructure is a foundational component for Oracle RAC, providing cluster management and storage solutions like ASM (Automatic Storage Management). Here’s a step-by-step guide to installing and setting up Oracle Grid Infrastructure:


1. Prerequisites

a. Hardware and System Requirements

b. Shared Storage

c. Software Requirements

d. Accounts and Permissions


2. Prepare the Environment

a. Set Kernel Parameters

Update /etc/sysctl.conf with the necessary kernel parameters:

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

Apply changes:

sysctl -p

b. Set User Limits

Update /etc/security/limits.conf for the grid user:

grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
grid soft stack 10240

c. Configure SSH Equivalence

Enable passwordless SSH for cluster communication:

ssh-keygen -t rsa
ssh-copy-id <other_node>

3. Installation Steps

a. Run the Installer

  1. Extract the Grid Infrastructure Installation Media:
    unzip grid_infrastructure.zip
    cd grid_infrastructure
    
  2. Launch the Installer:
    ./gridSetup.sh
    
  3. Choose Installation Type:
    • Select Configure Oracle Grid Infrastructure for a Cluster.
    • Choose either Configure ASM or Cluster File System for storage.

b. Cluster Configuration

c. Network Configuration

d. ASM Configuration

e. Run Configuration Scripts

f. Verify Installation


4. Post-Installation Configuration

a. Create ASM Disk Groups

Use the ASM Configuration Assistant (asmca) to create additional disk groups if needed:

/u01/app/12.2.0/grid/bin/asmca

b. Configure Oracle Clusterware Services

c. Setup Automatic Startup

Ensure Clusterware starts automatically during system boot:

crsctl enable crs

d. Monitor the Cluster


5. Best Practices


This process sets up Oracle Grid Infrastructure, enabling you to use features like Oracle RAC or ASM for high availability and scalable storage.