راهنمای نصب Oracle 11g R2 ASM

 

راهنمای نصب Oracle 11g  R2 ASM روی لینوکس ۶

این راهنما مربوط به آموزش تصویری است. 

دیدن فیلم آموزشی Oracle ASM

دانلود بسته های Oracle ASMLibs

Oracle 11g Release 2 (11.2.0.4) Install  Grid Infrastructure installation on CentOS Linux 6.x 64bit

**************************************************************************
This article describes the installation of Oracle Database 11g Release 2 (11.2) (64-bit) on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum of 2G swap, with both SELinux and the firewall disabled. The following package groups were included for this installation.

Base System > Base
Base System > Client management tools
Base System > Compatibility libraries
Base System > Hardware monitoring utilities
Base System > Large Systems Performance
Base System > Network file system client
Base System > Performance Tools
Base System > Perl Support
Servers > Server Platform
Servers > System administration tools
Desktops > Desktop
Desktops > Desktop Platform
Desktops > Fonts
Desktops > General Purpose Desktop
Desktops > Graphical Administration Tools
Desktops > Input Methods
Desktops > X Window System
Development > Additional Development
Development > Development Tools
Applications > Internet Browser

*****************************************************************
The “/etc/hosts” file must contain a fully qualified name for the server.

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example.

۱۲۷٫۰٫۰٫۱       localhost.localdomain  localhost

۱۹۲٫۱۶۸٫۵۶٫۲۰   oradbasm.oraclekade.me oradbasm

test network:
# ping oradbasm

*****************************************************************************
Check OS Software Requirements: in all nodes  (root user)

for downloading i686 packages user :

https://www.rpmfind.net/linux/rpm2html/search.php

yum -y install binutils
yum -y install compat-libstdc++-33
yum -y install elfutils-libelf
yum -y install elfutils-libelf-devel
yum -y install gcc
yum -y install gcc-c++
yum -y install glibc
yum -y install kernel-devel
yum -y install glibc-common
yum -y install glibc-devel
yum -y install glibc-headers
yum -y install libaio
yum -y install libaio-devel
yum -y install libgcc
yum -y install libstdc++
yum -y install libstdc++-devel
yum -y install make
yum -y install numactl
yum -y install numactl-devel
yum -y install sysstat
yum -y install unixODBC
yum -y install unixODBC-devel
yum  -y install libcap-2*
yum  -y install compat-libcap1*
yum -y install pdksh

yum -y install glibc.i686
yum -y install glibc-devel.i686
yum -y install libaio.i686
yum -y install libaio-devel.i686
yum -y install compat-libstdc++-33.i686
yum -y install libgcc.i686
yum -y install libstdc++.i686
yum -y install libstdc++.i686
yum -y install unixODBC.i686
yum -y install unixODBC-devel.i686

yum -y install   chrony

Automatic Setup
If you plan to use the “oracle-rdbms-server-11gR2-preinstall” package to perform all your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup the yum repository for OL, then perform the following command.

# yum localinstall oracle-rdbms-server-11gR2-preinstall

All necessary prerequisites will be performed automatically.

for checking Installed packeges:

rpm -q –qf ‘%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n’ binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
pdksh \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
sysstat \
unixODBC \
unixODBC-devel

*****************************************************************
stop NTP  service in all nodes by root and configure chrony

service ntpd stop
chkconfig ntpd off
mv /etc/ntp.conf /etc/ntp.conf.org
rm /var/run/ntpd.pid

if you using 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”
[root@oradbasm etc]# service ntps restart

————————————————————–
. open below file  and add NTP server’s IP after line below
. # Please consider joining

# vim /etc/chrony.conf

# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 192.168.56.1  iburst

*****************************************************************
add line below to /etc/security/limits.conf  in all nodes  by root

grid                  soft    nproc     ۱۶۳۸۴
grid                  hard    nproc     ۱۶۳۸۴
grid                  soft    nofile     ۶۵۵۳۶
grid                  hard    nofile     ۶۵۵۳۶
grid                  soft    stack      ۱۰۲۴۰
grid                  hard    stack      ۱۰۲۴۰

oracle               soft    nproc     ۱۶۳۸۴
oracle               hard    nproc     ۱۶۳۸۴
oracle               soft    nofile     ۶۵۵۳۶
oracle               hard    nofile     ۶۵۵۳۶
oracle               soft    stack      ۱۰۲۴۰
oracle               hard    stack      ۱۰۲۴۰

