Professional Documents
Culture Documents
1. Software Requirement
• Oracle Virtualbox
• Oracle Linux 7
• Oracle 12c Release 2 Software 64 bit
• Click on Create
SUDIPTA BHASKAR 1
2
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Click on Apply
• Restart Laptop to make it take effect.
SUDIPTA BHASKAR 2
3
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Create Next and Create a Virtual Hard Drive with Dynamically Allocated
SUDIPTA BHASKAR 3
4
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 4
5
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 5
6
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 6
7
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 7
8
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Follow the following Steps as depicted.
SUDIPTA BHASKAR 8
9
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 9
10
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 10
11
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 11
12
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Start the Machine by Pressing the Green Arrow. Following Screen will appear. Follow
the following steps.
SUDIPTA BHASKAR 12
13
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 13
14
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 14
15
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 15
16
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 16
17
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 17
18
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 18
19
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 19
20
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 20
21
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 21
22
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
4. Clone and Create 2nd Node
SUDIPTA BHASKAR 22
23
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 23
24
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 24
25
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 25
26
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
cd /etc/sysconfig/network-scripts/
vi ifcfg-enp0s8
Change the ip under IPADDR
SUDIPTA BHASKAR 26
27
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 27
28
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 28
29
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 29
30
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 30
31
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
# Public
192.168.126.10 node1.localdomain node1
192.168.126.20 node2.localdomain node2
# Private
192.168.100.10 node1-priv.localdomain node1-priv
192.168.100.20 node2-priv.localdomain node2-priv
# Virtual
192.168.126.30 node1-vip.localdomain node1-vip
192.168.126.40 node2-vip.localdomain node2-vip
# SCAN
#192.168.126.50 scan.localdomain scan
#192.168.126.60 scan.localdomain scan
#192.168.126.70 scan.localdomain scan
SUDIPTA BHASKAR 31
32
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
❖ Create file /var/named/localdomain.zone with the following details
$TTL 86400
@ IN SOA localdomain root.localdomain (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS localhost
localhost IN A 127.0.0.1
node1 IN A 192.168.126.10
node2 IN A 192.168.126.20
node1-priv IN A 192.168.100.10
node2-priv IN A 192.168.100.20
node1-vip IN A 192.168.126.30
node2-vip IN A 192.168.126.40
scan IN A 192.168.126.50
scan IN A 192.168.126.60
scan IN A 192.168.126.70
$ORIGIN 126.168.192.in-addr.arpa.
$TTL 1H
@ IN SOA DNServer.localdomain. root.DNServer.localdomain. ( 2
3H
1H
1W
1H )
126.168.192.in-addr.arpa. IN NS DNServer.localdomain.
10 IN PTR node1.localdomain.
20 IN PTR node2.localdomain.
30 IN PTR node1-vip.localdomain.
40 IN PTR node2-vip.localdomain.
50 IN PTR scan.localdomain.
60 IN PTR scan.localdomain.
70 IN PTR scan.localdomain.
SUDIPTA BHASKAR 32
33
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
listen-on port 53 { 127.0.0.1; 192.168.126.102; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { localhost; 192.168.126.0/24;};
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
SUDIPTA BHASKAR 33
34
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain." IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "126.168.192.in-addr.arpa." IN {
type master;
file "126.168.192.in-addr.arpa";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
nameserver 192.168.0.102
❖ Remember to stop the firewall and disable it else the nodes will not be able to access it.
SUDIPTA BHASKAR 34
35
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Changes to be done in RAC Nodes to use the DNS service
❖ In this example we have taken NAT as the first network. So the /etc/resolv.conf file will look like
following.
# Generated by NetworkManager
search localdomain
nameserver 202.83.21.12
nameserver 202.83.21.25
nameserver 192.168.126.102
After saving the file do the following to disable any edit on the file after reboot.
chattr +i /etc/resolv.conf
SUDIPTA BHASKAR 35
36
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Configure ASM
We will add disks one by one followed by installing rpms and configuring ASM.
SUDIPTA BHASKAR 36
37
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 37
38
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
4. Click on Create.
Click on Next.
SUDIPTA BHASKAR 38
39
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
6. Give it the name DATA.vdi or any name of your choice. This disk will be used for DATA
diskgroup.
SUDIPTA BHASKAR 39
40
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
8. Make the disk shareable. Click on Type Dropdown, select shareable and click on apply.
9. Same way create another disk with the name ARCH of size 12G.
SUDIPTA BHASKAR 40
41
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 41
42
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 42
43
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 43
44
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 44
45
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 45
46
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 46
47
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
In the same way add the disks to the second node also.
SUDIPTA BHASKAR 47
48
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
yum update -y
yum install oracle-database-server-12cR2-preinstall
yum install oracleasmlib-2.0.12-1.el7.x86_64.rpm
yum install oracleasm-support-2.1.11-2.el7.x86_64
yum install kmod-oracleasm-2.0.8-27.0.1.el7.x86_64
14. Now we need to partition the added disks. This needs to be done only in one node.
SUDIPTA BHASKAR 48
49
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
We can see that sdb, sdc, sdd disks don’t have partitions. We need to create partitions now.
SUDIPTA BHASKAR 49
50
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 50
51
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
From root user we need to configure asm
SUDIPTA BHASKAR 51
52
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Download and Install Grid
• Download linuxx64_12201_database.zip and linuxx64_12201_grid_home.zip files.
• Transfer database and grid binary. Grid binary is needed only on first node.
• We need to run the following from the first node to do the prechecks before
installing grid software.
Check the results, if there are any problems we need to fix those before
installation.
SUDIPTA BHASKAR 52
53
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 53
54
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Unzip the grid binary. Grid binary needs to be unzipped where we want the grid home to be.
cd /oracle/app/oracle/12.2/grid/
unzip linuxx64_12201_grid_home.zip
./gridSetup.sh
SUDIPTA BHASKAR 54
55
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 55
56
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 56
57
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 57
58
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Click on Setup
• Click on Test
Click on Next
SUDIPTA BHASKAR 58
59
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 59
60
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 60
61
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Click on Change Discovery Path
SUDIPTA BHASKAR 61
62
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 62
63
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 63
64
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 64
65
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 65
66
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 66
67
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 67
68
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 68
69
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
It will prompt to run the scripts from root user. Run it in both the nodes one by one.
After running the script from both the nodes click on OK.
SUDIPTA BHASKAR 69
70
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
In Last step “Cluster Verification Utility Failed” Message will come. We need to skip it.
Now the installer is complete, Close the installer. Grid Installation is complete.
SUDIPTA BHASKAR 70
71
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Install Oracle Database Software
SUDIPTA BHASKAR 71
72
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
• Follow the next installation steps one by one.
SUDIPTA BHASKAR 72
73
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 73
74
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 74
75
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 75
76
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 76
77
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 77
78
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Run the mentioned script in both the nodes using root user and Click on OK.
SUDIPTA BHASKAR 78
79
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Create ASM diskgroup using asmca utility. Use Mobaxterm for this.
Click on Diskgroups
SUDIPTA BHASKAR 79
80
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
Click on Create.
SUDIPTA BHASKAR 80
81
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 81
82
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 82
83
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 83
84
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 84
85
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 85
86
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 86
87
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 87
88
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 88
89
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 89
90
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 90
91
Oracle Database 12c Release 2 (12.2) RAC On
OOoracledfas
Oracle Li Linux 7 Using VirtualBox
SUDIPTA BHASKAR 91