Upload
nguyenphuc
View
227
Download
1
Embed Size (px)
Citation preview
Download the required software's
Oracle Linux 6.4 (64 bit) - https://edelivery.oracle.com/linux
Oracle VirtualBox (v4.2.16) - https://www.virtualbox.org/wiki/Downloads Oracle 12c Release 1 (12.1.0.1) Software (64 bit) -
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Hardware Requirements:-
Absolute minimum of 3 GB memory on each Virtual Machine but 4GB is
recommended
Dual core with adequate CPU speed (2.5GHZ)
Disk Space of 30-50 GB on your windows partition(Laptop/Desktop)
Installation Phases
1. Install Oracle Virtual Box
2. Create Virtual Machine – kamesh4tad-rac1
3. Preparing the Guest OS Linux for Oracle Installation
4. Create ASM Shared Disks for Grid Infrastructure
5. Clone the Virtual Machine for second node – kamesh4tad-rac2
6. Modify the Virtual Machine – kamesh4tad-rac2
7. Install 12c Grid Infrastructure
8. Install Oracle 12c RAC DB software
9. Create Database using DBCA
10. Verify Oracle 12c RAC status
1. Install Virtual Box
Click "Next"
Select the location and click Next
Click Install and this may take few minutes depends on your Laptop/Desktop configuration
Click Finish
2. Create Virtual Machine – kamesh4tad-rac1
Click New or ctrl+N
Click Next
Absolute minimum 3GB(for demo purpose) but 4GB is recommended
Click Create
Create Virtual Disk section, Select Create Virtual Hard Drive and click on Create and then Select VDI (VirtualBox Disk Image) and click on next
Select Dynamically Allocated option, then proceed
Choose the path for the Location of the Drives and for the size of the Disk and give minimum of 30 - 50 GB for each virtual machine and then Click on Create
Our first Virtual Machine is ready, before proceed we need add additional Ethernet drives and Boot options for our Machine
Click on Settings and Add network devices for Cluster interconnect, Public Network and SCAN. For Adapter 1, Choose the following settings
Click on Tab Adapter 2: and Choose following Options
Click on Tab Adapter 3 and Choose following options
Ensure all adapters has Enabled Checkbox selected
Now click on the "System" section and move "Hard Disk" to the top of the boot order and uncheck the "Floppy" option, then click the "OK" button.
Now we are ready to install the Oracle Linux on our first Virtual Machine kamesh4tad-rac1, Click on Start the top menu
Select Install or Upgrade an existing System
Click OK for the first time to verify the media, since I used this few times before, I chose skip
Click Next
Select English and Click Next, Select Basic storage
Choose Basic Storage Devices and click Next
Click on Yes to remove the data and click on next
Change the Hostname to kamesh4tad-rac1.localdomain and click Configure Network
For eth0: select DHCP and Connect Automatically then Apply
For eth1: IP=192.168.56.101, Subnet=255.255.255.0, Gateway=192.168.56.1, DNS=192.168.56.1, Search=localdomain and select Connect Automatically then Apply
For eth2: IP=192.168.1.101, Subnet=255.255.255.0, Gateway=blank, DNS=blank, Search=blank and select Connect Automatically then Apply
Select your region and Click Next
Give your root password
Here I am selecting Replace option because I installed Linux few times before, you can select appropriately or just Replace
Select Write changes to disk here
Select Customize now and click Next
For Base System, select Base, Compatibility libraries, Hardware monitoring utilities, Large Systems Performance, Network file system client, Performance Tools and Perl Support
For Servers, select Server Platform and System administration tools
For Desktops, select Desktop, Desktop Platform, Fonts, General Purpose Desktop, Graphical Administration Tools, Input Methods, X Window System
For Applications, select Internet Browser
For Development, select Additional Development and Development Tools and click Next to start Oracle Linux Installation
The system will reboot, once restarted perform the following Oracle Prerequisites
3. Preparing the Linux OS for Oracle Installation
To use the "oracle-rdbms-server-12cR1-preinstall" package to perform all your prerequisite setup, issue the following command.
# yum install oracle-rdbms-server-12cR1-preinstall -y
Once it's completed successfully then follow below steps.
1. Set the password for the "oracle" user.
passwd oracle
2. Update the "/etc/hosts" file as follows.
127.0.0.1 localhost.localdomain localhost
# Public
192.168.56.101 kamesh4tad-rac1.localdomain kamesh4tad-rac1
192.168.56.102 kamesh4tad-rac2.localdomain kamesh4tad-rac2
# Private
192.168.1.101 kamesh4tad-rac1-priv.localdomain kamesh4tad-rac1-priv
192.168.1.102 kamesh4tad-rac2-priv.localdomain kamesh4tad-rac2-priv
# Virtual
192.168.56.103 kamesh4tad-rac1-vip.localdomain kamesh4tad-rac1-vip
192.168.56.104 kamesh4tad-rac2-vip.localdomain kamesh4tad-rac2-vip
# SCAN
#192.168.56.105 kamesh4tad-scan.localdomain kamesh4tad-scan
#192.168.56.106 kamesh4tad-scan.localdomain kamesh4tad-scan
#192.168.56.107 kamesh4tad-scan.localdomain kamesh4tad-scan
3. Edit "/etc/resolv.conf" file and include nameserver entry if not exist already.
#domain localdomain search localdomain nameserver 192.168.56.1
4. Edit "/etc/sysconfig/network-scripts/ifcfg-eth0" file, making the following change. This will take effect after the next restart.
ONBOOT=no 5. With this in place and the DNS configured the SCAN address is being resolved to all three IP addresses.
# nslookup kamesh4tad-scan Server: 192.168.56.1 Address: 192.168.56.1#53 Name: kamesh4tad-scan.localdomain Address: 192.168.56.105 Name: kamesh4tad-scan.localdomain Address: 192.168.56.106
Name: kamesh4tad-scan.localdomain Address: 192.168.56.107 #
6. Edit "/etc/security/limits.d/90-nproc.conf"
# From * soft nproc 1024 # To this * - nproc 16384
7. Edit the "/etc/selinux/config" file and update it as follows
SELINUX=permissive
8. Do the following to disable the firewall if it's enabled
# service iptables stop # chkconfig iptables off
9. To deconfigure NTP do the following
# service ntpd stop Shutting down ntpd: [ OK ] # chkconfig ntpd off # mv /etc/ntp.conf /etc/ntp.conf.orig # rm /var/run/ntpd.pid
10. Add the "-x" option into the following line in the "/etc/sysconfig/ntpd" file, if your RAC is going to be permanently connected to your main network
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
11. Then restart NTP.
# service ntpd restart
12. Create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/12.1.0.1/grid mkdir -p /u01/app/oracle/product/12.1.0.1/db_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01/
13. Log in as the "oracle" user and add the following lines at the end of the "/home/oracle/.bash_profile" file.
# Oracle Settings export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=kamesh4tad-rac1.localdomain export ORACLE_UNQNAME=CDBRAC export ORACLE_BASE=/u01/app/oracle export GRID_HOME=/u01/app/12.1.0.1/grid
export DB_HOME=$ORACLE_BASE/product/12.1.0.1/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 alias grid_env='. /home/oracle/grid_env' alias db_env='. /home/oracle/db_env' Create a file called "/home/oracle/grid_env" with the following contents. export ORACLE_SID=+ASM1 export ORACLE_HOME=$GRID_HOME 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
14. Create a file called "/home/oracle/db_env" with the following contents.
export ORACLE_SID=cdbrac1 export ORACLE_HOME=$DB_HOME 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
15. Reboot the VM at this point to make sure all the changes have taken effect.
Install Guest Additions 1. Click on the "Devices > Install Guest Additions" menu option at the top of the VM screen and run auto-run 2. Add the "oracle" user into the "vboxsf" group so it has access to shared drives.
# usermod -G vboxsf,dba oracle # id oracle uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(vboxsf) #
3. Create a shared folder (Devices > Shared Folders) on the virtual machine, pointing to the directory on the host where the Oracle software was unzipped(C:\Share folder in my laptop). Check the "Auto-mount" and "Make Permanent" options before clicking the "OK" button.
Create the directory in windows for Node 2 and clone the hard disk. So my directory structure is like
Host: kamesh4tad-rac1 files will be in kamesh4tad-rac1 folder Host: kamesh4tad-rac2 files will be in kamesh4tad-rac2 folder Shared storage will be at kamesh4tad-rac folder
As shown in screenshot as below
Shutdown the machine kamesh4tad-rac1
4. Create ASM Shared Disks for Grid Infrastructure
1. On your laptop/Desktop, create 4 sharable virtual disks and associate them as virtual media using the following commands. You can pick a different location, but make sure they are outside the existing VM directory.
cd C:\VirtualBox\kamesh4tad-rac
2. Create the disks and associate them with VirtualBox as virtual media.
VBoxManage createhd --filename asm1.vdi --size 5120 --format VDI --variant Fixed VBoxManage createhd --filename asm2.vdi --size 5120 --format VDI --variant Fixed VBoxManage createhd --filename asm3.vdi --size 5120 --format VDI --variant Fixed VBoxManage createhd --filename asm4.vdi --size 5120 --format VDI --variant Fixed
3. Connect them to the VM.
VBoxManage storageattach kamesh4tad-rac1 --storagectl "SATA" --port 1 --device 0 --type hdd \ --medium asm1.vdi --mtype shareable VBoxManage storageattach kamesh4tad-rac1 --storagectl "SATA" --port 2 --device 0 --type hdd \ --medium asm2.vdi --mtype shareable VBoxManage storageattach kamesh4tad-rac1 --storagectl "SATA" --port 3 --device 0 --type hdd \ --medium asm3.vdi --mtype shareable VBoxManage storageattach kamesh4tad-rac1 --storagectl "SATA" --port 4 --device 0 --type hdd \ --medium asm4.vdi --mtype shareable
4. Now make them shareable.
VBoxManage modifyhd asm1.vdi --type shareable VBoxManage modifyhd asm2.vdi --type shareable VBoxManage modifyhd asm3.vdi --type shareable VBoxManage modifyhd asm4.vdi --type shareable
5. Start the "kamesh4tad-rac1" virtual machine by clicking the "Start" button on the toolbar and login as root user
# cd /dev
# ls sd*
sda sda1 sda2 sdb sdc sdd sde
#
6. Use the "fdisk" command to partition the disks sdb, sdc, sdd and sde.
The following output shows the expected fdisk output for the sdb disk.
# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x62be91cf. Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-652, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-652, default 652): Using default value 652 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. #
In each case, the sequence of answers is "n", "p", "1", "Enter", "Enter" and "w".
7. Once all the disks are partitioned, the results can be seen by repeating the previous "ls" command.
# cd /dev # ls sd* sda sda1 sda2 sdb sdb1 sdc sdc1 sdd sdd1 sde sde1 #
8. Add the following to the "/etc/scsi_id.config" file to configure SCSI devices as trusted. Create the file if it doesn't already exist.
options=-g
9. The SCSI ID of my disks are displayed below.
[root@kamesh4tad dev]# /sbin/scsi_id -g -u -d /dev/sdb 1ATA_VBOX_HARDDISK_VBbf99c520-ebe26574 [root@kamesh4tad dev]# /sbin/scsi_id -g -u -d /dev/sdc 1ATA_VBOX_HARDDISK_VB80aac8fd-eb083e92 [root@kamesh4tad dev]# /sbin/scsi_id -g -u -d /dev/sdd 1ATA_VBOX_HARDDISK_VB422d9712-9f1778ff [root@kamesh4tad dev]# /sbin/scsi_id -g -u -d /dev/sde 1ATA_VBOX_HARDDISK_VB871b9955-e01a9a56
10. Using these values, edit the "/etc/udev/rules.d/99-oracle-asmdevices.rules" file adding the following 4 entries. All parameters for a single entry must be on the same line.
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VBbf99c520-ebe26574", NAME="asm-disk1", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB80aac8fd-eb083e92", NAME="asm-disk2", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB422d9712-9f1778ff", NAME="asm-disk3", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="1ATA_VBOX_HARDDISK_VB871b9955-e01a9a56", NAME="asm-disk4", OWNER="oracle", GROUP="dba", MODE="0660"
11. Load updated block device partition tables.
# /sbin/partprobe /dev/sdb1 # /sbin/partprobe /dev/sdc1 # /sbin/partprobe /dev/sdd1 # /sbin/partprobe /dev/sde1
12. Reload the UDEV rules and start UDEV. # /sbin/udevadm control --reload-rules # /sbin/start_udev
13. The ASM disks should now should 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 #
14. The shared disks are now configured for the grid infrastructure. Now shutdown the kamesh4tad-rac1 Node
5. Clone the Virtual Machine for second node – kamesh4tad-rac2
1. Shutdown the node 1 kamesh4tad-rac1 if not already done.
2. To clone the kamesh4tad-rac1 node, go to Machine > Clone or Ctrl+o
3. The New Virtual Machine should be kamesh4tad-rac2
To manually clone the VM.
1. Shut down the kamesh4tad-rac1 virtual machine using the following command.
# shutdown -h now
2. Manually clone the " kamesh4tad-rac1.vdi" disk using the following commands on the host server.
VBoxManage clonehd C:\VirtualBox\kamesh4tad-rac1\kamesh4tad-rac1.vdi C:\VirtualBox\kamesh4tad-rac2\kamesh4tad-rac2.vdi
3. Create the " kamesh4tad-rac2" virtual machine in VirtualBox in the same way as you did for " kamesh4tad-rac1", with the exception of using an existing " kamesh4tad-rac2.vdi" virtual hard drive
6. Modify the Virtual Machine – kamesh4tad-rac2
1. When the VM is created and before starting it, attach the shared disks to this VM.
cd /VirtualBox/kamesh4tad-rac
VBoxManage storageattach kamesh4tad-rac2 --storagectl "SATA" --port 1 --
device 0 --type hdd --medium asm1.vdi --mtype shareable
VBoxManage storageattach kamesh4tad-rac2 --storagectl "SATA" --port 2 --
device 0 --type hdd --medium asm2.vdi --mtype shareable
VBoxManage storageattach kamesh4tad-rac2 --storagectl "SATA" --port 3 --
device 0 --type hdd --medium asm3.vdi --mtype shareable
VBoxManage storageattach kamesh4tad-rac2 --storagectl "SATA" --port 4 --
device 0 --type hdd --medium asm4.vdi --mtype shareable
2. Start the "kamesh4tad-rac2" virtual machine by clicking the "Start" button on the toolbar.
3. Log in to the "kamesh4tad-rac2" virtual machine as the "root" user so we can reconfigure the network settings to match the following.
hostname: kamesh4tad-rac2.localdomain
eth0: DHCP (*Not* Connect Automatically)
eth1: IP=192.168.56.102, Subnet=255.255.255.0, Gateway=192.168.56.1,
DNS=192.168.56.1, Search=localdomain (Connect Automatically)
eth2: IP=192.168.1.102, Subnet=255.255.255.0, Gateway=<blank>, DNS=<blank>,
Search=<blank> (Connect Automatically)
4. Update the hostname in the "/etc/sysconfig/network" file.
NETWORKING=yes HOSTNAME=kamesh4tad-rac2.localdomain
5. Check the MAC address of each of the available network connections.
ifconfig -a | grep eth eth3 Link encap:Ethernet HWaddr 08:00:27:BE:87:11 eth4 Link encap:Ethernet HWaddr 08:00:27:C2:0A:0C
eth5 Link encap:Ethernet HWaddr 08:00:27:6F:A0:1C
6. Edit the "/etc/sysconfig/network-scripts/ifcfg-eth0" and update the value of eth3 HWADDR and deleting the UUID entry.
7. Edit the "/etc/sysconfig/network-scripts/ifcfg-eth1" and update the IPADDR and eth4 value of HWADDR settings as follows and deleting the UUID entry.
IPADDR=192.168.56.102
8. Edit the "/etc/sysconfig/network-scripts/ifcfg-eth2" and update the IPADDR and eth5 value of HWADDR settings as follows and deleting the UUID entry.
IPADDR=192.168.1.102
9. Edit the "/home/oracle/.bash_profile" file on the "kamesh4tad-rac2" node to correct the ORACLE_SID and ORACLE_HOSTNAME values.
export ORACLE_SID=cdbrac1 export ORACLE_HOSTNAME=kamesh4tad-rac2.localdomain Also, amend the ORACLE_SID setting in the "/home/oracle/db_env" and "/home/oracle/grid_env" files.
10. Now restart the kamesh4tad-rac2 and start the kamesh4tad-rac1, once they started do a network reachable test and also verify ASM disks availability
Ping from kamesh4tad-rac1 [oracle@kamesh4tad ~]$ ping -c 3 kamesh4tad-rac1 PING kamesh4tad-rac1.localdomain (192.168.56.101) 56(84) bytes of data. 64 bytes from kamesh4tad-rac1.localdomain (192.168.56.101): icmp_seq=1 ttl=64 time=0.044 ms 64 bytes from kamesh4tad-rac1.localdomain (192.168.56.101): icmp_seq=2 ttl=64 time=0.064 ms 64 bytes from kamesh4tad-rac1.localdomain (192.168.56.101): icmp_seq=3 ttl=64 time=0.076 ms --- kamesh4tad-rac1.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.044/0.061/0.076/0.014 ms [oracle@kamesh4tad ~]$ ping -c 3 kamesh4tad-rac1-priv PING kamesh4tad-rac1-priv.localdomain (192.168.1.101) 56(84) bytes of data. 64 bytes from kamesh4tad-rac1-priv.localdomain (192.168.1.101): icmp_seq=1 ttl=64 time=0.057 ms 64 bytes from kamesh4tad-rac1-priv.localdomain (192.168.1.101): icmp_seq=2 ttl=64 time=0.038 ms 64 bytes from kamesh4tad-rac1-priv.localdomain (192.168.1.101): icmp_seq=3 ttl=64 time=0.064 ms --- kamesh4tad-rac1-priv.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.038/0.053/0.064/0.011 ms [oracle@kamesh4tad ~]$ [oracle@kamesh4tad ~]$ ping -c 3 kamesh4tad-rac2 PING kamesh4tad-rac2.localdomain (192.168.56.102) 56(84) bytes of data. 64 bytes from kamesh4tad-rac2.localdomain (192.168.56.102): icmp_seq=1 ttl=64 time=1.77 ms 64 bytes from kamesh4tad-rac2.localdomain (192.168.56.102): icmp_seq=2 ttl=64 time=0.969 ms 64 bytes from kamesh4tad-rac2.localdomain (192.168.56.102): icmp_seq=3 ttl=64 time=0.792 ms
--- kamesh4tad-rac2.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 0.792/1.179/1.777/0.429 ms [oracle@kamesh4tad ~]$ ping -c 3 kamesh4tad-rac2-priv PING kamesh4tad-rac2-priv.localdomain (192.168.1.102) 56(84) bytes of data. 64 bytes from kamesh4tad-rac2-priv.localdomain (192.168.1.102): icmp_seq=1 ttl=64 time=1.31 ms 64 bytes from kamesh4tad-rac2-priv.localdomain (192.168.1.102): icmp_seq=2 ttl=64 time=0.656 ms 64 bytes from kamesh4tad-rac2-priv.localdomain (192.168.1.102): icmp_seq=3 ttl=64 time=0.509 ms --- kamesh4tad-rac2-priv.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2009ms rtt min/avg/max/mdev = 0.509/0.825/1.310/0.348 ms [oracle@kamesh4tad ~]$
Ping from kamesh4tad-rac2 [oracle@kamesh4tad-rac2 ~]$ ping -c 3 kamesh4tad-rac1 PING kamesh4tad-rac1.localdomain (192.168.56.101) 56(84) bytes of data. 64 bytes from kamesh4tad-rac1.localdomain (192.168.56.101): icmp_seq=1 ttl=64 time=0.735 ms 64 bytes from kamesh4tad-rac1.localdomain (192.168.56.101): icmp_seq=2 ttl=64 time=0.788 ms 64 bytes from kamesh4tad-rac1.localdomain (192.168.56.101): icmp_seq=3 ttl=64 time=0.936 ms --- kamesh4tad-rac1.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 0.735/0.819/0.936/0.091 ms [oracle@kamesh4tad-rac2 ~]$ ping -c 3 kamesh4tad-rac1-priv PING kamesh4tad-rac1-priv.localdomain (192.168.1.101) 56(84) bytes of data. 64 bytes from kamesh4tad-rac1-priv.localdomain (192.168.1.101): icmp_seq=1 ttl=64 time=0.307 ms 64 bytes from kamesh4tad-rac1-priv.localdomain (192.168.1.101): icmp_seq=2 ttl=64 time=0.606 ms 64 bytes from kamesh4tad-rac1-priv.localdomain (192.168.1.101): icmp_seq=3 ttl=64 time=0.653 ms --- kamesh4tad-rac1-priv.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.307/0.522/0.653/0.153 ms [oracle@kamesh4tad-rac2 ~]$ ping -c 3 kamesh4tad-rac PING kamesh4tad-rac2.localdomain (192.168.56.102) 56(84) bytes of data. 64 bytes from kamesh4tad-rac2.localdomain (192.168.56.102): icmp_seq=1 ttl=64 time=0.126 ms 64 bytes from kamesh4tad-rac2.localdomain (192.168.56.102): icmp_seq=2 ttl=64 time=0.064 ms 64 bytes from kamesh4tad-rac2.localdomain (192.168.56.102): icmp_seq=3 ttl=64 time=0.063 ms --- kamesh4tad-rac2.localdomain ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 0.063/0.084/0.126/0.030 ms [oracle@kamesh4tad-rac2 ~]$ ping -c 3 kamesh4tad-rac2-priv PING kamesh4tad-rac2-priv.localdomain (192.168.1.102) 56(84) bytes of data. 64 bytes from kamesh4tad-rac2-priv.localdomain (192.168.1.102): icmp_seq=1 ttl=64 time=0.027 ms 64 bytes from kamesh4tad-rac2-priv.localdomain (192.168.1.102): icmp_seq=2 ttl=64 time=0.061 ms 64 bytes from kamesh4tad-rac2-priv.localdomain (192.168.1.102): icmp_seq=3 ttl=64 time=0.065 ms --- kamesh4tad-rac2-priv.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.027/0.051/0.065/0.017 ms [oracle@kamesh4tad-rac2 ~]$
Verify ASM disks availability on both kamesh4tad-rac1 and kamesh4tad-rac2
The virtual machine setups are now complete.
7. Install 12c Grid Infrastructure
Make sure both virtual machines kamesh4tad-rac1 and kamesh4tad-rac2 are started. Install the following package from the Oracle grid media as the root user.
# cd /media/sf_Share/grid/rpm # rpm -Uvh cvuqdisk*
Login to "kamesh4tad-rac1" as the "oracle" user and start the Oracle installer.
$ cd /media/sf_Share1/grid ./runInstaller
Select the "Skip software updates" option, then click the "Next" button.
Select the "Install and Configure Oracle Grid Infrastructure for a Cluster" option, then click the "Next" button.
Accept the "Configure a Standard cluster" option by clicking the "Next" button.
Select the "Typical Installation" option, then click the "Next" button.
On the "Specify Cluster Configuration" screen, enter the correct SCAN Name and click the "Add" button.
Click OK
Click the "SSH Connectivity..." button and enter the password for the "oracle" user. Click the "Setup" button to to configure SSH connectivity, and the "Test" button to test it once it
is complete.
Now click OK
Click the "Identify network interfaces..." button and check the public and private networks
are specified correctly.
Remember to mark the NAT interface as "Do Not Use". Once you are happy with them, click the "OK" button and the "Next" button on the previous screen. It will take few minutes
because it will do all the validations in the background
Click Next
Set the redundancy to "External", click the "Change Discovery Path" button and set the path to "/dev/asm*". Return the main screen and select all 4 disks and click the "Next"
button.
Accept the default inventory directory by clicking the "Next" button.
Click Next to run the scripts manually or select automatically if you wish
Click Install
Once the scripts have completed on both nodes then return to the "Execute Configuration Scripts" screen on "kamesh4tad-rac1" and click the "OK" button.
Click the "Close" button to exit the installer.
The grid infrastructure installation is now complete. We can check the status of the installation using the following commands.
[oracle@kamesh4tad-rac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.asm
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 Started,STABLE
ora.net1.network
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.ons
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.cvu
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.kamesh4tad-rac1.vip
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.kamesh4tad-rac2.vip
1 ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.oc4j
1 OFFLINE OFFLINE STABLE
ora.scan1.vip
1 ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.scan2.vip
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.scan3.vip
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
--------------------------------------------------------------------------------
[oracle@kamesh4tad-rac1 ~]$
From Node-2
[oracle@kamesh4tad-rac2 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.LISTENER.lsnr
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.asm
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 Started,STABLE
ora.net1.network
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.ons
ONLINE ONLINE kamesh4tad-rac1 STABLE
ONLINE ONLINE kamesh4tad-rac2 STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.cvu
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.kamesh4tad-rac1.vip
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.kamesh4tad-rac2.vip
1 ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.oc4j
1 OFFLINE OFFLINE STABLE
ora.scan1.vip
1 ONLINE ONLINE kamesh4tad-rac2 STABLE
ora.scan2.vip
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
ora.scan3.vip
1 ONLINE ONLINE kamesh4tad-rac1 STABLE
--------------------------------------------------------------------------------
[oracle@kamesh4tad-rac2 ~]$
8. Install Oracle 12c RAC DB software
Make sure the "kamesh4tad-rac1" and "kamesh4tad-rac2" virtual machines are started, then login to "kamesh4tad-rac1" as the oracle user and start the Oracle installer.
$ cd /media/sf_Share/database
$ ./runInstaller
Uncheck the security updates checkbox and click the "Next" button and "Yes" on the
subsequent warning dialog.
Check the "Skip software updates" checkbox and click the "Next" button.
Select the "Install database software only" option, then clock the "Next" button.
Click Next
Accept the "Oracle Real Application Clusters database installation" option by clicking the "Next" button.
Make sure both nodes are selected, then click the "Next" button.
Select your language(s) and proceed
Select EE and click Next
Give Oracle base and Software location, click Next
Click Next
Click Next
Select Install
Wait for few minutes
When prompted, run the configuration script on each node. When the scripts have been
run on each node, click the "OK" button
9. Create Database using DBCA
Make sure the "kamesh4tad-rac1" and "kamesh4tad-rac2" virtual machines are started, then login to "kamesh4tad-rac1" as the oracle user and start the Database Creation
Assistant (DBCA).
Select the "Create Database" option and click the "Next" button.
Select the "Create a database with default configuration" option. Enter the container
database name (cdbrac), pluggable database name (pdbrac) and administrator password. Click the "Next" button.
If you are satisfied with the summary information, click the "Finish" button.
Wait while the database creation takes place.
If you want to modify passwords, click the "Password Management" button. When finished,
click the "Exit" button.
Click Close
Congratulations, Oracle 12c - 2 node RAC creation is now complete and now it's time to explore and test all the new features.
10. Verify Oracle 12c RAC status
There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.
Recommended Postinstallation Tasks http://docs.oracle.com/cd/E16655_01/install.121/e17889/postinst.htm#BABJDBHG