*****************************************************************
add following lines to /etc/pam.d/login  in all nodes  by root

session    required     pam_limits.so

*****************************************************************
add the following lines to the /etc/profile  in all nodes   by root

if [ \$USER = “oracle” ] || [ \$USER = “grid” ]; then
if [ \$SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

*****************************************************************
edit fiel /etc/sysctl.conf

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
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

*****************************************************************

Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.

SELINUX=disabled

Once the change is complete, restart the server.

*****************************************************************
Before installing the software, complete the following procedure to verify that the user nobody exists on both Oracle RAC nodes:
To determine if the user exists, enter the following command:

[root@oradbasm ~]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)

If this command displays information about the nobody user, then you do not have to create that user.

If the user nobody does not exist, then enter the following command to create it:

[root@oradbasm ~]# /usr/sbin/useradd nobody
Repeat this procedure on all the other Oracle RAC nodes in the cluster

*****************************************************************

create groups and user  in all nodes   by root

[root@oradbasm ~]#
groupadd -g  ۵۰۱  oinstall
groupadd -g  ۵۰۲  dba
groupadd -g  ۵۰۳  oper
groupadd -g  ۵۰۴  asmadmin
groupadd -g  ۵۰۵  asmdba
groupadd -g  ۵۰۶  asmoper

useradd  -u  ۵۰۱  -g oinstall  -G  asmadmin,asmdba,asmoper,dba    grid

useradd  -u  ۵۰۲ -g oinstall -G dba,oper,asmdba  oracle

[root@oradbasm ~]# passwd oracle
Changing password for user oracle.
New UNIX password: xxxxxxxxxxx
Retype new UNIX password: xxxxxxxxxxx
passwd: all authentication tokens updated successfully.

[root@oradbasm ~]#passwd grid
Changing password for user grid.
New UNIX password: xxxxxxxxxxx
Retype new UNIX password: xxxxxxxxxxx
passwd: all authentication tokens updated successfully.

*****************************************************************
configure   .bash_profile   for grid

export ORACLE_SID=+ASM
export JAVA_HOME=/usr/local/java
export ORACLE_BASE=/gridbase
export ORACLE_HOME=/grid/product/11.2.0/grid
#export ORACLE_PATH=/oracle/common/oracle/sql
export ORACLE_TERM=xterm
#export NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”
#export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS11=$ORACLE_HOME/nls/data
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH

export THREADS_FLAG=native

export TEMP=/tmp
export TMPDIR=/tmp

umask 022

*****************************************************************
configure  profile for oracle

export ORACLE_SID=orclasm
export ORACLE_UNQNAME=orcl
export JAVA_HOME=/usr/local/java
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
#export ORACLE_PATH=/app/common/oracle/sql
#export SQLPATH=/app/common/oracle/sql
export ORACLE_TERM=xterm
#export NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”
#export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS11=$ORACLE_HOME/nls/data
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
#PATH=${PATH}:/app/common/oracle/bin
export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH

export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp

umask 022

*****************************************************************

[root@oradbasm ~]#
mkdir   /oraInventory
mkdir   /gridbase
mkdir  /oracle
mkdir /grid

chown   -R grid:oinstall        /grid
chown   -R grid:oinstall        /gridbase
chown   -R  oracle:oinstall     /oracle
chown   -R grid:oinstall        /oraInventory

chmod -R 775     /grid
chmod -R 775     /oracle

*****************************************************************
a)Install ASMLib package  in all nodes  by root

for Oracle Linux
# rpm  -Uvh oracleasmlib-2.0.4-1.el6.x86_64.rpm

for redhat and centos or other linux
# yum localinstall kernel-debug-2.6.32-358.23.2.el6.x86_64.    rpm kmod-oracleasm-2.0.6.rh1-2.el6.x86_64.rpm
# rpm -ivh oracleasm-support-2.1.8-1.el6.x86_64.rpm

b)Configure ASMLib using the following command  in all nodes

[root@oradbasm /]# oracleasm configure -i

Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [y]: Y
Scan for Oracle ASM disks on boot (y/n) [y]: Y
Writing Oracle ASM library driver configuration: done

c) load the kernel modual using the following command in all nodes

[root@oradbasm software]# oracleasm init

*****************************************************************
Configure ASM disk groups  by root  on node (rac1)
for watching partitions:
[root@oradbasm ~]# fdisk -l

