Professional Documents
Culture Documents
Oracle 11gr2 Single Node Rac Installation PDF
Oracle 11gr2 Single Node Rac Installation PDF
VMWARE
Oracle introduced a new option called RAC One Node with the release of 11gR2 This option is
available with Enterprise edition only.
Install Vmware Server 2.0 on Host Operating System and inside that install Guest Operating
System.
1
Virtual Machine Setup
Click the "Virtual Machine > Create Virtual Machine" menu option, or click the "Create Virtual Machine"
Select the "Linux operating system" option, and set the version to "Red Hat Enterprise Linux 5 (64-bit)",
then click the "Next" button.
Click on the "Create a New Virtual Disk" link or click the "Next" button.
Set the disk size to "20 GB" and click the "Next" button.
Click the "Add a Network Adapter" link or click the "Next" button.
Click the "Use a Physical Drive" link, or click the "Next" button.
Click the "Add a USB Controller" link, or click the "Next" button.
2
Install VMware Client Tools
On the web console, highlight the "RAC1" VM and click the "Install VMware Tools" link and click the
subsequent "Install" button.
In the RAC1 console, right-click on the "VMwareTools*.rpm" file and select the "Open with "Software
Installer"" option.
Click the "Apply" button and accept the warning by clicking the subsequent "Install Anyway" button.
pick the screen resolution of your choice. Ignore any warnings or errors.
check the "Time synchronization between the virtual machine and host os" option and click the "Close"
button.
# init 0
Create a directory on the host system to hold the shared virtual disks.
On the VMware Intrastructure Web Access Console, click the "Add Hardware" link.
3
Click the "Hard Disk" link, or click the "Next" button.
Click the "Create New Virtual Disk" link, or click the "Next" button.
Set the size to "1 GB" and the location to "[standard] SAN/ocrvote.vmdk".
Expand the "Disk Mode" section and check the "Independent" and "Persistent" options.
Expand the "Virtual Device Node" section and set the adapter to "SCSI 1" and the device to "1", then
click the "Next" button.
Repeat the previous hard disk creation steps 3 more times, using the following values.
Once all disks Creation are done, open and edit Vmware vmx file.
4
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
scsi1.sharedBus = "virtual"
scsi1:0.deviceType = "disk"
scsi1:1.deviceType = "disk"
scsi1:2.deviceType = "disk"
scsi1:3.deviceType = "disk"
Start the TESTRAC1 virtual machine by clicking the "Play" button on the toolbar,
Configured IP
5
Pre Installation Tasks
Login in the redhat enterprise linux as root user and check for the following rpm packages.
Editing vi /etc/hosts
#Public Interface
192.168.2.10 testrac1.localdomain testrac1
#Intraconnect Private Interface
192.168.21.50 testrac1-priv.localdomain testrac1-priv
#Virtual IP For Oracle RAC
192.168.2.12 testrac1-vip.localdomain testrac1-vip
#Scan IP For Oracle RAC
192.168.2.20 testrac-scan.localdomain testrac-scan
192.168.2.21 testrac-scan.localdomain testrac-scan
192.168.2.22 testrac-scan.localdomain testrac-scan
Vi /etc/sysctl.conf
kernel.shmall = 2097152
kernel.shmax= 1054504960
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.core.rmem_default = 262144
6
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
chown -R grid:oinstall /u01
chmod -R 775 /u01
mkdir -p /u02/app/oracle
mkdir -p /u02/app/oracle/product/11.2.0/db_1
chown oracle:oinstall /u02/app/oracle
chmod -R 775 /u02
7
Add the following lines to the "/etc/security/limits.conf" file
SELINUX=disabled
8
Creating the ASM disks, however, will only need to be performed on a single node within the
cluster (racnode1).
Login as the oracle user and add the following lines at the end of the ".bash_profile" file.
PATH=$PATH:$HOME/bin
export PATH
ORACLE_UNQNAME=testprod1;export ORACLE_UNQNAME
ORACLE_SID=testprod1; export ORACLE_SID
ORACLE_BASE=/u02/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u02/app/oracle/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_PATH=/u02/app/oracle/common/oracle/sql; export ORACLE_PATH
9
ORACLE_TERM=xterm; export ORACLE_TERM
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
export TEMP=/tmp
export TMPDIR=/tmp
PS1='[$USER:$host:$ORACLE_SID:\w$]'
PATH=${PATH}:$HOME/bin:$ORACLE_HOME/bin:/usr/ccs/bin:/u02/app/oracle/product/11.2.0/dbhome
_1/OPatch/
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH
umask 022
Login as the grid user and add the following lines at the end of the ".bash_profile" file.
# .bash_profile
10
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
export JAVA_HOME=/jdk1.5.0_22
PATH=${PATH}:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$JAVA_HOME/bin:$JAVA
_HOME/jre/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/usr/ccs/bin
PATH=${PATH}:/u01/app/common/oracle/bin:/u01/app/11.2.0/grid/OPatch
export PATH
umask 022
DISK PARTITIONING
Use the "fdisk" command to partition the disks sdb to sde. The following output shows the
expected fdisk output for the sdb disk.
11
12
13
Configuring ASMLib Packages on testrac1 node
/usr/sbin/oracleasm configure i
To create the ASM disks using the iSCSI target names to local device name mappings,
type the following:
14
[root@testrac1 ~]# /usr/sbin/oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@testrac1 ~]# /usr/sbin/oracleasm listdisks
DATA1
DATA2
GRID1
RECO1
[root@testrac1 ~]#
15
INSTALLATION OF GRID
Select the "Install and Configure Grid Infrastructure for a Cluster" option, then click the "Next"
button.
16
The "Advanced Installation" option was chosen.
17
Language, speaks for itself.
18
Click the "SSH Connectivity" button and enter the password for the "grid" user.
19
20
Check the public and private networks are specified correctly.
Select ASM and on Next screen provide Disk Group name and choose disk on which you are going to
keep OCR & Voting Disk
21
22
23
24
25
In my situation, some kernel parameters needed to be changed.
If you have any issues, either fix them or check the "Ignore All" checkbox and click the "Next" button
Click On Finish
26
When prompted, run the configuration scripts on each node
/u01/app/oraInventory/orainstRoot.sh
&
/u01/app/11.2.0/grid/root.sh
27
We expect the verification phase to fail with an error relating to the SCAN, assuming you are not using
DNS.
Provided this is the only error, it is safe to ignore this and continue by clicking the "Next" button.
28
29
Create ASM Disk Groups:
Connect as grid user and Invoke the asmca utility under $GRID_HOME/bin to
create these disk groups. A screen will appear, click on create to create new disk group.
30
31
32
Now we have all the required disk groups
33
Installation of RDBMS and Configuration Of Database
Start the runInstaller from 11g R2 Real Application Cluster (RAC) Software Location:
34
Check the "Create and configure a database" option by clicking the "Next" button
35
36
Click the "SSH Connectivity" button and enter the password for the "oracle" user.
37
Select Advance Install Option
38
39
Provide the global database name & SID
40
Click on Next_--> Choose character Set you may choose database control or grid controlOn next
screen choose ASM for database
41
Select DATA Disk group for database file system installation.
42
43
44
When prompted, run the configuration scripts on each node. When the scripts have been run on each
node, click the "OK" button
First Check Your Oracle PMON process, here you can see that two database process is running
#crs_stat -t
45
46
Now connect to ASM Instance
The srvctl utility shows the current configuration and status of the RAC database.
---------------------------------------
or
this above command will stop rdbms instance first, then asm instance after that cluster services.
---------------------------------------
or
this above command will start cluster services first, then asm instance after that rdbms instance.
47