###################################################
       ###### 11gR2 GRID Installation on Red Hat Enterprise 5 ######
###################################################

     #List of Operating System packages:

        binutils-2.17.50.0.6-6.el5 (x86_64)
        compat-libstdc++-33-3.2.3-61 (x86_64) <<< both ARCH's are required.
        compat-libstdc++-33-3.2.3-61 (i386) <<< both ARCH's are required.
        elfutils-libelf-0.125-3.el5 (x86_64)
        glibc-2.5-24 (x86_64) <<< both ARCH's are required.
        glibc-2.5-24 (i686) <<< both ARCH's are required.
        glibc-common-2.5-24 (x86_64)
        ksh-20060214-1.7 (x86_64)
        libaio-0.3.106-3.2 (x86_64) <<< both ARCH's are required.
        libaio-0.3.106-3.2 (i386) <<< both ARCH's are required.
        libgcc-4.1.2-42.el5 (i386) <<< both ARCH's are required.
        libgcc-4.1.2-42.el5 (x86_64) <<< both ARCH's are required.
        libstdc++-4.1.2-42.el5 (x86_64) <<< both ARCH's are required.
        libstdc++-4.1.2-42.el5 (i386) <<< both ARCH's are required.
        make-3.81-3.el5 (x86_64)
        elfutils-libelf-devel-0.125-3.el5.x86_64.rpm
        elfutils-libelf-devel-static-0.125-3.el5.x86_64.rpm
        elfutils-libelf-devel and elfutils-libelf-devel-static
        glibc-headers-2.5-24.x86_64.rpm
        kernel-headers-2.6.18-92.el5.x86_64.rpm
        glibc-devel-2.5-24.x86_64.rpm <<< both ARCH's are required.
        glibc-devel-2.5-24.i386.rpm <<< both ARCH's are required. 
        gcc-4.1.2-42.el5.x86_64.rpm
        libgomp-4.1.2-42.el5.x86_64.rpm
        libstdc++-devel-4.1.2-42.el5.x86_64.rpm
        gcc-c++-4.1.2-42.el5.x86_64.rpm
        libaio-devel-0.3.106-3.2.x86_64.rpm <<< both ARCH's are required.
        libaio-devel-0.3.106-3.2.i386.rpm <<< both ARCH's are required. 
        sysstat-7.0.2-1.el5.x86_64.rpm
        unixODBC-2.2.11-7.1.x86_64.rpm <<< both ARCH's are required.
        unixODBC-2.2.11-7.1.i386.rpm <<< both ARCH's are required. 
        unixODBC-devel-2.2.11-7.1.x86_64.rpm <<< both ARCH's are required. 
        unixODBC-devel-2.2.11-7.1.i386.rpm <<< both ARCH's are required. 

#ASMLIB packages
#Platform depenfent but Kernel independent
oracleasm-support-2.1.3-1.SLE10.x86_64.rpm
oracleasmlib-2.0.4-1.SLE10.x86_64.rpm

#Platform and Kernel depended
oracleasm-2.6.16.46-0.12-smp-2.0.3-1.x86_64.rpm
oracleasm-2.6.16.46-0.12-default-2.0.3-1.x86_64.rpm

###################################################

# ASMLib Configuration

[root@linux1 /]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmdba
Start Oracle ASM library driver on boot (y/n) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration [ OK ]
Creating /dev/oracleasm mount point [ OK ]
Loading module "oracleasm" [ OK ]
Mounting ASMlib driver filesystem [ OK ]
Scanning system for ASM disks [ OK ]

###################################################

# Users and Groups Creation

-- groups
[root@linux1 /]# /usr/sbin/groupadd -g 1000 oinstall
[root@linux1 /]# /usr/sbin/groupadd -g 1001 asmadmin
[root@linux1 /]# /usr/sbin/groupadd -g 1002 dba
[root@linux1 /]# /usr/sbin/groupadd -g 1003 asmdba
[root@linux1 /]# /usr/sbin/groupadd -g 1004 asmoper

-- users
[root@linux1 /]# useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper grid
[root@linux1 /]# useradd -u 1101 -g oinstall -G asmdba,dba oracle

###################################################

# Set resource limits

[root@linux1 /]# vi  /etc/security/limits.conf
## Go to the end
grid     soft     nproc     2047
grid     hard     nproc     16384
grid     soft     nofile     1024
grid     hard     nofile     65536
oracle     soft     nproc     2047
oracle     hard     nproc     16384
oracle     soft     nofile     1024
oracle     hard     nofile     65536

[root@linux1 /]# vi /etc/pam.d/login
session     required    pam_limits.so


###################################################

# User Profile

[root@linux1 /]# vi to /etc/profile

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
        ulimit -p 16384
        ulimit -n 65536
    else
        ulimit -u 16384 -n 65536
    fi
    umask 022
fi
if [ $USER = "root" ]; then
         umask 022
fi

-------------------------------------