Disk /dev/sdd: 1073 MB, 1073741824 bytes
۲۵۵ heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

for example  there are below devices :
/dev/sdc , /dev/sdd, /dev/sde,/dev/sdf, /dev/sdg, /dev/sdh, /dev/sdi, /dev/sdj, /dev/sdk

[root@oradbasm ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. 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)

Command (m for help): p

Disk /dev/sdc: 1073 MB, 1073741824 bytes
۲۵۵ heads, 63 sectors/track, 130 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-130, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-130, default 130):
Using default value 130

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Repeate create partition for another device like 12-1

For reusing a disk you should formatting exists device.Use command below for all devices  including (/dev/sdd1,/dev/sde1,/dev/sdf1,/dev/sdg1,/dev/sdf1,/dev/sdi1)

[root@oradbasm ~]# dd   if=/dev/zero of=/dev/sdc1 bs=8192 count=10000

****************************************************************
Create diskgroup  for ASM   in  olny node1
create diskgroup for OCR and Voting disk

[root@oradbasm ~]# oracleasm createdisk ocr1 /dev/sdc1
[root@oradbasm ~]# oracleasm createdisk ocr2 /dev/sdd1
[root@oradbasm ~]# oracleasm createdisk ocr3 /dev/sde1
[root@oradbasm ~]# oracleasm createdisk ocr4 /dev/sdf1
[root@oradbasm ~]# oracleasm createdisk ocr5 /dev/sdg1

[root@oradbasm ~]# oracleasm createdisk DATA1 /dev/sdh1
[root@oradbasm ~]# oracleasm createdisk DATA2 /dev/sdi1

[root@oradbasm ~]# oracleasm createdisk FAR2 /dev/sdj1
[root@oradbasm ~]# oracleasm createdisk FAR3 /dev/sdk1
[root@oradbasm ~]# oracleasm createdisk FAR1 /dev/sdl1

[root@oradbasm ~]# oracleasm scandisks
[root@oradbasm ~]# oracleasm listdisks

Scan disks in another nodes

[root@oradbasm ~]# oracleasm scandisks

[root@oradbasm ~]# oracleasm listdisks

For seeing which disk belongs to diskgroup:

[root@oradbasm]# oracleasm listdisks | xargs oracleasm querydisk -p

*****************************************************************
Download Software www.oracle.com

Download the Oracle software from OTN or MOS depending on your support status.

OTN: Oracle Database 11g Release 2 (11.2.0.1) Software (64-bit) – For unsupported installation.
MOS: Oracle Database 11g Release 2 (11.2.0.4) Software (64-bit) – For supported installation.

The files.

# ۱۱٫۲٫۰٫۱
linux.x64_11gR2_database_1of2.zip
linux.x64_11gR2_database_2of2.zip
linux.x64_11gR2_database_3of2.zip

#۱۱٫۲٫۰٫۲
p10098816_112020_Linux-x86-64_1of7.zip
p10098816_112020_Linux-x86-64_2of7.zip
p10098816_112020_Linux-x86-64_3of7.zip

#۱۱٫۲٫۰٫۳
p10404530_112030_Linux-x86-64_1of7.zip
p10404530_112030_Linux-x86-64_2of7.zip
p10404530_112030_Linux-x86-64_3of7.zip

#۱۱٫۲٫۰٫۴
p13390677_112040_Linux-x86-64_1of7.zip
p13390677_112040_Linux-x86-64_2of7.zip
p13390677_112040_Linux-x86-64_3of7.zip

[root@oradbasm ]# chmod 775 -R /software
[root@oradbasm ]# cd  /software
[root@oradbasm software ]# unzip p13390677_112040_Linux-x86-64_1of7.zip
[root@oradbasm software ]# unzip p13390677_112040_Linux-x86-64_2of7.zip
[root@oradbasm software ]# unzip p13390677_112040_Linux-x86-64_3of7.zip

[root@oradbasm ]# chown grid:oinstall  -R  /software/grid
[root@oradbasm ]# chown oracle:oinstall  -R  /software/database

In graphical mode
delete of files in  /tmp in all nodes
[root@oradbasm ~]# cd /tmp
[root@oradbasm ~]# rm -rf *

ready for installing
[root@oradbasm ~]# xhost +
[root@oradbasm ~]# su – grid
[grid@rac1 ~]$ cd /software/grid/
[grid@rac1 grid]$ ./runInstaller

