STEP:1 (ON BOTH NODES)
Note:
If using FRA with normal redundancy create 2 partition in fra disk use 20gb for fra out of 25gb (i.e 25gb + 25gb partition).
If using FRA with external redundancy create one parition in fra disk and use size of 40 gb out of 52 gb.
yum install compat-libstdc++- compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel binutils elfutils-libelf-devel pdksh
(OR)
rpm -qa | grep binutils
rpm -qa | grep compat-libstdc++-
ls compat-libstdc++-*
yum install compat-libstdc++-
yum install compat-libstdc++-33-3.2.3
yum install elfutils-libelf-0.125
yum install elfutils-libelf
yum install elfutils-libelf-devel
yum install gcc
yum install glibc
yum install glibc-common
yum install glibc-devel
yum install glibc-headers
yum install ksh
yum install libaio
yum install libaio-devel
yum install libgcc
yum install libstdc++
yum install libstdc++-devel
yum install make
yum install sysstat
yum install unixODBC
yum install unixODBC-devel
yum install binutils
yum install compat-libstdc++
yum install pdksh
STEP:2 (ON BOTH NODES) >>>>>>>>create users,groups and directories on all nodes >>>>>>
groupdel asmdba
groupdel asmadmin
groupdel asmoper
groupdel dba
groupdel oper
groupdel oinstall
groupadd -g 501 oinstall
groupadd -g 502 asmdba
groupadd -g 503 asmadmin
groupadd -g 504 asmoper
groupadd -g 505 dba
groupadd -g 506 oper
or if group number exists then use 601 series
groupadd -g 601 oinstall
groupadd -g 602 asmdba
groupadd -g 603 asmadmin
groupadd -g 604 asmoper
groupadd -g 605 dba
groupadd -g 606 oper
useradd -g oinstall -G asmadmin,asmdba,asmoper grid
useradd -g oinstall -G asmdba,dba,oper oracle
passwd grid
passwd oracle
mkdir /Software/
mkdir -p /u01/app/grid/
chown -R grid:oinstall /u01/app/grid/
chmod -R 775 /u01/app/grid/
mkdir -p /u01/app/oracle/
chown -R oracle:oinstall /u01/app/oracle/
chmod -R 775 /u01/app/oracle/
mkdir -p /u01/app/11.2.0/grid
chown -R grid:oinstall /u01/app/11.2.0/grid
chmod -R 775 /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/dbhome_1
chmod -R 775 /u01/app/oracle/product/11.2.0/dbhome_1
mkdir -p /u01/app/oraInventory/
chown -R grid:oinstall /u01/app/oraInventory/
chmod -R 775 /u01/app/oraInventory/
STEP:3 (ON BOTH NODES)or SCP
Edit the bash profile’s for grid and oracle user >>>>> (as grid user)
vi .bash_profile
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_SID=+ASM1
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_SID=+ASM2
export PATH=$PATH:$ORACLE_HOME/bin
Edit the bash profile as a ORACLE user >>>>>>>
vi .bash_profile
export GRID_HOME=/u01/app/11.2.0/grid
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=test1
export PATH=$PATH:$ORACLE_HOME/bin:$GRID_HOME/bin
export GRID_HOME=/u01/app/11.2.0/grid
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=test2
export PATH=$PATH:$ORACLE_HOME/bin:$GRID_HOME/bin
STEP:5(ON BOTH NODES)
vi /etc/hosts ——— replace values respect to Environment
Public
192.168.210.1 TEST1
192.168.210.2 TEST2
Private
10.10.0.74 TEST1-priv
10.10.0.73 TEST2-priv
Virtual
192.168.210.3 TEST1-vip
1192.168.210.4 TEST2-vip
SCAN
192.168.210.5 test-scan
vi /etc/security/limits.conf ———– copy the below values
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 3500000
oracle hard memlock 3500000
grid soft nofile 131072
grid hard nofile 131072
grid soft nproc 131072
grid hard nproc 131072
grid soft core unlimited
grid hard core unlimited
grid soft memlock 3500000
grid hard memlock 3500000
—————————FOR 12C LIMITS————-
Add the following lines to the “/etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf” file.
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 12C & 11G ALSO————-
Add or amend the following lines to the “/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
vi /etc/sysconfig/network ——check the hostname
vi /etc/sysctl.conf ——- copy thhe below values
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack = 0
net.ipv4.tcp_low_latency = 1
net.core.netdev_max_backlog = 250000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.core.optmem_max = 16777216
net.ipv4.tcp_mem = 16777216 16777216 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
/sbin/sysctl -p
STEPS TO BE DONE AT SPECIFIC NODES ONLY
node 1 >>>>
AS ROOT user,
copy the 3 ZIP FILES in the Directory /Software/
copy the 4 dependecies of Oracleasm—– rpm files in the Directory /Software/
UNZIP the 3 zip files
install Oracleasm– packages as
rpm -ivh oracleasm*
install cvu— rpm as
cd /Software/grid/rpm
rpm -ivh cvu——
cd /Software/
chown -R grid:oinstall grid
chmod -R 775 grid
chown -R oracle:oinstall database
chmod -R 775 database
——– AT NODE 2
AS ROOT user,
copy the 4 dependecies of Oracleasm—– rpm files in the Directory /Software/
install Oracleasm– packages as
rpm -ivh oracleasm*
Formating disk Partitions node 1 only >>>>>>>>>
Note : Check on both nodes parition is reflecting or not and also it is empty/free or not.
fdisk -l
fdisk /dev/sdb
commond(m or help):n
p
1
+1780M
n
p
2
+1780M
n
p
3
just enter take rest of all memory
p
w
fdisk /dev/sdc
commond(m or help):n
p
1
+26G
n
2
just enter take rest of all memory
p
w
fdisk /dev/sdd
n
p
1
+26G
n
p
2
just enter take rest of all memory
partprobe
Load updated block device partition tables.
/sbin/partprobe /dev/sdb1
/sbin/partprobe /dev/sdc1
/sbin/partprobe /dev/sdd1
fdisk -l
Node2:
partprobe
Load updated block device partition tables.
/sbin/partprobe /dev/sdb1
/sbin/partprobe /dev/sdc1
/sbin/partprobe /dev/sdd1
/sbin/partprobe /dev/sde1
fdisk -l
The disks should now be visible and have the correct ownership using the following command. If they are not visible, your UDEV configuration is incorrect and must be fixed before you proceed.
ls -al /dev/asm*
brw-rw—- 1 oracle dba 8, 17 Oct 12 14:39 /dev/asm-disk1
brw-rw—- 1 oracle dba 8, 33 Oct 12 14:38 /dev/asm-disk2
brw-rw—- 1 oracle dba 8, 49 Oct 12 14:39 /dev/asm-disk3
brw-rw—- 1 oracle dba 8, 65 Oct 12 14:39 /dev/asm-disk4
Amend the hostname in the “/etc/sysconfig/network” file.
NETWORKING=yes
HOSTNAME=ol6-121-rac2.localdomain
Check the MAC address of each of the available network connections. Don’t worry that they are listed as “eth3” to “eth5”. These are dynamically created connections because the MAC address of the “eth0” to “eth2” connections are incorrect.
ifconfig -a | grep eth
eth3 Link encap:Ethernet HWaddr 08:00:27:43:41:74
eth4 Link encap:Ethernet HWaddr 08:00:27:4B:4F:0F
eth5 Link encap:Ethernet HWaddr 08:00:27:E8:70:17
#
Restart the virtual machines.
shutdown -r now
AT NODE 1 >>>>>>>>>>>>>>>>>>>>>>
— AS ROOT USER
/usr/sbin/oracleasm configure -i
grid
asmadmin
/usr/sbin/oracleasm init
/usr/sbin/oracleasm createdisk GI_D1 /dev/sdb1
/usr/sbin/oracleasm createdisk GI_D2 /dev/sdb2
/usr/sbin/oracleasm createdisk GI_D3 /dev/sdb3
/usr/sbin/oracleasm createdisk DB_D1 /dev/sdc1
/usr/sbin/oracleasm createdisk DB_D2 /dev/sdc2
/usr/sbin/oracleasm createdisk FRA_D1 /dev/sdd1
/usr/sbin/oracleasm createdisk FRA_D2 /dev/sdd2
AT node 2 >>>
—— AS ROOT USER
/usr/sbin/oracleasm configure -i
grid
asmadmin
/usr/sbin/oracleasm init
oracleasm scandisks
oracleasm listdisks
———for deleting disk——————oracleasm deletedisk DB_D1 —————————
dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100
Remove and create the ASM disk for each partition.
/etc/init.d/oracleasm deletedisk /dev/sdb1
ifup eth1 —to make network interface up.
ifdown eth1 —to make network interface down.
For etho: (on node 1)
Note :The subnet mask of Private and Public IP shoud be different on both nodes default gateway should same…
ex: subnet mask for etho —255.255.254.0
subnet mask for eth1 —255.255.255.0
eth0 (node1) default gateway should have ip address like 10.10.8.1 and eth0 (node2) default gateway should have ip address like 10.10.8.1
For eth1: (on both nodes) on node2
Note :The subnet mask of Private and Public IP shoud be different on both nodes default gateway should same…
ex: subnet mask for etho —255.255.254.0
subnet mask for eth1 —255.255.255.0
eth1 on (node1) and (node2 default gateway should have blank ip address
AT NODE 1 >>>>>>>>>>>>
su – root
xhost +
su – grid
cd /Software/grid/
$ ./runInstaller
Just follow instructions on OUI GRID INSTALL,
The grid infrastructure installation is now complete. We can check the status of the installation using the following commands.
$ grid_env
$ crsctl stat res -t
Configure the ASM Diskgroups >>>> as a Grid User
$ ASMCA
Create the Disk groups by selecting proper disks
For DB & FRA Diskgroups. Normally 2 disks for each Diskgroup as per EXTERNAL Redundancy.
For CRS and Voting Disk EXTERNAL REDUNDANCY.
xhost +
su – oracle
cd /Software/database/
$ ./runInstaller
Follow the instructions on OUI ORACLE INSTALL
Create the database >>>>>>>>>
$ DBCA
First option
next
first optoin
next
next
Globale databsae name:
sid prefix:
next
next
set the password for all the users
yes
next
next
password for ASM:oracle
Fast Recovery Area : +FRA_DG
Fast Recovery Area size:9500MB (it should be 20 GB)….4000MB
next
Next
Create a database
next
Save as an HTML file
Ok
Finish
exit
END OF INSTALLATION
The RAC database creation is now complete.
Check the Status of the RAC
There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.
$ srvctl config database -d cdbrac
Database unique name: cdbrac
Database name: cdbrac
Oracle home: /u01/app/oracle/product/12.1.0.2/db_1
Oracle user: oracle
Spfile: +DATA/CDBRAC/PARAMETERFILE/spfile.296.860703391
Password file: +DATA/CDBRAC/PASSWORD/pwdcdbrac.276.860702185
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools:
Disk Groups: DATA
Mount point paths:
Services:
Type: RAC
Start concurrency:
Stop concurrency:
OSDBA group: dba
OSOPER group:
Database instances: cdbrac1,cdbrac2
Configured nodes: ol6-121-rac1,ol6-121-rac2
Database is administrator managed
$
$ srvctl status database -d cdbrac
Instance cdbrac1 is running on node ol6-121-rac1
Instance cdbrac2 is running on node ol6-121-rac2
$
The V$ACTIVE_INSTANCES view can also display the current status of the instances.
$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Sat Oct 11 20:27:34 2014
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options
SQL> SELECT inst_name FROM v$active_instances;
INST_NAME
ol6-121-rac1.localdomain:cdbrac1
ol6-121-rac2.localdomain:cdbrac2
SQL>
SOME HEALTH CHECK STEPS AFTER INSTALLATION <<<<<<<<<<
su – grid
—- to check the instance status
ps -ef|grep smon
——— crsctl check crs
——— srvctl status asm -n hostname-node-1
——— srvctl status asm -n hostname-node-2
—– to check the space of disk groups
su – grid
$ asmcmd
ASMCMD> lsdg
ASMCMD> cd DG_DATA/
ASMCMD> ls
DYAXUAT1/
ASMCMD> cd DYAXUAT1/
ASMCMD> ls
CONTROLFILE/
DATAFILE/
ONLINELOG/
PARAMETERFILE/
TEMPFILE/
control01.ctl
control02.ctl
redo01.log
redo02.log
redo03.log
redo04.log
spfiledyaxuat1.ora
sysaux01.dbf
system01.dbf
temp01.dbf
undotbs01.dbf
undotbs02.dbf
users01.dbf
ASMCMD> lsct
To check file system space >>>
df -kh
su – oracle
srvctl status database -d db-name
srvctl config database -d db-name
To connect db >
sqlplus sys/oracle as sysdba
select open_mode,name from gv$database;
select instance _name,status from gv$instance;
To check tablespace space >>
select FILE_NAME,TABLESPACE_NAME,BYTES/1024/1024,AUTOEXTENSIBLE from dba_data_files;