Oracle Database 12c Release 1 (12.1) RAC On RedHat Linux 5
Pre-requisites :
Before you install the Grid,Clusterware and the Database, you must complete several pre-installation tasks.
1) 2 Public IP’s – Needs a NIC card on the server
2) 2 Virtual IP’s – Binded with Public IP
3) 2 Private IP’s — Needs a NIC card on the server
4) SCAN IP – Does not need a NIC card however needs to resolved by DNS i.e it should have a fully qualified domain name in the hosts file as well as the DOMAIN.
5) Min 4 GB RAM on each server
6) RPM’s and kernel Parameters
7) Lun’s created on the storage and mounted on the server which will be seen as a raw device on the server
For e.g : /dev/sdb, /dev/sdc etc
8) Software for Oracle 12c Grid and Database (64 bit)
9) Access to root to create users and run post installation steps
10) 20 GB free on local hard disk for grid and database software installation
11) 20 GB LUN minimum for creating CRS Diskgroup.
Starting the Configuration and Installation :
1) IP’s required for configuration
127.0.0.1 localhost.localdomain localhost
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
####Public IP##########
192.168.1.178 prcrpodb01.ods.local prcrpodb01
192.168.1.189 prcrpodb02.ods.local prcrpodb02
#####Virtual IP#######
192.168.1.190 prcrpodb01-vip.ods.local prcrpodb01-vip
192.168.1.191 prcrpodb02-vip.ods.local prcrpodb02-vip
####Private IP#######
10.10.10.14 prcrpodb01-priv.ods.local prcrpodb01-priv
10.10.10.15 prcrpodb02-priv.ods.local prcrpodb02-priv
####SCAN###
#192.168.1.192 prcrpodbscan.ods.local
#192.168.1.193 prcrpodbscan.ods.local
#192.168.1.194 prcrpodbscan.ods.local
###########
2)Use ”free –m” to check the size of memory in Linux.
3) Using ASM Library to prepare disks
2.6.18-348.el5
Note : Download the rpm as per your kernel version
warning: oracleasm-2.6.18-348.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID
e5e0159
Preparing... ########################################### [100%]
1:oracleasm-support ########################################### [ 33%]
2:oracleasm-2.6.18-348.el########################################### [ 67%]
3:oracleasmlib ########################################### [100%]
[root@erpuatdbs02 rpm]#
[root@erpuatdbs01 ~]# rpm -qa oracleas*
oracleasmlib-2.0.4-1.el5 -- COMMON for all 64 bit OS
oracleasm-2.6.18-348.el5-2.0.5-1.el5 -- As per Kernel Ver
oracleasm-support-2.1.3-1.el5 -- COMMON for all 64 bit OS
4)Download and apply additional RPM’s
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
Create users and groups on all cluster nodes
groupadd dba
useradd -g dba -G oinstall oragrid
useradd -g dba -G oinstall oracle
Login as oragrid user and set the environment in .bash_profile on all cluster nodes.
on Node 1 – PRCRPODB01
export ORACLE_SID=+ASM1
export GRID_HOME=/u01/app/12.1.0.2/grid
export ORACLE_HOME=$GRID_HOME
export PATH=$ORACLE_HOME/bin:$HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if [ $USER = "oragrid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
on Node 2 – PRCRPODB02
export ORACLE_SID=+ASM1
export GRID_HOME=/u01/app/12.1.0.2/grid
export ORACLE_HOME=$GRID_HOME
export PATH=$ORACLE_HOME/bin:$HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if [ $USER = "oragrid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Add or amend the following lines to the “/etc/sysctl.conf” file on all nodes.
kernel.shmall = 4294967296
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
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
Add the following lines to the “/etc/security/limits.conf” file on all nodes.
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oragrid soft nofile 1024
oragrid hard nofile 65536
oragrid soft nproc 2047
oragrid hard nproc 16384
oragrid soft stack 10240
oragrid hard stack 32768
Make sure the “/etc/resolv.conf” file includes a nameserver entry that points to the correct nameserver. Also, if the “domain” and “search” entries are both present, comment out one of them.
search ods.local
nameserver 192.168.1.40
nameserver 192.168.1.41
Check if scan name resolves all the 3 IP’s in DNS.
Server: 192.168.1.40
Address: 192.168.1.40#53
Name: prcrpodbscan.ods.local
Address: 192.168.1.194
Name: prcrpodbscan.ods.local
Address: 192.168.1.193
Name: prcrpodbscan.ods.local
Address: 192.168.1.192
Turn Off NTP service(Network Time Protocol)
ntpd is stopped
Prepare the storage
We have two LUNS assigned with 50 and 20 GB.
20 GB – OCR/Voting Files
We have multipath enabled for the LUNS assigned to the servers. Use multipath -ll to check the devices
Create disks using ASM library
Execute below commands on node 1.
#oracleasm initialize
#oracleasm create disk
#oracleasm scandisk
#oracleasm listdisk
Execute scandisks command on node2 to instantiate the disks created on node 1.
Starting the installation
Download the software from
http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_grid_1of2.zip
http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_grid_2of2.zip
Check the status of the cluster
Install 12c Database Software
Download 12c database software from
http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_1of2.zip
http://download.oracle.com/otn/linux/oracle12c/121020/linuxamd64_12102_database_2of2.zip
Login as oragrid user and set the environment in .bash_profile on all cluster nodes.
on Node 1 – PRCRPODB01
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=prcrpodb01.qia.local
export ORACLE_UNQNAME=CDBRAC
export ORACLE_BASE=/u01/app/oracle
export DB_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_HOME=$DB_HOME
export ORACLE_SID=cdbrac1
export ORACLE_TERM=xterm
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
On Node 2 – PRCRPODB02
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=prcrpodb02.qia.local
export ORACLE_UNQNAME=CDBRAC
export ORACLE_BASE=/u01/app/oracle
export DB_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_HOME=$DB_HOME
export ORACLE_SID=cdbrac2
export ORACLE_TERM=xterm
export BASE_PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$BASE_PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Create ASM Disk “DATA” before creating a database using asmca.
Create pluggable database using dbca.
Check the status of the database
Instance cdbrac1 is running on node prcrpodb01
Instance cdbrac2 is running on node prcrpodb02
The V$ACTIVE_INSTANCES view can also display the current status of the instances.
SQL> SELECT inst_name FROM v$active_instances;
INST_NAME
--------------------------------------------------------------------------------
prcrpodb01.ods.local:cdbrac1
prcrpodb02.ods.local:cdbrac2