a)  Select “Install and Configure Grid Infrastructure for a Cluster”

b) Select “Advanced Installation”

c) Select languaage and click next

d)  Cluster Name: rac-cluster
SCAN Name : rac-scan.example.com
SACN Port: 1521
uncheck Configure GNS

e) click “Add” button and then
Hostname: rac2.example.com
Virtual IP Name : rac2-vip.example.com

f) click   “SSH Connectivity” button
OS Password for grid: ********

g) click “Setup”  button you should see message below:
“Successfully established password SSH connectivity between the selected nodes” and the click Next
if you see an error please change password for grid’s user in all nodes and then try again. for changing passwod use command below:

[root@oradbasm ~]# passwd grid
Changing password for user grid.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

h)  you should see like below:

Interface Name              Subnet                Interface Type
——————————————————————————
eth0                            ۱۰٫۰٫۰                  Public
eth1                            ۱۹۲٫۱۶۸٫۰٫۰           Private

i) Select “Automatic Storage Management (ASM)”

j) Disk Group Name: CRS
Redundancy: External
Disk Path choose : ORCL:CRS1  and ORCL:CRS2
if you have problem to watching disks press “Change Disconvery Path” and type  “/dev/oracleasm/*/*” and then press OK;

k)  choose  “Use same passwords for these accounts”.

l)  Select “Do not use Intelligent Platform Management Interface (IPMI)”.

m)  ASM Database Administrator(OSDBA) Group : asmdba
ASM Instance Administrator Operator (OSOPER) Group : asmoper
ASM Instance Administrator (OSASM) Group: asmadmin

n) Oracle Base       : /grid
Software Location: /grid/product/11.2.0/grid

o)   Inventory Directory: /oraInventory
oraInventory Group Name: oinstall

p)  The installer will run through a series of checks to determine if both Oracle RAC nodes meet the minimum requirements for installing and configuring the Oracle Clusterware and Automatic Storage Management software.

Starting with Oracle Clusterware 11g release 2 (11.2), if any checks fail, the installer (OUI) will create shell script programs, called fixup scripts, to resolve many incomplete system configuration requirements. If OUI detects an incomplete task that is marked “fixable”, then you can easily fix the issue by generating the fixup script by clicking the [Fix & Check Again] button.

The fixup script is generated during installation. You will be prompted to run the script as root in a separate terminal session. When you run the script, it raises kernel values to required minimums, if necessary, and completes other operating system configuration tasks.

If all prerequisite checks pass (as was the case for my install), the OUI continues to the Summary screen
if you are installing RAC on VMWare and see error for  “Physical Memory” and  “Swap Szie” check “Ingnore All” and then click Next

q) you will be see this error:
“Device checks for ASM”
this is a bug you should use patch number 9974223, first choose “Ignore All” and countinue to istall.

r)  *************************  it’s important, you should patch grid infrastructure  ***********************

Before you run script by root it show in “Execute Configuration Script” you should  install path number 9974223.

download patch number 9974223: Grid infrastructure  needs Multicast  communication on 230.0.1.0  addresses working and copy it to /software and unzip it.

۱) [root@oradbasm ]# /oraInventory/orainstRoot.sh
۲) [root@rac2 ]# /oraInventory/orainstRoot.sh
۲) [root@oradbasm]#su – grid
۳) [grid@rac1]$ cd /software/9974223

run it command below only from one node:

۴) [grid@rac1 9974223]$   $ORACLE_HOME/OPatch/opatch   napply  -local   -oh   $ORACLE_HOME   -id   ۹۹۷۴۲۲۳

for any question you answer yes. At the end, you should see “OPatch succeeded.”

for checking patch applied use command below.This should list the components the list of nodes.
If the Oracle inventory is not setup correctly this utility will fail.

۵) [grid@rac1 9974223]$ /grid/product/11.2.0/grid/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME

۶) [root@oradbasm]#  /grid/product/11.2.0/grid/root.sh

۷) [root@rac2]# /grid/product/11.2.0/grid/root.sh

*******************************  step 18  **********************************

a) Postinstallation Tasks for Oracle Grid Infrastructure for a Cluster
Verify Oracle Clusterware Installation
Run the following commands on all nodes in the RAC cluster as the grid user.

[grid@rac1 ~]$ crsctl check crs

CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

[grid@rac2 ~]$ crsctl check crs

b) Check Clusterware Resources

[grid@rac1 ~]$ crs_stat -t -v

Name           Type           R/RA   F/FT   Target    State     Host
———————————————————————-
ora.CRS.dg     ora….up.type 0/5    ۰/     ONLINE    ONLINE    rac1
ora….ER.lsnr ora….er.type 0/5    ۰/     ONLINE    ONLINE    rac1
ora….N1.lsnr ora….er.type 0/5    ۰/۰    ONLINE    ONLINE    rac1
ora.asm        ora.asm.type   ۰/۵    ۰/     ONLINE    ONLINE    rac1
ora.eons       ora.eons.type  ۰/۳    ۰/     ONLINE    ONLINE    rac1
ora.gsd        ora.gsd.type   ۰/۵    ۰/     OFFLINE   OFFLINE
ora….network ora….rk.type 0/5    ۰/     ONLINE    ONLINE    rac1
ora.oc4j       ora.oc4j.type  ۰/۵    ۰/۰    OFFLINE   OFFLINE
ora.ons        ora.ons.type   ۰/۳    ۰/     ONLINE    ONLINE    rac1
ora….SM1.asm application    ۰/۵    ۰/۰    ONLINE    ONLINE    rac1
ora….C1.lsnr application    ۰/۵    ۰/۰    ONLINE    ONLINE    rac1
ora.rac1.gsd   application    ۰/۵    ۰/۰    OFFLINE   OFFLINE
ora.rac1.ons   application    ۰/۳    ۰/۰    ONLINE    ONLINE    rac1
ora.rac1.vip   ora….t1.type 0/0    ۰/۰    ONLINE    ONLINE    rac1
ora….SM2.asm application    ۰/۵    ۰/۰    ONLINE    ONLINE    rac2
ora….C2.lsnr application    ۰/۵    ۰/۰    ONLINE    ONLINE    rac2
ora.rac2.gsd   application    ۰/۵    ۰/۰    OFFLINE   OFFLINE
ora.rac2.ons   application    ۰/۳    ۰/۰    ONLINE    ONLINE    rac2
ora.rac2.vip   ora….t1.type 0/0    ۰/۰    ONLINE    ONLINE    rac2
ora….ry.acfs ora….fs.type 0/5    ۰/     ONLINE    ONLINE    rac1
ora.scan1.vip  ora….ip.type 0/0    ۰/۰    ONLINE    ONLINE    rac1

c) Check Cluster Nodes

[grid@rac1 ~]$ olsnodes -n
rac1    ۱
rac2    ۲

d) Check Oracle TNS Listener Process on Both Nodes
in  node 1:
[grid@rac1 ~]$ ps -ef | grep lsnr | grep -v ‘grep’ | grep -v ‘ocfs’ | awk ‘{print $9}’
LISTENER
LISTENER_SCAN2

in node 2

[grid@rac2 ~]$  ps -ef | grep lsnr | grep -v ‘grep’ | grep -v ‘ocfs’ | awk ‘{print $9}’
LISTENER
LISTENER_SCAN1

e) Confirming Oracle ASM Function for Oracle Clusterware Files

[grid@rac1 ~]$ srvctl status asm -a
ASM is running on rac1,rac2
ASM is enabled.

e) Check Oracle Cluster Registry (OCR)

[grid@rac1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version                  :          ۳
Total space (kbytes)     :     ۲۶۲۱۲۰
Used space (kbytes)      :       ۲۴۰۴
Available space (kbytes) :     ۲۵۹۷۱۶
ID                       : ۱۴۶۴۵۴۵۳۸۸
Device/File Name         :       +CRS
Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check bypassed due to non-privileged user

f) Check Voting Disk

[grid@rac1 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                                  File Name          Disk group
—  —–    —————–                                            ————–       —————-
۱٫ ONLINE   ۲۱۵d460cae824ff3bf930f98c9c5d02c         (ORCL:CRS1)    [CRS]
۲٫ ONLINE   ۲۰c0116dc7f34f8dbfe33f0018d84234         (ORCL:CRS2)    [CRS]
۳٫ ONLINE   ۶۹۲abcd025f24fe7bf5ca372103e928c         (ORCL:CRS3)    [CRS]
Located 3 voting disk(s).

*******************************  step 19  **********************************

-Back Up the root.sh Script
Oracle recommends that you back up the root.sh script after you complete an installation. If you install other products in the same Oracle home directory, then the installer updates the contents of the existing root.sh script during the installation. If you require information contained in the original root.sh script, then you can recover it from the root.sh file copy.

Back up the root.sh file on both Oracle RAC nodes as root:

[root@oradbasm ~]# cd /grid/product/11.2.0/grid
[root@oradbasm grid]# cp root.sh  root.sh.rac1.AFTER_INSTALL

[root@rac2 ~]# cd /grid/product/11.2.0/grid/
[root@rac2 grid]# cp root.sh root.sh.rac2.AFTER_INSTALL

*******************************  step 20  **********************************

a)Install Cluster Health Management Software – (Optional)

b) Create ASM Disk Groups for Data and Fast Recovery Area  in one node
in graphical mode run commands below

[root@oradbasm ~]# xhost +
[root@oradbasm ~]# su – grid
[root@oradbasm ~]#  asmca

a) For creating DATA disk group, From the “Disk Groups” tab, click the “Create” button.
Disk Group Name: DATA
Redundancy  : External
Select Member Disks: ORCL:DATA1 ,ORCL:DATA2, ORCL:DATA3, ORCL:DATA4
click [OK] button

b)  for creating FRA(Flash Recovery Area) disk group, From the “Disk Groups” tab, click the “Create” button.
Disk Group Name: FRA
Redundancy  : External
Select Member Disks: ORCL:FRA1 , ORCL:FRA2, ORCL:FRA3
click [OK] button

*******************************  step 21  **********************************
a) Install Oracle Database 11g with Oracle Real Application Clusters
in graphical mode :

[root@oradbasm ~]# xhost +
[root@oradbasm ~]# cd   /software/database
[root@oradbasm ~]# ./runInstaller

b)
Email: don’t fill anything
un-check “I wish to receive security updates via My Oracle Support.”
click Next

c)
in dialog shows you “You have not provided an email address.”
click “Yes”

d)
choose “Skip software updates” and then click “Next”

e)
choose “Install database software only”

f)
Select  “Oracle Real Application Clusters database installation” radio button (default) and verify that both Oracle RAC nodes are     checked in the “Node Name” window.

g) click [SSH Connectivity]

h) OS Password: password for oracle’s user

i) click [Setup] button

j) After the SSH configuration process successfully completes, acknowledge the dialog box.
Finish  this screen by clicking the [Test] button to verify passwordless SSH connectivity.
click [Next]

k)
select language and the click [Next]

l)
Select “Enterprise Edition”.

m)
Oracle Base: /oracle
Software Location: /oracle/product/11.2.0/db_1

n)
Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oper

o)
click “Install” button.

p)
Run the root.sh script on all nodes in the RAC cluster:

[root@oradbasm ~]# /oracle/product/11.2.0/db_1/root.sh

[root@rac2 ~]# /oracle/product/11.2.0/db_1/root.sh

then click [OK] button and then  click [Close] button.

*******************************  step 22  **********************************

Create the Clustered Database
[oracle@rac1 ~]$ dbca

a) Welcome Screen
Select “Oracle Real Application Clusters database.”

b)
Select “Create a Database.”

c)
select “General Purpose or Transaction Processing”

d)
Configuration Type: Policy-Managed
Global Database Name: orcl.example.com
Server Pool  Name: orclpool
Cardinality: 2

click “Next”

e)
tab “Enterprise Manager”:
checed “Configure Enterprise Manager”
don’t change for “Configure Database Control for local management”

tab “Automatic Maintenance Task”
checked “Enable automatic maintenance tasks”

click “Next”

f)
I selected to “Use the Same Administrative Password for All Accounts”  Enter the password (twice) and make sure the password does not start with a digit number.

g)
Specify storage type and locations for database files.

Storage Type: Automatic Storage Management (ASM)
Storage Locations: Use Oracle-Managed Files
Database Area: +DATA

h) Specify the ASMSNMP password for the ASM instance.

i)
-Check the option for Specify Fast Recovery Area.
-For the Fast Recovery Area, click the [Browse] button and select the disk group name +FRA.
-My disk group has a size of about 3057MB. When defining the Fast Recovery Area size, use the entire volume minus 10% for     overhead \97 (3057-10%=2751 MB). I used a Fast Recovery Area Size of 30 GB    (۳۰۴۱۳ MB).
-check the option “Enable Archive”
-click “Edit Archive Mode Parameters”

j) Archive Log Destinations: LOCATION=+FRA
k) click [OK] button