You are on page 1of 21

For previous three posts visit Try installing Orcale RAC on your laptop RAC Part I - Install Virtual

Machine and Linux RAC Part II - Install Virtual Disk and Network Card In this post you will --Clone RAC1 to RAC2 and change IP address of RAc2 --Configure User equivalency for Orale Clusterware installation Clone RAC1 to RAC2 ------------------------------- Make sure virtual linux machine is shutdown -Copy folder rac1 to folder rac2 in c:\Atul\VMWARE (This is on windows laptop/machine)

--In both RAC1 and RAC2 folder open Red Hat Enterprise Linux 3.vmx (This is virtual machine configuration file) using notepad or wordpad --Add following lines (This will avoid locking for shared files and two linux machines RAC1 and RAC2 can start together using shared files votingdisk, crs and asm) disk.locking = "FALSE" diskLib.dataCacheMaxSize = "0" diskLib.dataCacheMaxReadAheadSize = "0" diskLib.dataCacheMinReadAheadSize = "0" diskLib.dataCachePageSize = "4096" diskLib.maxUnsyncedWrites = "0" --Now on vmx file of RAC2 Red Hat Enterprise Linux 3.vmx change following lines from displayName = "RAC1" to displayName = "RAC2" --On VMWare Server Console, Click on File and Open or Ctrl + O

--Click on Browse and select red hat enterprise linux 3.vmx from RAC2directory --Now you should see two linux machines RAC1 and RAC2 on VMWare Console

Start RAC1 and RAC2 and when you get below warning on RAC2, select create and click OK

Make sure you can start both machine at same time, if you get message likeunable to lock files, check you have added following lines in both machines vmx files mentioned above (regarding disk locking)

Change Network Settings (IP) on RAC2 ------------------------------------------------Login as ROOT user in RAC2 machine and click System Setting -> Network

Select eth0 and click on Edit

Change Address from 192.168.1.101 to 192.168.1.102 Click on Hardware Device Tab and Click on Probe button

--Repeat steps for second network card eth1 and change its IP from 192.168.0.101 to 192.168.0.102 Make sure you clicked probe on eth1 as well as shown above

Activate both network cards by clicking on Activate as shown below

If you get error message that eth0 has different MAC address expected as shown below; make sure you have clicked on probe on Bind to Mac Address on Hardware Device mentioned above.

Make sure both network cards are active now, as shown below

Add following entry in /etc/hosts file of both RAC1 and RAC2 #### 127.0.0.1 loalhost.localdomain localhost 192.168.1.102 rac2.focusthread.com rac2 rac2-vip.focusthread.com rac2-vip 192.168.0.102 rac2-priv.focusthread.com rac2-priv 192.168.1.101 rac1.focusthread.com rac1 rac1-vip.focusthread.com rac1-vip 192.168.0.101 rac1-priv.focusthread.com rac1-priv ### Now trying to ping RAC2 machine from RAC1 and RAC1 machine from RAC2

Change Host Name of newly cloned RAC2

------------------------------------------------Follow below step on how to change hostname on RAC2 (newly cloned) Linux machine Open file /etc/sysconfig/network and edit line like : HOSTNAME=XXXXX i.e. from HOSTNAME rac1.focusthread.com To HOSTNAME rac2.focusthread.com

Configure User Equivalency ----------------------------------User equivalency for user oracle is required so that user oracle from RAC1 can communicate to user oracle on RAC2 machine without prompting for password for clusterware to work properly. --Login as user oracle in machine RAC1 --Make sure sshd daemon is running (pgrep sshd), If not start it from root user like service start sshd --Create RSA and DSA key on each node -From oracle user go to user home directory by cd $HOME or type cd and press enter -mkdir .ssh (note that there is dot before ssh which means this is hidden directory) -chmod 700 .ssh -ssh-keygen t rsa -ssh-keygen t dsa press enter when prompted for file to save the key and passphrase (check screenshot for more information)

Repeat this on both the nodes i.e. RAC1 and RAC2

Add keys to authorized key file (authorized_keys) ------------------------------------------------------------cd .ssh -touch authorized_keys -ls (You should see authorized_keys, id_dsa, id_dsa.pub, id_rsa, id_rsa.pub. Here pub files are dsa and rsa public key file and id_dsa and id_rsa are private key files) ssh rac1 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys ssh rac1 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys

ssh rac2 cat /home/oracle/.ssh/id_rsa.pub >> authorized_keys ssh rac2 cat /home/oracle/.ssh/id_dsa.pub >> authorized_keys Send authorized_keys from RAC1 to RAC2 scp authorized_keys rac2:/home/oracle/.ssh

From RAC1 machine as user oracle exec /usr/bin/ssh-agent $SHELL /usr/bin/ssh-add

Test User Equivalency (User oracle can login to other machine without password prompt) ---------------------------ssh rac1 date ssh rac2 date Test this from both nodes RAC1 and RAC2 (You should not be prompted for oracle user password) For more information on User Equivalency visit chapter 2 (Page 51 to 53) of clusterware and rac installation guide This is fourth and last post for installing Oracle RAC Database on single machine using VMWare virtual machines. For previous posts visit Are you scared of Oracle RAC Database Install Oracle RAC Database I Install Oracle RAC Database Part II Install Oracle RAC Database Part III In this part we will install oracle clusterware and rac database

Copy Oracle RAC and Oracle Database Software to RAC1

Create unzip unzip

directory

software

in

$HOME

and

copy clusterware and

database

zip

files

downloaded

10201_clusterware_linux32.zip 10201_database_linux32.zip

This will create directory clusterware (for clusterware software) and database (for database software) Verify all prereq. for clusterware installation -----------------------------------------------------------cd /home/oracle/softwar/clusterware/cluvfy Make sure --Second Machine/Node RAC2 is up -- You have configured and changes hostname and network IP of RAC2 -- RAC1 can ping RAC2 and vice versa -- User equivalency is set for user oracle on RAC1 and RAC2 -- You can connect to rac2 from rac1 as user oracle without prompting password and vice versa ./runcluvfy.sh stage pre crsinst n rac1,rac2 Make sure Node reachable and User Equivalency is met, rest other checks (related memory) can be ignored Once RAC1 and RAC2 can ping each other and oracle user can connect to other machine's oracle user without prompting password then start clusterware installation from user oracle. Change directory to location where you have unzipped clusterware software and start clusterware installation by running runInstaller ./runInstaller

Ignore memory relatedprereq.

Add second node rac2by clicking on Add link

Changesubnet as per your network configuration as you did while configuring network card.

Make one public and another private (Private interconnect for clusterware)

Specify ocrlocation like /apps/oracle/oradata/ocr (or as per your naming convention)

Specify voting disk location like /apps/oracle/oradata/votingdisk (or as per your naming convention)

Click on Install to install clusterware. After clusterware installation, Install Database Install RAC Database Go to location where you unzipped database disks ./runInstaller ignoreSysPrereqs (this is required as our memory is less (below 900MB) required, if your machine spec is higher you can ignore usingignoreSysPrereqs)

Specify database oracle_home (make this different from clusterwareoracle_home installed in previous step)

Enter

database

name

of

your

choice

Select ASM

Ignore

any

warnings

and

click

onOK

Define

location

ofASM as

/dev/raw/raw3

and

make

redundancy

as external

Click on Install Why number of voting disks should always be odd number only ? How to troubleshoot RAC database and clusterware issue ? .. Coming in future posts

You might also like