Friday, August 9, 2013

Installing Oracle Grid Infrastructure 12c R1 (12.1) On Standalone Server On Linux 6 with ASM

This article describes the installation of Oracle Grid Infrastructure 12c Release 1 (12.1) (64-bit) on Oracle Linux 6 (64-bit) using Oracle VM VirtualBox. The article is based on a server installation with a minimum of 4G swap, 2.5GB RAM with SELinux and firewall disabled. The following package groups were included during the operating system installation for this installation.

OS Installation:

  • Base System > Base
  • Base System > Compatibility libraries
  • Base System > Hardware monitoring utilities
  • Base System > Large Systems Performance
  • Base System > Network file system client
  • Base System > Performance Tools
  • Base System > Perl Support
  • Servers > Server Platform
  • Servers > System administration tools
  • Desktops > Desktop
  • Desktops > Desktop Platform
  • Desktops > Fonts
  • Desktops > General Purpose Desktop
  • Desktops > Graphical Administration Tools
  • Desktops > Input Methods
  • Desktops > X Window System
  • Applications > Internet Browser
  • Development > Additional Development
  • Development > Development Tools
NOTE: In Oracle Enterprise Linux (OEL) 6 in order  to enable GUI you have to explicitly select Desktop packages during the installation of OEL 6 operating system, otherwise GUI will not be enabled.

For any assistance on how to install Oracle Linux can be found here.

Download Software

Download the Oracle software from OTN or MOS depending on your support status.

Once the software is downloaded transfer the files using any ftp clients such as FileZilla e.t.c.





Unzip Files
Unzip the files using unzip utility.

    unzip linuxamd64_12c_grid_1of2.zip
    unzip linuxamd64_12c_grid_2of2.zip

You should now have a single directory called "grid" containing installation files.


It is always wiser to prepare a checklist before you start your work. Below are the tasks which have to be performed before starting to install Oracle Grid Infrastructure 12c.

1. Configuring Server for Oracle Grid Infrastructure on Standalone Server

1.1 Checking Server Hardware and Memory Configuration


1.1.1 Physical RAM Size


Determine the physical RAM size using following command:


[root@db12c-1 ~]# grep MemTotal /proc/meminfo

MemTotal:        2055048 kB

[root@db12c-1 ~]#



Oracle recommends minimum of 4GB RAM, lets proceed with 2GB.

1.1.2 Determine the size of the configured swap space using following command:

[root@db12c-1 ~]# grep SwapTotal /proc/meminfo
SwapTotal:       6291452 kB
[root@db12c-1 ~]#

1.1.3 Determine the amount of space available in the /tmp directory using following command:

[root@db12c-1 ~]# df -h /tmp
Filesystem            Size  Used Avail Use% Mounted on
/tmp                   54G   15G   37G  28% /tmp
[root@db12c-1 ~]#

1.1.4 Determine the amount of free RAM and disk swap space on the system using the following command:

[root@db12c-1 ~]# free
             total       used       free     shared    buffers     cached
Mem:       2055048    1446580     608468          0     112668     975248
-/+ buffers/cache:     358664    1696384
Swap:      6291452          0    6291452
[root@db12c-1 ~]#

1.1.5 Determine if the system architecture using the following command:


[root@db12c-1 ~]# uname -m
x86_64
[root@db12c-1 ~]#

In a 64 bit machine 64 bit software has to be installed. The processor architecture has to match with the Oracle software release to install

1.1.6 Verify that shared memory (/dev/shm) is mounted properly with sufficient size using the following command:


[root@db12c-1 ~]# df -h /dev/shm
Filesystem            Size  Used Avail Use% Mounted on
tmpfs                 2.5G  639M  1.9G  25% /dev/shm
[root@db12c-1 ~]#

Use df-h command to display the filesystem information.