Additional checks for user profiles
Before the installation:
- Unset any JAVA environment variables like JAVA_HOME.
- Unset any ORACLE environment variables like  ORACLE_HOME, PATH, LD_LIBRARY_PATH
- Set ORACLE_BASE

After the installation:
- Set ORACLE_HOME, and include $ORACLE_HOME/bin at the beginning of the PATH string.

###################################################

# Network configuration

- SCAN Listener component, which needs three IPs
registered into the DNS and
 
belong the same subnet used by the public NICs.
-Vip and Private IPs as per example from the /etc/hosts  of one of the node:

10.0.1.10   linux1.emilianofusaglia.net  linux1   
10.0.1.11   linux2.emilianofusaglia.net  linux2    
 
10.0.1.12   linux1-vip.emilianofusaglia.net  linux1-vip     
10.0.1.13   linux1-vip.emilianofusaglia.net  linux2-vip     

192.168.1.10   linux1-priv
192.168.1.11   linux2-priv

###################################################

# Kernel Parameters

# Disable response to broadcasts.
# You do not want yourself becoming a Smurf amplifier.
net.ipv4.icmp_echo_ignore_broadcasts = 1
# enable route verification on all interfaces
net.ipv4.conf.all.rp_filter = 1
# enable ipV6 forwarding
#net.ipv6.conf.all.forwarding = 1
 
# Set defaults for BladeFrame
# added for Oracle 11g
kernel.shmall = physical RAM size / pagesize
kernel.shmmax = 1/2 of physical RAM, but not greater than 4GB
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 512 x processes (for example 6815744 for 13312 processes)
net.ipv4.ip_local_port_range = 9000 65500

net.ipv4.tcp_wmem = 262144 262144 262144
net.ipv4.tcp_rmem = 4194304 4194304 4194304
vm.hugetlb_shm_group=64948

#MIN UDP CONFIG to Review according to Interconnect traffic & config
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

###################################################

# Create disk partitions and ASM disks

linux1:/u01 # fdisk -l /dev/sdh
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1        4700    37747712   83  Linux
linux1:/u01 # fdisk -l /dev/sdi
 
Disk /dev/sdi: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdi1               1        4700    37747712   83  Linux
linux1:/u01 # fdisk -l /dev/sdj
 
Disk /dev/sdj: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdj1               1        4699    37744686   83  Linux
linux1:/u01 #
linux1:/u01 # fdisk /dev/sdh
 
The number of cylinders for this disk is set to 4699.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
 
Command (m for help): d
Selected partition 1
 
Command (m for help): p
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)

Partition number (1-4): 1
First cylinder (1-4699, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-4699, default 4699): +1024M
 
Command (m for help): p
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1         125     1004031   83  Linux
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (126-4699, default 126):
Using default value 126
Last cylinder or +size or +sizeM or +sizeK (126-4699, default 4699):
Using default value 4699
 
Command (m for help): p
 
Disk /dev/sdh: 38.6 GB, 38654705664 bytes
255 heads, 63 sectors/track, 4699 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdh1               1         125     1004031   83  Linux
/dev/sdh2             126        4699    36740655   83  Linux
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
Syncing disks.
linux1:/u01 #partprobe

-----------------------------------------------

Once the disks have been sliced the ASM Disks can be created as showed below in the example

linux1:/u01 # /etc/init.d/oracleasm
Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scandisks|status}
linux1:/u01 # /etc/init.d/oracleasm createdisk OCR1 /dev/sdh1
Marking disk "/dev/sdh1" as an ASM disk:                              done
linux1:/u01 # /etc/init.d/oracleasm createdisk DATA1 /dev/sdh2
Marking disk "/dev/sdh2" as an ASM disk:                              done
linux1:/u01 # /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:                                        done
linux1:/u01 #

--------------------------------------------------

After having created all the ASM Disks runs the utility scandisks  on all nodes of the cluster,
this allows ASM to  discover all the new ASM Disks created.

linux2:/dev/oracleasm/disks # /etc/init.d/oracleasm scandisks
Scanning system for ASM disks:                                        done
linux2:/dev/oracleasm/disks # /etc/init.d/oracleasm listdisks
DATA1
DATA2
DATA3
OCR1
OCR2
OCR3
linux2:/dev/oracleasm/disks #

###################################################

# Create the installation directories

#Grid Home
mkdir –p /u01/GRID/11.2
chown –R grid:oinstall /u01/GRID/11.2
chmod –R 775 /u01/GRID/11.2

#Oracle Base
mkdir –p /u01/oracle
chown –R oracle:oinstall /u01/oracle
chmod –R 775 /u01/oracle

#Oracle Home
mkdir –p /u01/oracle/product/11.2
chown –R oracle:oinstall /u01/oracle/product/11.2
chmod –R 775 /u01/oracle/product/11.2

###################################################

# Run Cluster verify utility

/u01/stage/grid > ./runcluvfy.sh stage -pre crsinst -n linux1,linux2 -verbose

###################################################

# Start the Installation


/u01/stage/grid > ./runInstaller


 

   
 
  Site Map