Thursday, January 3, 2013

2 Install Oracle 11gR2 on Oracle Linux 6.3 with ASM

 

 Software

  • Oracle Linux 6.3
  • Virtual Box4.2.6
  • Oracle Grid 11.2.0.1
  • Oracle 11gR2( 11.2.0.1)

 Install the Oracle Linux on Virtual Box

Refer here.

Configure Hosts Name

/etc/hosts and /etc/sysconfig/network must have the host name.

image

Configure Kernel Parameter and number of open file descriptor

Refer here for the Oracle Requirement and here for how to fix kernel parameters.

 

Install ASM package

 

  • ASM Kernel: Part of the Oracle Linux Kernel ( UEK). Can be upgrade from Oracle public yum repository. Part of Oracle Linux installation media.
  • ASM support: Can be upgrade from Oracle public yum repository. Part of Oracle Linux installation media.
  • ASM lib: Only can be download from Oracle side.

Kernel 2.6.39-300.17.3.el6uek will break the Virtual Box Guest Additions.

rpm -Uvh oracleasmlib-2.0.4-1.el6.x86_64.rpm
yum install oracleasm-support

image

image

Create user/group

groupadd dba
useradd grid -g dba
useradd oracle -g dba
# set password
passwd grid
passwd oracle

image

Create Software installation folders

  • /u01/app/oracle –> for $ORACLE_BASE for Oracle Database instance
  • /u01/app/grid –> for $ORACLE_BASE for ASM instance
  • /u01/app/11.2.0/grid –> for $ORACLE_HOME for ASM instance

 

mkdir -p /u01/app/grid
mkdir -p /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle
 
chown -R grid:dba /u01
chown -R oracle:dba /u01/app/oracle

image

Configure oracle User profile

~oracle/.bash_profile

TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
 
ORACLE_HOSTNAME=RAC1.localdomain; export ORACLE_HOSTNAME
ORACLE_UNQNAME=RAC; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/grid; export ORACLE_BASE
GRID_HOME=/u01/app/11.2.0/grid; export GRID_HOME
DB_HOME=/u01/app/oracle/product/11.2.0/db_1; export DB_HOME
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

~oracle/.bashrc

alias grid_env='. /home/oracle/grid_env'
alias db_env='. /home/oracle/db_env'

 

~oracle//grid_env

ORACLE_SID=+ASM1; export ORACLE_SID
ORACLE_HOME=$GRID_HOME; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

~oracle//db_env

ORACLE_SID=RAC1; export ORACLE_SID
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_BASE==/u01/app/oracle; export ORACLE_BASE
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

 

Configure ASM

/etc/init.d/oracleasm configure

image

Use chkconfig to check whether oracleasm service is set to start up automatically. and also check the /etc/rc.*/

image

Add Disk to VM

"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename D:\VirtualBoxVM\OEL63\ASM_1.vdi --size 5120 --format VDI --variant Fixed
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename D:\VirtualBoxVM\OEL63\ASM_2.vdi --size 5120 --format VDI --variant Fixed
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename D:\VirtualBoxVM\OEL63\ASM_3.vdi --size 5120 --format VDI --variant Fixed
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" createhd --filename D:\VirtualBoxVM\OEL63\ASM_4.vdi --size 5120 --format VDI --variant Fixed
 
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach OEL63 --storagectl "SATA" --port 1 --device 0 --type hdd --medium D:\VirtualBoxVM\OEL63\ASM_1.vdi
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach OEL63 --storagectl "SATA" --port 2 --device 0 --type hdd --medium D:\VirtualBoxVM\OEL63\ASM_2.vdi
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach OEL63 --storagectl "SATA" --port 3 --device 0 --type hdd --medium D:\VirtualBoxVM\OEL63\ASM_3.vdi
"C:\program Files\Oracle\VirtualBox\VBoxManage.exe" storageattach OEL63 --storagectl "SATA" --port 4 --device 0 --type hdd --medium D:\VirtualBoxVM\OEL63\ASM_4.vdi
 

image

image

Partition Disks

All Disks needed to be partition first. Refer here.

image

Create ASM Disk

Disk needs to be partition first before we use oracleasm.

# list all the disks
fdisk -l
oracleasm createdisk DISK_NAME DEVICE_NAME

 

image

oracleasm listdisks

image

oracleasm querydisk /dev/sdb1

image

Remove the ASM disk

oracleasm deletedisk DISK_NAME

image_thumb[22]

Installing the oracle-rdbms-server-11gR2-preinstall RPM

 

 yum install oracle-rdbms-server-11gR2-preinstall

 

Refer here.

Install the Grid Infrastructure

Login as ‘grid’ user and Make sure the Below environment variables before execute the runInstaller .

  • $ORACLE_HOME
  • $ORACLE_BASE
  • $ORACLE_SID

image

Execute ./runInstaller

Select “Install and Configure Grid Infrastructure for a standalone Server”

image

image

Name the disk group as DATA group.

Redundancy:

    • High: Similar to RAID 5. Require 3 disks.
    • Normal: Similar to RAID 1. Require 2 disks.
    • External: Single Disk. Rely on 3rd party vendor software to provide the redundancy.

image

Create the SYS and ASMSNMP password. If it does not meet Oracle recommendation, the installer will give the warming.

image

 

image

If OSDBA,OSPER and OSASM are using the same group, the installer would give the warming but wont affect the installation.

image

image

image

Use yum or rpm to install the missing packages. However, the 11.2.0 installer does not recognize the newer version of package therefore, if the system already has the newer version of the packages, it can be ignore. Below screenshot lists the common packages that can be ignore due to the installer does not recognize the newer package. 

  • “pdksh” can be ignore as ksh has taken its place by  “oracle-rdbms-server-11gR2-preinstall”.
  • i386 packages has been replace by the i686 correspond packages.  Only need to make sure the i686 packages installed.

 

 

image

yum list PACKAGE_NAME
yum install PACKAGE_NAME

image

image

image

image

image

Root.sh would fail to execute at Linux 6.3. The solution is here.

Install Oracle Database

Login as ‘oracle’ user and Make sure the Below environment variables before execute the runInstaller .

  • $ORACLE_HOME
  • $ORACLE_BASE
  • $ORACLE_SID

image

Execute runinstaller

image

image

image

image

image

image

image

image

image

image

dbhome,oraenv and coreenv are already exist as part of grid infrastructure installation . Those files are identical.

image

image

 

Create Oracle Database with DBCA.

image

image

image

image

image

image

image

image

Need to provide the ASMNMP password.

image

image

image

image

image

image

image

image

image

image

 

Reference

2 comments:

  1. Database means to maintain and organize all the files in a systematic format where the data can be easily accessible when needed.
    Oracle DBA training in chennai | Oracle training in chennai | Oracle course in Chennai

    ReplyDelete
  2. Much obliged to you for requiring significant investment to give us a portion of the valuable and restrictive data with us.
    Thanks,
    Oracle Training | Oracle Training institute in Chennai | Best Oracle Training institute in Chennai

    ReplyDelete

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates