Here I am listing out the steps to install 11gR2 RAC on OS OEL6.5 on Oracle VM Virtual BOX.
Step1:
Create new Virtual BOX VM. Click on new and provide Name as rac1 type as Linux and version as Oracle 64bit. Click Next
Step2: Set Base Memory to 3072 MB, then click the “Next” button
Step3:Accept the default option to create a new virtual hard disk by clicking the “Create” button
Step:4 Select the default VMDK type and click the “Next” button on the Create Virtual Hard Drive screen
Step5: Select Dynamically Allocated and select option “split into files of less than 2gb” Click next
Step6: Provide the location where you want to save the VM files. In my case I have provided path as below. Also increase the size of your vm from default to say 50GB and Click “Create”
Once we click on Create we get rac1 vm created as highlighted below:
Step7:Click on General->Advanced and change shared clipboard to Bidirectional and Change Drag ‘n’ Drop to Bidirectional and click Ok
Step8: Click on Network
Add three Adaptors.
Make sure “Adapter 1” is enabled, attached to “Internal Network” or “Host-only Adapter”. This interface will be used for public network, for example, for connection to the RAC datbase from other applications. More about networking will be explained later. On the screenshot below “Internal Network” is selected and name “pubnet” was given to this network
Then click on the “Adapter 2” tab. Make sure “Adapter 2” is enabled and attach to “Internal Network”. Name this network “privnet”:
Then finally click on the “Adapter 3”, enable it, and attach to “Bridged Adapter” or “NAT”. This adapter will be used for internet. Then press “OK” button
Step:9 Click on storage to load OEL6.5 iso
Step10: Select OEl6.5 ISO and click ok
Step11 Click on Shared Folder this will be helpful to get any windows folder mounted on OEL6.5.
Now we can see shared folders with 1 value. It Means we are sharing a folder/drive from Host machine to Guest.
Step12: Click on Start as shown below
Step13. After starting we get below screen and select Install or Upgrade an Existing System.
Step14: Select skip
Step15:Scroll Down and click NEXT
Step16: Click Next
Step17:Click Next
Step18: Select basic Storage and click Next
Step19: Select Discard any Data
Step20: Change the hostname as below(not mandatory that it should be same as below
Scroll down and click on “Configure Network”
Step 20: Select System eth0 and click on edit
Step21: Select Connect Automatically and select IPV4 Setting
Step22: Make sure that “Connect automatically” is checked. Select “IPv4 Settings” tab; change Method to “Manual”; Press “Add” and fill Address: 192.168.56.71; Netmask: 255.255.255.0; Gateway: 0.0.0.0. Press “Apply” then done:
Step23: Now select System eth1 and click on edit
Step24: In the Network Connections screen select “System eth1” interface, this will be used for private network, then press “Edit”. Then check the box “Connect automatically”. Select “IPv4 Settings” tab; change Method to “Manual”. Press “Add” and fill Address: 192.168.10.1; Netmask: 255.255.255.0; Gateway: 0.0.0.0. When done, press “Apply”:
Step25: Finally select “System eth2” interface, this will be used for Internet, then press “Edit”. Check the box “Connect automatically”. Select “IPv4 Settings” tab make sure the Method is set to “Automatic (DHCP)”.Press “Apply” button:
Step26: Click Next
Step27:Give password for root
Step28:
Step29:Click next
Step30:Select on Format
Step31:Select Write Changes to disk
Step32:Click Next
Step33: Select Database Server option and select Customize now and Click Next
Step34:Select Tiger VNC (Not Manadatory). I sometimes prefer using vnc
Step35:Select options as below for Desktop and Click Next
NOW Sit and Relax.
We are done with the installation of OEL 6.5: Click Reboot.
36:After Reboot: Click on Forward
37:Licence Info: Click Forward
Step38:Click Forward
Step39:Select connect later
Step40:Click Forward
Step41:Click Forward
Step42:Select Finish
Step43:First of all check whether we can connect to the internet or not
Change the /etc/hosts entries as below
# Public
192.168.56.71 rac1.localdomain rac1
192.168.56.72 rac2.localdomain rac2
# Private
192.168.10.1 rac1-priv.localdomain rac1-priv
192.168.10.2 rac2-priv.localdomain rac2-priv
# Virtual
192.168.56.81 rac1-vip.localdomain rac1-vip
192.168.56.82 rac2-vip.localdomain rac2-vip
# SCAN
192.168.56.91 rac-scan.localdomain rac-scan
192.168.56.92 rac-scan.localdomain rac-scan
192.168.56.93 rac-scan.localdomain rac-scan
Step44: Install Virtual BOX Software
Step45:Click Ok
Step47:Click on RUN
Step48: It is failed. We need to update packages.
Please follow steps provided in below link to resolve this issue
Once finishing the steps provided in above link Reboot the Server.
Once again try to install VM tools
Reboot.
Purpose we will be able to view the shared folders in Linux Guest.
Step51: Now we need to disable the firewall: Linux Main menu | System | Administration | Firewall. Click on “Disable” icon, then on “Apply”.
Stop and Disable
Step52: Copy the software from shared folder to tmp and change the permissions to read write execute on zip files
Step53: Install oracle-rdbms-server-11gR2-preinstall using yum
Install ASM packages as below
Create group and user
groupadd -g 1000 oinstall
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle
passwd oracle
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle
passwd oracle
Passwd oracle
Create Passwd for oracle user
Step54: Create the directory in which the Oracle software will be installed.
mkdir -p /u01/app/11.2.0.3/grid
mkdir -p /u01/app/oracle/product/11.2.0.3/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01/
Step55: Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Change Enforcing to disabled
Add or amend the following lines to the “/etc/sysctl.conf” file.
fs.aio-max-nr = 1048576
fs.file-max = 6815744
#kernel.shmall = 2097152
#kernel.shmmax = 1054504960
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
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=1048586
Run the following command to change the current kernel parameters.
/sbin/sysctl –p
Add the following lines to the “/etc/security/limits.conf” file.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
# service iptables stop
# chkconfig iptables off
Step57: Either configure NTP, or make sure it is not configured so the Oracle Cluster Time Synchronization Service (ctssd) can synchronize the times of the RAC nodes. If you want 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
If you want to use NTP, you must add the “-x” option into the following line in the “/etc/sysconfig/ntpd” file.
OPTIONS="-x -u ntp:ntp -p /var/run/ntpd.pid"
Then restart NTP.
# service ntpd restart
Now we will shut down the server as we need to add asm disks. Before we add asm disks. We will backup our vm
Backup VM.
Click File export Appliance
Select our VM and click next Save to some location
Click next and click export
Ok We done with the backup now add disk’s for ASM storage.
TO add disks click on storage
Once this is done
Now Restore the Backup that was taken earlier and change it as Rac2
Change the name to RAC2
Scroll down
Click Import
After import we got RAC2 VM
Change the disks to shared that were created earlier for ASM
Do the same for all the ASMDISK’s
Now once this is done click on RAC2 Vm and Storage
Repeat same for other 2 asm disks
Now start the Rac2 server Make sure sure RAC1 IS DOWN
The main purpose of starting the server is that we have to configure Network
If we see here it is still rac1. Hostname has to be changed
Change the hostsname
Change the IP addresses
Reboot
If there is any problem then restart network services
Service network restart
Start RAC1 and check whether you are able to ping the hosts as below from rac1
Install Oracleasmlib. I have downloaded file from
Do the same with other storage devices i.e for /dev/sdc and /dev/sdd
Configure OracleASM
Configure ASMLib using the following command.
# oracleasm configure -i
/usr/sbin/oracleasm init
On RAC2
We are done with everything
now unzip the grid software
install cvqdisk* rpm
Execute the runInstaller.sh
Click on SSH Connectivity..
Give the password for grid and click next…
provide passwords in below screenshot.
Install missed RPM’s
Lets install one after the other using yum
This issue is due to wrong groups used. Change the groups as provided in the screenshot.
The other two issues can be ignored.
We are done with running root.sh on both nodes
Ignore error regarding SCAN- this can be resolved by performing action plan provide above error information Click Next and finish the installation.
SCAN Issue can be resolved using below provided below
Install the DAtabase
SCAN Issue can be resolved using below
[root@rac1]# mv /usr/bin/nslookup /usr/bin/nslookup.original
Next, create a new shell script named /usr/bin/nslookup as shown below while
replacing 24.154.1.34 with your primary DNS, rac-scan with your
SCAN host name, and 192.168.56.91 with your SCAN IP address:
#!/bin/bash
HOSTNAME=${1}
if [[ $HOSTNAME = "racnode-cluster-scan" ]]; then
echo "Server: 24.154.1.34"
echo "Address: 24.154.1.34#53"
echo "Non-authoritative answer:"
echo "Name: racn-scan"
echo "Address: 192.168.56.91 "
else
/usr/bin/nslookup.original $HOSTNAME
fi
Finally, change the new nslookup shell script to executable:
[root@rac1 ~]# chmod 755 /usr/bin/nslookup
Remember to perform these actions on both Oracle RAC nodes.
The new nslookup shell script simply echo's back your SCAN IP address whenever the CVU calls nslookup with your SCAN host name; otherwise, it calls the original nslookup binary. The CVU will now pass during the Oracle grid infrastructure installation when it attempts to verify your SCAN:
This finishes the installation of RAC.
You can create your own profiles for accessing grid and Oracle Database.
No comments:
Post a Comment