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

[root@erpuatdbs01 ~]# cat /etc/hosts
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

#uname –r
2.6.18-348.el5

Note : Download the rpm as per your kernel version

[root@erpuatdbs02 rpm]# rpm -Uvh oracleasm*.rpm
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 binutils -y
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 oinstall
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_HOSTNAME=prcrpodb01.ods.local
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_HOSTNAME=prcrpodb02.ods.local
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.shmmax = 68719476736
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 soft nofile 1024
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.

[oragrid@prcrpodb01 ~]$ cat /etc/resolv.conf
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.

[oragrid@prcrpodb01 ~]$ nslookup prcrpodbscan
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)

[oragrid@prcrpodb01 ~]$ /etc/init.d/ntpd status
ntpd is stopped
Prepare the storage

We have two LUNS assigned with 50 and 20 GB.

20 GB – OCR/Voting Files

50 GB – DATA/RA
Disk_Part_requirement

We have multipath enabled for the LUNS assigned to the servers. Use multipath -ll to check the devices

multipath

Create disks using ASM library
Execute below commands on node 1.

#oracleasm configure -I
#oracleasm initialize
#oracleasm create disk
#oracleasm scandisk
#oracleasm listdisk

createdisk1

createdisk2

Execute scandisks command on node2 to instantiate the disks created on node 1.

createdisk3

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

Start the runInstaller
gridinstall1

gridinstall2

grid3

grid4

grid5

grid6

grid7

grid8

grid9

grid10

grid11

grid12

grid13

grid14

grid15

grid16

grid17

grid18

grid19

grid20

grid21

grid22

grid23

grid24

grid25

grid26

grid27

grid28

Check the status of the cluster
grid_status

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

# Oracle Settings
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

# Oracle Settings
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

Start the installation
racdbinstall1
racdbinstall2

racdbinstall3

racdbinstall4

racdbinstall5

racdbinstall6
racdbinstall7

racdbinstall8

racdbinstall9

racdbinstall10

racdbinstall11
racdbinstall12

racdbinstall13

Create ASM Disk “DATA” before creating a database using asmca.
asmca1

asmca2

asmca3

asmca4

asmca5

Create pluggable database using dbca.
dbca1

dbca2

dbca3

dbca4

dbca5

Check the status of the database

$ srvctl status database -d cdbrac
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.

$ sqlplus / as sysdba
SQL> SELECT inst_name FROM v$active_instances;
INST_NAME
--------------------------------------------------------------------------------
prcrpodb01.ods.local:cdbrac1
prcrpodb02.ods.local:cdbrac2
Tagged with →  
Share →
0 comments
Skip to toolbar