[root@db12c-1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              54G   15G   37G  28% /
tmpfs                 2.5G  639M  1.9G  25% /dev/shm
[root@db12c-1 ~]#

1.1.7 Server storage requirements

Server should have at least 50-60 GB free space for the installation of Grid Infrastructure and Oracle Database 12c home.

1.1.8 Minimum Memory Requirements

At least 4 GB RAM is required to install Oracle Grid Infrastructure 12c and Oracle Database 12c. If RAM is less than the mentioned value, either the installation will be slowed down or will terminate in the middle of installation process. 

1.1.9 Shared Memory Requirements

The size of the shared memory of the server (/dev/shm) should be greater than the sum of SGA (System Global Area) and PGA (Program Global Area).

1.2 Configuring Oracle Linux with Oracle RDBMS Pre-Install RPM

1.2.1 Making Changes to the Kernel parameter files

Download package oracle-rdbms-server-12cR1-preinstall-1.0-1.el6.x86_64.rpm from here (http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/). If your server is connected to internet you can also download it directly by using following command in the terminal:

$wget http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64.rpm

Once the file is downloaded it can be installed as root user using following command:

rpm -ivh oracle-rdbms-server-12cR1-preinstall-1.0-1.el6.x86_64.rpm

If this rpm is installed there is no need to make changes to the kernel parameter files for installing Oracle database the changes are made by the rpm itself. However if using different user to install grid infrastructure ie. "grid" user then some changes in file "/etc/security/limits.conf" has to be made manually.

Make following entries for the grid user:

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

If you are not using oracle-rdbms-server-12cR1-preinstall-1.0-1.el6.x86_64.rpm file and going for manual configuration then then make changes in the following files:

a) Add or modify following lines in /etc/sysctl.conf file

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

Once the editing is completed use the following command to make the changes take effect.

/sbin/sysctl -p

b) Add or modify following lines in /etc/security/limits.conf


--For oracle user
oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc     2047
oracle   hard   nproc     16384
oracle   soft   stack     10240
oracle   hard   stack     32768

--For grid user
grid   soft   nofile    1024
grid   hard   nofile    65536
grid   soft   nproc     2047
grid   hard   nproc     16384
grid   soft   stack     10240

grid   hard   stack     32768

1.2.2 Installing required RPMS

Following RPMs are required to successfully install Oracle Grid Infrastructure and Oracle Database 12c.

binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686)
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
libXext-1.1 (x86_64)
libXext-1.1 (i686)
libXtst-1.0.99.2 (x86_64)
libXtst-1.0.99.2 (i686)
libX11-1.3 (x86_64)
libX11-1.3 (i686)
libXau-1.0.5 (x86_64)
libXau-1.0.5 (i686)
libxcb-1.5 (x86_64)
libxcb-1.5 (i686)
libXi-1.3 (x86_64)
libXi-1.3 (i686)
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
unixODBC-2.2.14-11.el6 (64-bit) or later
unixODBC-devel-2.2.14-11.el6 (64-bit) or later

RPMs can be installed as root user using following command:

rpm -ivh binutils-2.20.51.0.2-5.36.el6.x86_64.rpm

If you already have RPM installed and want to update with new version then use following command:

rpm -Uvh binutils-2.20.51.0.2-5.36.el6.x86_64.rpm

1.3 Checking the Software requirements


To ensure that the system meets these requirements, follow these steps:

1.3.1 Check the Linux release version


To determine which distribution and version of Linux is installed, enter the one of the following commands:



# cat /etc/oracle-release

# cat /etc/redhat-release

# lsb_release –id



[root@db12c-1 ~]# cat /etc/oracle-release

Oracle Linux Server release 6.4

[root@db12c-1 ~]# 

