Professional Documents
Culture Documents
Implementing Two Node RAC Final
Implementing Two Node RAC Final
NIC 1 - eth0
NIC 2 - eth1
DB EXPERTS 1
DB EXPERTS Basavraju 9866465379
[root@rac1 ~]#
[root@rac2 ~]#
DB EXPERTS 2
DB EXPERTS Basavraju 9866465379
DB EXPERTS 3
DB EXPERTS Basavraju 9866465379
Configure the following file which should contain Ip address and alias
name
192.168.2.10 rac1
192.168.3.10 rac1-priv
192.168.2.11 rac1-vip
192.168.2.20 rac2
192.168.3.20 rac2-priv
192.168.2.21 rac2-vip
~
DB EXPERTS 4
DB EXPERTS Basavraju 9866465379
~
-- INSERT --
Login into Second Node (rac2) as root user and configure /etc/hosts file
[root@rac2 ~]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
192.168.2.10 rac1
192.168.3.10 rac1-priv
192.168.2.11 rac1-vip
192.168.2.20 rac2
192.168.3.20 rac2-priv
192.168.2.21 rac2-vip
~
~
-- INSERT --
On first node (rac1) as root user set the following Kernel parameters
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
DB EXPERTS 5
DB EXPERTS Basavraju 9866465379
kernel.shmmax = 9999999999
kernel.sem = 256 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_max = 262144
net.core.rmem_default = 262144
net.core.wmem_max = 262144
net.core.wmem_default = 262144
-- INSERT --
DB EXPERTS 6
DB EXPERTS Basavraju 9866465379
To install clusterware and oracle softwares. Here /cluster is used for CRS
Home and /orasoft is for Oracle Home
from first node check root user is able to login into all the nodes
using alias names mentioned in /etc/hosts file
DB EXPERTS 7
DB EXPERTS Basavraju 9866465379
Similarly from second also check root user is able to login into all the
nodes using alias names mentioned in /etc/hosts file
DB EXPERTS 8
DB EXPERTS Basavraju 9866465379
Configure root logins from any anode to any other node of RAC
without passwords
DB EXPERTS 9
DB EXPERTS Basavraju 9866465379
Finally the authorized_keys file should contain public keys of all Nodes
and this file should present in every node under .ssh directory of root
Now check root logins without passwords from first node (rac1)
DB EXPERTS 10
DB EXPERTS Basavraju 9866465379
And similarly check root logins from second node without passwords
Similary configure logins for oracle from any node to any other node of
RAC without passwords
DB EXPERTS 11
DB EXPERTS Basavraju 9866465379
DB EXPERTS 12
DB EXPERTS Basavraju 9866465379
Similarly login into second node as oracle user and perform the following
operations
DB EXPERTS 13
DB EXPERTS Basavraju 9866465379
Now at second node also generate public and private key pair
[oracle@rac2 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oracle/.ssh/id_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
73:72:11:ea:ab:2c:3b:16:42:ef:45:f8:ad:55:51:f5 oracle@rac2
[oracle@rac2 ~]$ cd .ssh/
[oracle@rac2 .ssh]$ ls
authorized_keys id_dsa id_dsa.pub known_hosts
[oracle@rac2 .ssh]$ cat id_dsa.pub >> authorized_keys
[oracle@rac2 .ssh]$ scp authorized_keys oracle@rac1:/home/oracle/.ssh
oracle@rac1's password:
authorized_keys 100% 1202 1.2KB/s 00:00
[oracle@rac2 .ssh]$
DB EXPERTS 14
DB EXPERTS Basavraju 9866465379
Check from all nodes as oracle user whether logins are allowed
between oracle user of all nodes in RAC
DB EXPERTS 15
DB EXPERTS Basavraju 9866465379
As root user install the following Linux RPMs in each node of RAC if
not installed already
[root@rac1 ~]# rpm -qa | grep compat
compat-db-4.1.25-9
java-1.4.2-gcj-compat-1.4.2.0-27jpp
compat-libcom_err-1.0-5
compat-libstdc++-7.3-2.96.128
compat-libstdc++-33-3.2.3-47.3
compat-libgcc-296-2.96-132.7.2
compat-libstdc++-296-2.96-132.7.2
compat-openldap-2.1.30-4
compat-libstdc++-devel-7.3-2.96.128
compat-gcc-c++-7.3-2.96.128
compat-gcc-7.3-2.96.128
[root@rac1 ~]#
Check for the above packages in second node also as root users
Apart from the above packages install what ever required for oracle 10g
R2
TO KEEP Database
DB EXPERTS 16
DB EXPERTS Basavraju 9866465379
Login into first node (rac1) as root user and update the following file
DB EXPERTS 17
DB EXPERTS Basavraju 9866465379
In our case we are configuring raw devices to keep OCR and votingdisk
DB EXPERTS 18
DB EXPERTS Basavraju 9866465379
Here we are using /dev/sdb9 and /dev/sdb10 partitions shared from SAN
DB EXPERTS 19
DB EXPERTS Basavraju 9866465379
DB EXPERTS 20
DB EXPERTS Basavraju 9866465379
DB EXPERTS 21
DB EXPERTS Basavraju 9866465379
save the above file and quit then start rawdevices service
DB EXPERTS 22
DB EXPERTS Basavraju 9866465379
DB EXPERTS 23
DB EXPERTS Basavraju 9866465379
Click Next
DB EXPERTS 24
DB EXPERTS Basavraju 9866465379
Click Ok
DB EXPERTS 25
DB EXPERTS Basavraju 9866465379
DB EXPERTS 26
DB EXPERTS Basavraju 9866465379
DB EXPERTS 27
DB EXPERTS Basavraju 9866465379
DB EXPERTS 28
DB EXPERTS Basavraju 9866465379
Click Install
DB EXPERTS 29
DB EXPERTS Basavraju 9866465379
DB EXPERTS 30
DB EXPERTS Basavraju 9866465379
DB EXPERTS 31
DB EXPERTS Basavraju 9866465379
Now configure VIP as root user by running vipca from CRS home on
both the nodes
--------------------------------------------------------------
Click Next
DB EXPERTS 32
DB EXPERTS Basavraju 9866465379
DB EXPERTS 33
DB EXPERTS Basavraju 9866465379
Click Next
Click Finish
DB EXPERTS 34
DB EXPERTS Basavraju 9866465379
Click Ok
DB EXPERTS 35
DB EXPERTS Basavraju 9866465379
Click Exit
DB EXPERTS 36
DB EXPERTS Basavraju 9866465379
Click Next
DB EXPERTS 37
DB EXPERTS Basavraju 9866465379
Click Finish
DB EXPERTS 38
DB EXPERTS Basavraju 9866465379
DB EXPERTS 39
DB EXPERTS Basavraju 9866465379
Login into Node1 (rac1) as Oracle DBA Os user and execute runInstaller
from 10g release2 Software which launch OUI to install oracle
DB EXPERTS 40
DB EXPERTS Basavraju 9866465379
DB EXPERTS 41
DB EXPERTS Basavraju 9866465379
DB EXPERTS 42
DB EXPERTS Basavraju 9866465379
Click Install
DB EXPERTS 43
DB EXPERTS Basavraju 9866465379
DB EXPERTS 44
DB EXPERTS Basavraju 9866465379
Now as root user execute the following script in each cluster node
Login into node1 (rac1) as root user and execute root.sh script from
Oracle Home.
[root@rac1 ~]#
Now Login into second as root user and run root.sh script from Oracle
Home
DB EXPERTS 45
DB EXPERTS Basavraju 9866465379
[root@rac2 ~]#
Now return to oui screen and click ok and then click exit as oracle user.
DB EXPERTS 46
DB EXPERTS Basavraju 9866465379
from : /orasoft/10g/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /orasoft/10g/oui
Log file location : /orasoft/10g/cfgtoollogs/opatch/opatch-
2011_Jan_26_23-49-04-IST_Wed.log
--------------------------------------------------------------------------------
Installed Top-level Products (1):
--------------------------------------------------------------------------------
OPatch succeeded.
[oracle@rac1 ~]$
DB EXPERTS 47
DB EXPERTS Basavraju 9866465379
DB EXPERTS 48
DB EXPERTS Basavraju 9866465379
DB EXPERTS 49
DB EXPERTS Basavraju 9866465379
DB EXPERTS 50
DB EXPERTS Basavraju 9866465379
DB EXPERTS 51
DB EXPERTS Basavraju 9866465379
DB EXPERTS 52
DB EXPERTS Basavraju 9866465379
DB EXPERTS 53
DB EXPERTS Basavraju 9866465379
Give Sys user password for ASM, select Pfile location, Click Next
DB EXPERTS 54
DB EXPERTS Basavraju 9866465379
Click Ok
DB EXPERTS 55
DB EXPERTS Basavraju 9866465379
DB EXPERTS 56
DB EXPERTS Basavraju 9866465379
Disk group created and mounted by two ASM instances, Click Finish
DB EXPERTS 57
DB EXPERTS Basavraju 9866465379
DB EXPERTS 58
DB EXPERTS Basavraju 9866465379
DB EXPERTS 59
DB EXPERTS Basavraju 9866465379
If you want Check Configure Enterprise Manager Option and Click Next
DB EXPERTS 60
DB EXPERTS Basavraju 9866465379
DB EXPERTS 61
DB EXPERTS Basavraju 9866465379
DB EXPERTS 62
DB EXPERTS Basavraju 9866465379
DB EXPERTS 63
DB EXPERTS Basavraju 9866465379
Click Next
DB EXPERTS 64
DB EXPERTS Basavraju 9866465379
Click Next
Click Next
DB EXPERTS 65
DB EXPERTS Basavraju 9866465379
Click Ok
DB EXPERTS 66
DB EXPERTS Basavraju 9866465379
Click Exit
DB EXPERTS 67
DB EXPERTS Basavraju 9866465379
To Check the current state of all resources configured under oracle RAC
[oracle@rac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.dev.db application ONLINE ONLINE rac2
ora....v1.inst application ONLINE ONLINE rac1
ora....v2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
[oracle@rac1 ~]$
DB EXPERTS 68
DB EXPERTS Basavraju 9866465379
DB EXPERTS 69