This document describes how to install Oracle RAC cluster 12cR1 on Redhat. We’ll install the grid, configure the ASM diskgroups and then install the cluster database.
Below the summary of study case :

Download grid and database softwares p17694377_121020xx on oracle web site. Here are softwares used for installations:
$ ls -ltrh
-rw-r–r– 1 oracle dba 1.6G Jul 9 11:53 p17694377_121020_Linux-x86-64_1of8.zip
-rw-r–r– 1 oracle dba 968M Jul 9 11:53 p17694377_121020_Linux-x86-64_2of8.zip
-rw-r–r– 1 oracle dba 1.7G Feb 27 2015 p17694377_121020_Linux-x86-64_3of8.zip
-rw-r–r– 1 oracle dba 617M Feb 26 2015 p17694377_121020_Linux-x86-64_4of8.zip
NB : Files 1 and 2 for database
Files 3 and 4 for grid infrastructure 2.Create oracle user and softwares directories
User ‘oracle’ will be used as owner of grid and database binaries. As root user, create oracle user and groups. Change also oracle password like below:
# groupadd -g 502 asmadmin
# groupadd -g 503 dba
#useradd -u 502 -g dba -G asmadmin -d /home/oracle -c “Oracle user” oracle
#chown oracle:dba /u01
# passwd oracle
#su – oracle –> to connect as oracle user
$mkdir -p /u01/app/grid
$mkdir -p /u01/app/12.1
3.Configure system requirements
Edit file /etc/sysctl.conf and add/modify parameters like below:
#—- Params for oracle ——–
net.ipv4.ip_local_port_range = 9000 65500
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 3145728
kernel.panic_on_oops = 1
fs.file-max = 6815744
Edit file /etc/security/limits.conf
#— Oracle params ———
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768
Apply modifications with command below:
# /sbin/sysctl –p
4.Disable NTP server
As root user, execute :
# /etc/init.d/ntpd status
ntpd (pid 5032) is running…
# service ntpd stop
Shutting down ntpd: [ OK ]
# chkconfig ntpd off
# mv /etc/ntp.conf /etc/ntp.conf.orig
# rm /var/run/ntpd.pid
rm: cannot remove `/var/run/ntpd.pid’: No such file or directory
#
5.Configure /etc/hosts files:
Edit and configure file /etc/hosts on both nodes as root user :
# Private Interconnect – (eth2)
192.168.102.1 svr-lcmsdb-01-priv.mtn.ci svr-lcmsdb-01-priv
192.168.102.2 svr-lcmsdb-02-priv.mtn.ci svr-lcmsdb-02-priv
# Public Network – (bond0)
192.168.0.135 svr-lcmsdb-01.mtn.ci svr-lcmsdb-01
192.168.0.136 svr-lcmsdb-02.mtn.ci svr-lcmsdb-02
# Public Virtual IP (VIP) addresses – (eth)
192.168.0.139 svr-lcmsdb-01-vip.mtn.ci svr-lcmsdb-01-vip
192.168.0.140 svr-lcmsdb-02-vip.mtn.ci svr-lcmsdb-02-vip

Choose a scan name and add 3 public ip adressesses for SCAN. Add 3 entries in DNS with scan name and the ips: each entry with the scan name and one of the 3 ips
Edit file /etc/resolv.conf and add the domain and the ips of the different DNS used in the network
# cat /etc/resolv.conf
search mydomain.ci
nameserver 192.168.0.138
nameserver 192.168.0.139
Check scan name resolution like below:
# nslookup LCMS-cluster-scan
Server: 192.168.0.138
Address: 192.168.0.138#53
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.143
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.142
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.141
# nslookup LCMS-cluster-scan
Server: 192.168.0.138
Address: 192.168.0.138#53
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.142
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.141
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.143
# nslookup LCMS-cluster-scan
Server: 192.168.0.138
Address: 192.168.0.138#53
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.141
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.143
Name: LCMS-cluster-scan.mydomain.ci
Address: 192.168.0.142
7.Packages installation
Use the yum package manager to install the packages and any of their dependencies. Create a file called pkg.txt containing all the packages to be installed. As root user, use the following command to install the packages:
# yum install `awk ‘{print $1}’ ./pkg.txt`
—–Content of pkg.txt file:
cloog-ppl
compat-libcap1
compat-libstdc++-33
cpp
gcc
gcc-c++
glibc-devel
glibc-headers
kernel-headers
ksh
libXmu
libXt
libXv
libXxf86dga
libXxf86misc
libXxf86vm
libaio-devel
libdmx
libstdc++-devel
mpfr
make
ppl
xorg-x11-utils
xorg-x11-xauth
oracleasm
unixODBC
unixODBC-devel
compat-libstdc++-33.i686
glibc-devel.i686
libstdc++.i686
libstdc++-devel.i686
libX11.i686
libXext.i686
libXi.i686
libXtst.i686
libaio.i686
libaio-devel.i686
Install package cvuqdisk*
cd /home/oracle/software/grid/rpm
# CVUQDISK_GRP=dba; export CVUQDISK_GRP
#rpm -Uvh cvuqdisk*
Install package oracleasm-support-2.1.8-1.el6.x86_64.rpm and oracleasmlib-2.0.4-1.el6.x86_64.rpm for asm
# rpm -i oracleasm-support-2.1.8-1.el6.x86_64.rpm
warning: oracleasm-support-2.1.8-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
# rpm -i oracleasmlib-2.0.4-1.el6.x86_64.rpm
warning: oracleasmlib-2.0.4-1.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Check oracleasm successfully installed :
# which oracleasm
/usr/sbin/oracleasm

In order to allow oracle user to connect from one node to another without using password, we need to exchange keys between servers
[oracle@svr-lcmsdb-01 ]$cd /home/oracle/.ssh/
[oracle@svr-lcmsdb-01 .ssh]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
56:21:06:60:bb:3c:fa:32:82:ef:a3:63:ae:26:4c:ec oracle@svr-lcmsdb-01.mydomain.ci
The key’s randomart image is:
+–[ DSA 1024]—-+
| o…o . |
| . . . . . |
| . . |
| . . . |
|. + S |
| o . . . |
|= . |
|=E+. |
|OBo+. |
+—————–+
The public key should be added in the file called authorized_keys in the second node. The file should be created if not existing. Here the file doesn’t exist on second node. So we create it as below:
[oracle@svr-lcmsdb-01 .ssh]$ scp id_dsa.pub oracle@192.168.136:/home/oracle/.ssh/authorized_keys
Do the same on node 2: generate the public key and copy it in the file called authorized_keys on node 1:
[oracle@svr-lcmsdb-02 .ssh]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
7d:d4:69:ab:f0:f7:82:86:0c:92:df:9c:65:cc:a6:73 oracle@svr-lcmsdb-02.mydomain.ci
The key’s randomart image is:
+–[ DSA 1024]—-+
| |
| . . |
| . + |
| . . . . |
| .S oo. . |
| o . +*. |
| o = Bo.. |
| . O E… |
| + ..|
+—————–+
[oracle@svr-lcmsdb-02 .ssh]$ ls
id_dsa id_dsa.pub
$scp id_dsa.pub oracle@192.168.0.135:/home/oracle/.ssh/authorized_keys
9.Configuring ASM driver servers
Configure ASM driver like below:
[root@svr-lcmsdb-01]# /usr/sbin/oracleasm configure -i
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 []: oracle
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@svr-lcmsdb-01 mapper]#
# vi /etc/sysconfig/oracleasm
# ORACLEASM_SCANORDER: Matching patterns to order disk scanning
ORACLEASM_SCANORDER=”dm“
……
# ORACLEASM_SCANEXCLUDE: Matching patterns to exclude disks from scan ORACLEASM_SCANEXCLUDE=”sda“
# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
10.Configuring disks for ASM
Check disks provided to be configured. Here disks are in /dev :
[root@svr-lcmsdb-02 oracle]# ls -ltrh /dev/dm*
brw-rw—- 1 root disk 253, 0 Nov 19 01:44 /dev/dm-0
brw-rw—- 1 root disk 253, 2 Nov 19 01:44 /dev/dm-2
……
brw-rw—- 1 root disk 253, 20 Nov 19 01:44 /dev/dm-20
brw-rw—- 1 root disk 253, 19 Nov 19 01:44 /dev/dm-19
[root@svr-lcmsdb-02 oracle]#
Use oracleasm to configure disks :
# /usr/sbin/oracleasm createdisk DATA1 /dev/dm-3
Writing disk header: done
Instantiating disk: done
# /usr/sbin/oracleasm createdisk DATA2 /dev/dm-4
Writing disk header: done
Instantiating disk: done
…… # /usr/sbin/oracleasm createdisk DATA15 /dev/dm-17
Writing disk header: done
Instantiating disk: done
# /usr/sbin/oracleasm createdisk DATA16 /dev/dm-18
Writing disk header: done
Instantiating disk: done
List all disks configured:
# /usr/sbin/oracleasm listdisks
DATA1
DATA10
DATA11
DATA12
DATA13
DATA14
DATA15
DATA16
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
DATA9
#
NB : On the other node, perform a scandisk to update disks table:
# oracleasm scandisks
11.Installing Grid Infrastructure
Unzip grid software by extracting files p17694377_121020_Linux-x86-64_3of8.zip and p17694377_121020_Linux-x86-64_4of8.zip
[oracle@svr-lcmsdb-01 software]$ unzip p17694377_121020_Linux-x86-64_3of8.zip
[oracle@svr-lcmsdb-01 software]$ unzip p17694377_121020_Linux-x86-64_4of8.zip
[oracle@svr-lcmsdb-01 software]$cd grid
[oracle@svr-lcmsdb-01 grid]$ ls
install readme.html response rpm runcluvfy.sh runInstaller sshsetup stage welcome.html
[oracle@svr-lcmsdb-01 grid]$ id -a
uid=502(oracle) gid=503(dba) groups=503(dba),502(asmadmin)
[oracle@svr-lcmsdb-01 grid]$ export DISPLAY=192.xx.xx.xx:0.0
[oracle@svr-lcmsdb-01 grid]$./runInstaller
Starting Oracle Universal Installer…
Checking Temp space: must be greater than 415 MB. Actual 18504 MB Passed
Checking swap space: must be greater than 150 MB. Actual 63999 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-11-27_11-35-14AM. Please wait …















Here we create a diskgroup called “DATA”. Be careful to choose the correct redundancy mode. We chose “External” to be sure to use all disks size for the db without mirroring in ASM. We’ll rely on the storage mirroring
To list all disks configured with oracleasm, specify “/dev/oracleasm/disks/*” in the discovery path.
We keep also default “Allocation Unit Size” to 1MB, appropriate for transactional databases








NB: You should allow remote connexion with root user between nodes during the installation.
Click Next to continue


Correct the errors and click Next to continue



[oracle@svr-lcmsdb-01 12.1]$ ps -ef|grep pmon
oracle 8440 7912 0 22:40 pts/1 00:00:00 grep pmon
oracle 20211 1 0 21:50 ? 00:00:00 mdb_pmon_-MGMTDB
oracle 27035 1 0 20:31 ? 00:00:00 asm_pmon_+ASM1
[oracle@svr-lcmsdb-01 12.1]$
We can continue with oracle software and database installation.
12.Installing Oracle Database Software
Unzip database software by extracting files p17694377_121020_Linux-x86-64_1of8.zip and p17694377_121020_Linux-x86-64_2of8.zip and run the runInstaller





















Complete the configuration of ASM diskgroups by running asmca in $GRID_HOME/bin directory. Via the interface, you can create or alter diskgroups by adding/removing disks


After Grid infra and ASM diskgroups configuration, we can proceed now with the database installation.
Run dbca at the command line to launch database installation tool








$ srvctl config database -d lcmsdb
Database unique name: LCMSDB
Database name: LCMSDB
Oracle home: /u01/app/oracle/product/12.1.0/dbhome_1
Oracle user: oracle
Spfile: +DATA01/LCMSDB/PARAMETERFILE/spfile.288.896968523
Password file: +DATA01/LCMSDB/PASSWORD/pwdlcmsdb.276.896968239
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: FRA,DATA01
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: asmadmin
OSOPER group: asmadmin
Database instances: LCMSDB1,LCMSDB2
Configured nodes: svr-lcmsdb-01,svr-lcmsdb-02
Database is administrator managed
$
This completes the Grid Infrastructure and RAC database installation!