[root@db12c-1 ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 6.4 (Santiago)

[root@db12c-1 ~]# 

[root@db12c-1 ~]# lsb_release -id

Distributor ID: OracleServer

Description:    Oracle Linux Server release 6.4

[root@db12c-1 ~]#

1.3.2 Check required kernel version


To determine whether the required kernel version is installed, enter the following command:



[root@db12c-1 ~]# uname -r

2.6.39-400.17.1.el6uek.x86_64

[root@db12c-1 ~]#

1.3.3 Check required RPM packages

To determine whether the required packages are installed, enter commands similar to the following:

# rpm -q package_name

For example:

# rpm -q binutils compat-libstdc++ elfutils gcc glibc libaio libgcc libstdc++ make sysstat unixodbc

If a package is not installed, then install it from your Linux distribution media or download the required package version from your Linux distributor's website http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/x86_64/.

1.3.4 Changes in file 90-nproc.conf

Make changes in file /etc/security/limits.d/90-nproc.conf. Default values are given below:

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
*          soft    nproc     1024
root       soft    nproc     unlimited

To

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.
#*          soft    nproc     1024
*           -       nproc     16384
root       soft    nproc     unlimited

1.3.5 Disable SELINUX and FIREWALL

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive

Navigate to System => Administration => Firewall. Click on Disable button and then click on Apply to disable firewall.


1.4 Network Configuration

The IP address which is supposed to be used in server has to be put in /etc/hosts file.

[root@db12c-1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.169.21  db12c-1 db12c-1 
[root@db12c-1 ~]#

1.5 Creating Groups, Users and Environment variables

1.5.1 Creation groups for Oracle Grid Infrastructure

Enter the following command to create different groups.
/usr/sbin/groupadd -g 54321 oinstall
/usr/sbin/groupadd -g 54322 dba
/usr/sbin/groupadd -g 54333 oper

/usr/sbin/groupadd -g 54325 backupdba
/usr/sbin/groupadd -g 54326 dgdba
/usr/sbin/groupadd -g 54327 kmdba

/usr/sbin/groupadd -g 54328 asmdba
/usr/sbin/groupadd -g 54329 asmoper
/usr/sbin/groupadd -g 54330 asmadmin

If the group id already exists then use different group id.

1.5.2 Create Oracle Grid Infrastructure User (grid)

useradd -u 64322 -g oinstall -G dba,asmdba,asmadmin,asmoper -d /home/grid -m grid

Change the password using the following command after the user is created.

passwd grid

1.5.3 Create Oracle Database User (oracle)

useradd -u 64321 -g oinstall -G dba,oper -d /home/oracle -m oracle

Delete the user if it already exists by using following command:

/usr/sbin/userdel –r

After deleting the user create the user using above command to create user.

Change the password using the following command after the user is created.

passwd oracle

Use the following command to add user to a specific secondary group:
usermod -a -G oper oracle

In case of using ASM and job role segregation (JRS) to install Database and Grid Infrastructure then add oracle user to asmdba group. If not done then dbca will not show any ASM disk groups during database creation. JRS means using different users to install database binaries and grid infrastructure for e.g we used oracle user to install database binaries and grid user to install grid infrastructure.

usermod -a -G asmdba oracle

1.5.4 Creating directories

Create the Oracle Inventory Directory
mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

Creating the Oracle Base Directory for Oracle Grid installation
mkdir -p /u01/app/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/app/grid

Creating the Oracle Grid Infrastructure Home Directory
mkdir -p /u01/app/grid/ product/12.1.0.1/grid
chown -R grid:oinstall /u01/app/grid
chmod -R 775 /u01/

Creating the Oracle Base Directory for Oracle Database installation
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

Creating the Oracle RDBMS Home Directory
mkdir -p /u01/app/oracle/product/12.1.0.1/db_1
chown -R oracle:oinstall /u01/app/oracle/product/12.1.0.1

Needed to ensure that dbca is able to run after the rdbms installation.
mkdir /u01/app/oracle/cfgtoollogs
chown -R oracle:oinstall /u01/app/oracle/cfgtoollogs
chmod -R 775 /u01/app/oracle/cfgtoollogs

1.5.5 Configure .bash_profile for grid user

Login to the server as grid user. Use vi editor to edit the profile of grid user.

vi $HOME/.bash_profile

Add the following entries in the file:

# Oracle Settings for grid user
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=db12c-1
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/grid
export ORA_CRS_HOME=$ORACLE_HOME
export ORACLE_SID=+ASM

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

1.5.6 Configure .bash_profile for oracle user

Login to the server as oracle user. Use vi editor to edit the profile of oracle user.

vi $HOME/.bash_profile

Add the following entries in the file:

# Oracle Settings for oracle user
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=db121c-1
export ORACLE_UNQNAME=db12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.1/db_1
export ORACLE_SID=db12c

export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

1.6 Storage Configuration

1.6.1 Shutdown the VM.

$shutdown –h now

1.6.2 Create disks for Oracle ASM (Automatic Storage Management)

Navigate to the folder where the VM disks are placed.



Execute the following command to create disks for ASM. Each command are in single line.

"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk01.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk02.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk03.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk04.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk05.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk06.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk07.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk08.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk09.vdi --size 1024 --format VDI --variant Fixed
"C:\Program Files\Oracle\VirtualBox\VBoxManage" createhd --filename asmdisk10.vdi --size 1024 --format VDI --variant Fixed


Execute the following command to attach the disks to the VM. Each command are in single line:

"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 1  --device 0 --type hdd --medium asmdisk01.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 2  --device 0 --type hdd --medium asmdisk02.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 3  --device 0 --type hdd --medium asmdisk03.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 4  --device 0 --type hdd --medium asmdisk04.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 5  --device 0 --type hdd --medium asmdisk05.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 6  --device 0 --type hdd --medium asmdisk06.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 7  --device 0 --type hdd --medium asmdisk07.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 8  --device 0 --type hdd --medium asmdisk08.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 9  --device 0 --type hdd --medium asmdisk09.vdi --mtype normal
"C:\Program Files\Oracle\VirtualBox\VBoxManage" storageattach db12c-1 --storagectl "SATA" --port 10 --device 0 --type hdd --medium asmdisk10.vdi --mtype normal

1.6.3 Start the VM

Select the VM you want to start and click on Start icon.

1.6.4 Create partition from above added disks

As root user use fdisk command to partition the disks. Repeat the steps below for all the disks (sdc, sdd, sde, sdf, sdh, sdi, sdj, sdk).

# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x62be91cf.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-652, default 1): 
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-652, default 652): 
Using default value 652

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
#

Check the disk partitions using command :

$ls –l /dev/sd*

1.6.5 Identify the Disks (/sbin/scsi_id)

As root user execute the command below to identify the disks:

/sbin/scsi_id -g -u -d /dev/sdb
/sbin/scsi_id -g -u -d /dev/sdc
/sbin/scsi_id -g -u -d /dev/sdd
/sbin/scsi_id -g -u -d /dev/sde
/sbin/scsi_id -g -u -d /dev/sdf
/sbin/scsi_id -g -u -d /dev/sdg
/sbin/scsi_id -g -u -d /dev/sdh
/sbin/scsi_id -g -u -d /dev/sdi
/sbin/scsi_id -g -u -d /dev/sdj
/sbin/scsi_id -g -u -d /dev/sdk

Sample Output shown below:
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdb
1ATA_VBOX_HARDDISK_VB069dee52-4dc7c1f9
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdc
1ATA_VBOX_HARDDISK_VB88aef75a-e989cd2a
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdd
1ATA_VBOX_HARDDISK_VBc0763071-c9d39b3c
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sde
1ATA_VBOX_HARDDISK_VB692af731-d2dc1d6b
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdf
1ATA_VBOX_HARDDISK_VB8977bd77-869edec6
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdg
1ATA_VBOX_HARDDISK_VB56c3dd04-65b7eb62
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdh
1ATA_VBOX_HARDDISK_VB333bef32-a3b4b33a
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdi
1ATA_VBOX_HARDDISK_VB99df6db3-5259552a
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdj
1ATA_VBOX_HARDDISK_VB03b741b2-051f036c
[root@db12c-1 ~]# /sbin/scsi_id -g -u -d /dev/sdk
1ATA_VBOX_HARDDISK_VBc9fd2bc2-cffcf799

The out put of the above command goes into the UDEV rules file into RESULT= ="OUTPUT HERE".

1.6.6 Create UDEV Rules

Use vi editor to edit UDEV rules file. 

# vi /etc/udev/rules.d/99-oracle-asmdevices.rules

Add following entries in the file:
KERNEL=="sdb1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB069dee52-4dc7c1f9", NAME="ASMDISK01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdc1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB88aef75a-e989cd2a", NAME="ASMDISK02", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdd1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBc0763071-c9d39b3c", NAME="ASMDISK03", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sde1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB692af731-d2dc1d6b", NAME="ASMDISK04", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdf1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB8977bd77-869edec6", NAME="ASMDISK05", OWNER="grid", GROUP="asmadmin", MODE="0660"

KERNEL=="sdg1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB56c3dd04-65b7eb62", NAME="ASMDISK06", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdh1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB333bef32-a3b4b33a", NAME="ASMDISK07", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdi1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB99df6db3-5259552a", NAME="ASMDISK08", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdj1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB03b741b2-051f036c", NAME="ASMDISK09", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sdk1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBc9fd2bc2-cffcf799", NAME="ASMDISK10", OWNER="grid", GROUP="asmadmin", MODE="0660"

1.6.7 Load updated block device partition tables

Use following command to load updated block device partition tables

/sbin/partprobe /dev/sdb1
/sbin/partprobe /dev/sdc1
/sbin/partprobe /dev/sdd1
/sbin/partprobe /dev/sde1
/sbin/partprobe /dev/sdf1

/sbin/partprobe /dev/sdg1
/sbin/partprobe /dev/sdh1
/sbin/partprobe /dev/sdi1
/sbin/partprobe /dev/sdj1
/sbin/partprobe /dev/sdk1

1.6.8 Test that the rules

Use the following command to test if the rules are correct.

$/sbin/udevadm test /block/sdb/sdb1

1.6.9 Restart udev rules

Use the following command to restart udev rules in OEL 6 (Oracle Enterprise Linux 6)

$/sbin/udevadm control --reload-rules
$/sbin/start_udev

1.6.10 Check ASM disks

ls -la /dev/ASM*

1.7 Start the Installation

1.7.1 Login to the server as grid user. Do not login as root user and do su to switch to grid user.


1.7.2 Open a terminal window and navigate to the location where grid binaries are unzipped




1.7.3 Execute runInstaller



1.7.4 Download Software Updates


Leave the default selection and click on Next button to continue.


1.7.5 Select Installation Option

Select second option and click on Next button to continue.

1.7.6 Select Product Languages

Leave the default selection and click on Next button to continue.


1.7.7 Create ASM Disk Group - I

Change the name of ASM Disk group as required. Click “Change Discovery Path” button change the discovery path as shown in the image below and click on Ok button.


1.7.8 Create ASM Disk Group – II

Select the required number of disks and select the Normal redundancy.


1.7.9 Specify ASM Password

Provide password and click on Next button to continue.

1.7.10 Privileged Operating System Groups

Leave the default selection and click on Next button to continue.


1.7.11 Specify Installation Location


Enter the required values and click on Next button to continue. In case of Oracle RAC software location should not be directly under Oracle base directory.


1.7.12 Create Inventory

Provide the Inventory directory and click on Next button to continue.

1.7.13 Root script execution configuration

Leave the default selection and click on Next button to continue.

1.7.14 Perform Prerequisite Checks

OUI performing prerequisite checks.

     If your system has less than 4 GB memory you will encounter warning like below. Select Ignore All check box and click on Next button to continue.


1.7.15 Summary

Review the summary page and click on Install to start installation.

1.7.16 Product Installation in process



1.7.17 Execute configuration scripts

Open a new terminal window, login as root user and execute the scripts one after another.



--********************************************************************************
Script 1:
--********************************************************************************
[root@db12c-1 ~]# id -a
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[root@db12c-1 ~]# 
[root@db12c-1 ~]# /u01/app/oraInventory/orainstRoot.sh 
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@db12c-1 ~]#

--********************************************************************************
Script 2:
--********************************************************************************

[root@db12c-1 ~]# id -a
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[root@db12c-1 ~]# /u01/app/grid/product/12.1.0.1/grid/root.sh 
Performing root user operation for Oracle 12c 

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/grid/product/12.1.0.1/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/grid/product/12.1.0.1/grid/crs/install/crsconfig_params
LOCAL ADD MODE 
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE 
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node db12c-1 successfully pinned.
2013/08/08 13:32:48 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf'


db12c-1     2013/08/08 13:33:26     /u01/app/grid/product/12.1.0.1/grid/cdata/db12c-1/backup_20130808_133326.olr
2013/08/08 13:37:34 CLSRSC-327: Successfully configured Oracle Grid Infrastructure for a Standalone Server

[root@db12c-1 ~]#

1.7.18 Finish

Click on Close button to complete the installation.



1.8 Check the status of the cluster

As grid use the following command to check the status of the cluster software.

crsctl stat res -t

If you want to see the output at a certain interval of 5 seconds then use the following command.

watch -n 5 -dhv crsctl stat res -t 


Check the asm parameters as grid user:

[grid@db12c-1 ~]$ srvctl config asm
ASM home: /u01/app/grid/product/12.1.0.1/grid
Password file: +DATA_DISK01/orapwasm
ASM listener: LISTENER
Spfile: +DATA_DISK01/ASM/ASMPARAMETERFILE/registry.253.822922873
ASM diskgroup discovery string: /dev/ASM*
[grid@db12c-1 ~]$ 

Hope this helps



References:
http://www.oracle-base.com/articles/12c/oracle-db-12cr1-rac-installation-on-oracle-linux-6-using-virtualbox.php
http://docs.oracle.com/cd/E16655_01/install.121/e17888/toc.htm

3 comments:

  1. Excellent blog, all the steps are very well explained and works exactly as it is represented. Thank you.

    ReplyDelete
  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle Pre _RAC Installation, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Oracle Pre _RAC Installation. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com



    ReplyDelete
  3. Awesome,
    Thank you so much for sharing such an awesome blog...
    infrastructure management solutions

    ReplyDelete