d-h-n.de
Blog about Oracle, Linux..

Install Oracle 11g Release 2 Grid Infrastructure for standalone server on VMWare

September 25th, 2009 . by admin

What is Oracle Grid Infrastructure for a Standalone Server?

The grid infrastructure for a standalone server provides the infrastructure to include your single instance database in an enterprise grid architecture. Oracle Database 11g Release 2 (11.2) combines these infrastructure products into one software installation called the grid infrastructure home. On a single instance database, the grid infrastructure home includes Oracle Restart and Automatic Storage Management (ASM) software.

 

Here is my test install the new feature of Oracle 11g Release 2 on VMWare

 

Oracle 11gR2 Infrastructure
Oracle 11g Release 2 Infrastructure for standalone server
Steps to setup

 

Create a VM machine

First you can create a VM machine like this:


Standalone server with
Oracle 11g Release 2
Grid Infrastructure
VM Guest Name OEL53_11gR2
OS OELinux 5.3
Memory 1024 MB
Hard Disk 1(sda) 20 GB
Hard Disk 2(sdb) 3 GB
Hard Disk 3(sdc) 3 GB
NIC1 – Bridget – eth0 192.168.1.10
NIC2 – NAT – eth1 DHCP dynamic
Subnet Mask 255.255.255.0
Gateway 192.168.1.1
Host name pc1.localdomain

more: How to create a VM machine

 

Setup yum using Oracle public yum server
 

Download public-yum-el5.repo

[root@pc1 ~]# cd /etc/yum.repos.d/
[root@pc1 yum.repos.d]# wget http://public-yum.oracle.com/public-yum-el5.repo
--00:04:05--  http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1633 (1.6K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[====================================================>] 1,633       --.-K/s   in 0s

00:04:05 (71.3 MB/s) - `public-yum-el5.repo' saved [1633/1633]
[root@pc1 yum.repos.d]# ls public-yum-el5.repo
public-yum-el5.repo

Open file public-yum-el5.repo with vi or gedit, change all lines ‘enabled=0′ to ‘enabled=1′
 

[el5_ga_base]
name=Enterprise Linux $releasever GA - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

[el5_u1_base]
name=Enterprise Linux $releasever U1 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=1

....etc...

 

 

 

Install Oracle Validated RPM

Download
[root@pc1 ~]# cd /tmp
[root@pc1 tmp]# wget http://oss.oracle.com/el5/oracle-validated/oracle-validated-1.0.0-18.el5.i386.rpm
--00:07:22--  http://oss.oracle.com/el5/oracle-validated/oracle-validated-1.0.0-18.el5.i386.rpm
Resolving oss.oracle.com... 141.146.12.120
Connecting to oss.oracle.com|141.146.12.120|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14889 (15K) [application/x-rpm]
Saving to: `oracle-validated-1.0.0-18.el5.i386.rpm'

100%[====================================================>] 14,889      28.0K/s   in 0.5s

00:07:23 (28.0 KB/s) - `oracle-validated-1.0.0-18.el5.i386.rpm' saved [14889/14889]

[root@pc1 tmp]# ls -l oracle-validated-1.0.0-18.el5.i386.rpm
-rw-r--r-- 1 root root 14889 Mar 30 10:36 oracle-validated-1.0.0-18.el5.i386.rpm
[root@pc1 tmp]#
Install
[root@pc1 tmp]# yum install oracle-validated-1.0.0-18.el5.i386.rpm
Loaded plugins: security
el5_oracle_addons                                                     |  951 B     00:00
primary.xml.gz                                                        | 1.6 kB     00:00
el5_oracle_addons                                              10/10
el5_u3_base                                                           | 1.1 kB     00:00
primary.xml.gz                                                        | 788 kB     00:05
el5_u3_base                                                    3442/3442
el5_u1_base                                                           | 1.1 kB     00:00
primary.xml.gz                                                        | 747 kB     00:04
el5_u1_base                                                    3272/3272
el5_ga_base                                                           | 1.1 kB     00:00
primary.xml.gz                                                        | 720 kB     00:06
el5_ga_base                                                    3204/3204
el5_u4_base                                                           | 1.1 kB     00:00
primary.xml.gz                                                        | 807 kB     00:05
el5_u4_base                                                    3506/3506
el5_addons                                                            |  951 B     00:00
primary.xml.gz                                                        |  34 kB     00:00
el5_addons                                                     136/136
el5_u2_base                                                           | 1.1 kB     00:00
primary.xml.gz                                                        | 910 kB     00:05
el5_u2_base                                                    3402/3402
Setting up Install Process
Parsing package install arguments
Examining oracle-validated-1.0.0-18.el5.i386.rpm: oracle-validated-1.0.0-18.el5.i386
Marking oracle-validated-1.0.0-18.el5.i386.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracle-validated.i386 0:1.0.0-18.el5 set to be updated
--> Processing Dependency: compat-db for package: oracle-validated
--> Processing Dependency: compat-gcc-34 for package: oracle-validated
--> Processing Dependency: compat-gcc-34-c++ for package: oracle-validated
--> Processing Dependency: elfutils-libelf-devel for package: oracle-validated
--> Processing Dependency: gcc for package: oracle-validated
--> Processing Dependency: gcc-c++ for package: oracle-validated
--> Processing Dependency: gdb for package: oracle-validated
--> Processing Dependency: glibc-devel for package: oracle-validated
--> Processing Dependency: glibc-headers for package: oracle-validated
--> Processing Dependency: kernel-headers for package: oracle-validated
--> Processing Dependency: libXp for package: oracle-validated
--> Processing Dependency: libaio-devel for package: oracle-validated
--> Processing Dependency: libstdc++-devel for package: oracle-validated
--> Processing Dependency: sysstat for package: oracle-validated
--> Processing Dependency: unixODBC for package: oracle-validated
--> Processing Dependency: unixODBC-devel for package: oracle-validated
--> Running transaction check
---> Package libaio-devel.i386 0:0.3.106-3.2 set to be updated
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package unixODBC-devel.i386 0:2.2.11-7.1 set to be updated
---> Package elfutils-libelf-devel.i386 0:0.137-3.el5 set to be updated
--> Processing Dependency: elfutils-libelf-devel-static-i386 = 0.137-3.el5
     for package: elfutils-libelf-devel
---> Package compat-gcc-34-c++.i386 0:3.4.6-4 set to be updated
---> Package libstdc++-devel.i386 0:4.1.2-46.el5 set to be updated
filelists.xml.gz                                                      | 3.1 kB     00:00
filelists.xml.gz                                                      | 2.5 MB     00:15
filelists.xml.gz                                                      | 2.3 MB     00:17
filelists.xml.gz                                                      | 2.2 MB     00:16
filelists.xml.gz                                                      | 2.5 MB     00:17
filelists.xml.gz                                                      |  54 kB     00:01
filelists.xml.gz                                                      | 2.6 MB     00:12
--> Processing Dependency: libstdc++ = 4.1.2-46.el5 for package: libstdc++-devel
---> Package compat-db.i386 0:4.2.52-5.1 set to be updated
---> Package gcc-c++.i386 0:4.1.2-46.el5 set to be updated
---> Package compat-gcc-34.i386 0:3.4.6-4 set to be updated
---> Package sysstat.i386 0:7.0.2-3.el5 set to be updated
---> Package gdb.i386 0:6.8-37.el5 set to be updated
---> Package glibc-devel.i386 0:2.5-42 set to be updated
--> Processing Dependency: glibc = 2.5-42 for package: glibc-devel
---> Package glibc-headers.i386 0:2.5-42 set to be updated
---> Package kernel-headers.i386 0:2.6.18-164.el5 set to be updated
---> Package unixODBC.i386 0:2.2.11-7.1 set to be updated
---> Package gcc.i386 0:4.1.2-46.el5 set to be updated
--> Processing Dependency: cpp = 4.1.2-46.el5 for package: gcc
--> Processing Dependency: libgcc >= 4.1.2-46.el5 for package: gcc
--> Processing Dependency: libgomp >= 4.1.2-46.el5 for package: gcc
--> Running transaction check
---> Package libstdc++.i386 0:4.1.2-46.el5 set to be updated
---> Package cpp.i386 0:4.1.2-46.el5 set to be updated
---> Package glibc.i686 0:2.5-42 set to be updated
--> Processing Dependency: glibc-common = 2.5-42 for package: glibc
--> Processing Dependency: glibc = 2.5-34 for package: nscd
---> Package elfutils-libelf-devel-static.i386 0:0.137-3.el5 set to be updated
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
---> Package libgcc.i386 0:4.1.2-46.el5 set to be updated
--> Running transaction check
---> Package glibc-common.i386 0:2.5-42 set to be updated
---> Package nscd.i386 0:2.5-42 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
 Package                Arch  Version          Repository                               Size
=============================================================================================
Installing:
 oracle-validated       i386  1.0.0-18.el5     oracle-validated-1.0.0-18.el5.i386.rpm   15 k
Updating:
 cpp                    i386  4.1.2-46.el5     el5_u4_base                             2.7 M
 glibc                  i686  2.5-42           el5_u4_base                             5.2 M
 glibc-common           i386  2.5-42           el5_u4_base                              16 M
 libgcc                 i386  4.1.2-46.el5     el5_u4_base                              94 k
 libstdc++              i386  4.1.2-46.el5     el5_u4_base                             362 k
 nscd                   i386  2.5-42           el5_u4_base                             162 k
Installing for dependencies:
 compat-db              i386  4.2.52-5.1       el5_u3_base                             1.7 M
 compat-gcc-34          i386  3.4.6-4          el5_u3_base                             4.1 M
 compat-gcc-34-c++      i386  3.4.6-4          el5_u3_base                              11 M
 elfutils-libelf-devel  i386  0.137-3.el5      el5_u3_base                              24 k
 elfutils-libelf-devel-static
                        i386  0.137-3.el5      el5_u3_base                              66 k
 gcc                    i386  4.1.2-46.el5     el5_u4_base                             5.2 M
 gcc-c++                i386  4.1.2-46.el5     el5_u4_base                             3.4 M
 gdb                    i386  6.8-37.el5       el5_u4_base                             3.4 M
 glibc-devel            i386  2.5-42           el5_u4_base                             2.0 M
 glibc-headers          i386  2.5-42           el5_u4_base                             614 k
 kernel-headers         i386  2.6.18-164.el5   el5_u4_base                             1.0 M
 libXp                  i386  1.0.0-8.1.el5    el5_u3_base                              22 k
 libaio-devel           i386  0.3.106-3.2      el5_u3_base                              11 k
 libgomp                i386  4.4.0-6.el5      el5_u4_base                              70 k
 libstdc++-devel        i386  4.1.2-46.el5     el5_u4_base                             2.9 M
 sysstat                i386  7.0.2-3.el5      el5_u3_base                             170 k
 unixODBC               i386  2.2.11-7.1       el5_u3_base                             830 k
 unixODBC-devel         i386  2.2.11-7.1       el5_u3_base                             743 k

Transaction Summary
=============================================================================================
Install     19 Package(s)
Update       6 Package(s)
Remove       0 Package(s)

Total download size: 62 M
Is this ok [y/N]: y
Downloading Packages:
(1/24): libaio-devel-0.3.106-3.2.i386.rpm                             |  11 kB     00:00
(2/24): libXp-1.0.0-8.1.el5.i386.rpm                                  |  22 kB     00:00
(3/24): elfutils-libelf-devel-0.137-3.el5.i386.rpm                    |  24 kB     00:00
(4/24): elfutils-libelf-devel-static-0.137-3.el5.i386.rpm             |  66 kB     00:01
(5/24): libgomp-4.4.0-6.el5.i386.rpm                                  |  70 kB     00:01
(6/24): libgcc-4.1.2-46.el5.i386.rpm                                  |  94 kB     00:01
(7/24): nscd-2.5-42.i386.rpm                                          | 162 kB     00:01
(8/24): sysstat-7.0.2-3.el5.i386.rpm                                  | 170 kB     00:01
(9/24): libstdc++-4.1.2-46.el5.i386.rpm                               | 362 kB     00:04
(10/24): glibc-headers-2.5-42.i386.rpm                                | 614 kB     00:06
(11/24): unixODBC-devel-2.2.11-7.1.i386.rpm                           | 743 kB     00:05
(12/24): unixODBC-2.2.11-7.1.i386.rpm                                 | 830 kB     00:05
(13/24): kernel-headers-2.6.18-164.el5.i386.rpm                       | 1.0 MB     00:09
(14/24): compat-db-4.2.52-5.1.i386.rpm                                | 1.7 MB     00:09
(15/24): glibc-devel-2.5-42.i386.rpm                                  | 2.0 MB     00:13
(16/24): cpp-4.1.2-46.el5.i386.rpm                                    | 2.7 MB     00:17
(17/24): libstdc++-devel-4.1.2-46.el5.i386.rpm                        | 2.9 MB     00:16
(18/24): gcc-c++-4.1.2-46.el5.i386.rpm                                | 3.4 MB     00:18
(19/24): gdb-6.8-37.el5.i386.rpm                                      | 3.4 MB     00:31
(20/24): compat-gcc-34-3.4.6-4.i386.rpm                               | 4.1 MB     00:24
(21/24): glibc-2.5-42.i686.rpm                                        | 5.2 MB     00:24
(22/24): gcc-4.1.2-46.el5.i386.rpm                                    | 5.2 MB     00:35
(23/24): compat-gcc-34-c++-3.4.6-4.i386.rpm                           |  11 MB     01:15
(24/24): glibc-common-2.5-42.i386.rpm                                 |  16 MB     01:27
---------------------------------------------------------------------------------------------
Total                                                        154 kB/s |  62 MB     06:51
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Importing GPG key 0x1E5E0159 "Oracle OSS group (Open Source Software group) <build@oss.oracle.com>"
from http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : glibc-common                                    [ 1/31]
  Installing     : kernel-headers                                  [ 2/31]
  Updating       : libgcc                                          [ 3/31]
  Updating       : glibc                                           [ 4/31]
  Updating       : libstdc++                                       [ 5/31]
  Installing     : unixODBC                                        [ 6/31]
  Installing     : compat-db                                       [ 7/31]
  Installing     : gdb                                             [ 8/31]
  Updating       : cpp                                             [ 9/31]
  Installing     : sysstat                                         [10/31]
  Installing     : libgomp                                         [11/31]
  Installing     : libXp                                           [12/31]
  Updating       : nscd                                            [13/31]
  Installing     : libstdc++-devel                                 [14/31]
  Installing     : glibc-headers                                   [15/31]
  Installing     : glibc-devel                                     [16/31]
  Installing     : unixODBC-devel                                  [17/31]
  Installing     : libaio-devel                                    [18/31]
  Installing     : gcc                                             [19/31]
  Installing     : compat-gcc-34                                   [20/31]
  Installing     : compat-gcc-34-c++                               [21/31]
  Installing     : gcc-c++                                         [22/31]
  Installing     : elfutils-libelf-devel                           [23/31]
  Installing     : elfutils-libelf-devel-static                    [24/31]
  Installing     : oracle-validated                                [25/31]
  Cleanup        : cpp                                             [26/31]
  Cleanup        : glibc-common                                    [27/31]
  Cleanup        : libstdc++                                       [28/31]
  Cleanup        : libgcc                                          [29/31]
  Cleanup        : nscd                                            [30/31]
  Cleanup        : glibc                                           [31/31]

Installed: oracle-validated.i386 0:1.0.0-18.el5
Dependency Installed: compat-db.i386 0:4.2.52-5.1 compat-gcc-34.i386 0:3.4.6-4 compat-gcc-34-c++.i386
0:3.4.6-4 elfutils-libelf-devel.i386 0:0.137-3.el5 elfutils-libelf-devel-static.i386 0:0.137-3.el5
gcc.i386 0:4.1.2-46.el5 gcc-c++.i386 0:4.1.2-46.el5 gdb.i386 0:6.8-37.el5 glibc-devel.i386 0:2.5-42
glibc-headers.i386 0:2.5-42 kernel-headers.i386 0:2.6.18-164.el5 libXp.i386 0:1.0.0-8.1.el5
libaio-devel.i386 0:0.3.106-3.2 libgomp.i386 0:4.4.0-6.el5 libstdc++-devel.i386 0:4.1.2-46.el5
sysstat.i386 0:7.0.2-3.el5 unixODBC.i386 0:2.2.11-7.1 unixODBC-devel.i386 0:2.2.11-7.1
Updated: cpp.i386 0:4.1.2-46.el5 glibc.i686 0:2.5-42 glibc-common.i386 0:2.5-42 libgcc.i386
0:4.1.2-46.el5 libstdc++.i386 0:4.1.2-46.el5 nscd.i386 0:2.5-42
Complete!
[root@pc1 tmp]#

more about Install Oracle Validated RPM

 

 

Create user grid and directories

user oracle is created ready by oracle-validated

[root@pc1 ~]# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),501(dba)

 

we create user grid as owner of Infrastructure

[root@pc1 ~]# /usr/sbin/useradd -u 1100 -g oinstall -G dba grid
[root@pc1 ~]# id grid
uid=1100(grid) gid=502(oinstall) groups=502(oinstall),501(dba)

 

Create directories:

[root@pc1 ~]# mkdir -p /u01/app/11.2.0/grid ---> Software Location
[root@pc1 ~]# mkdir -p /u01/app/grid 	    ---> Oracle Base
[root@pc1 ~]# chown -R grid:oinstall /u01

[root@pc1 ~]# mkdir /u01/app/oracle
[root@pc1 ~]# chown oracle:oinstall /u01/app/oracle
[root@pc1 ~]# chmod -R 775 /u01/

 

 

Setup VM Disks for ASM

Steps
Create VM Disks
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\>cd "C:\Program Files\VMware\VMware Workstation"

C:\Program Files\VMware\VMware Workstation>vmware-vdiskmanager.exe -c -s 3Gb -a lsilogic -t 4
M:\VM5\SharedDisks\asm1.vmdk
Creating disk 'M:\VM5\SharedDisks\asm1.vmdk'
  Create: 100% done.
Virtual disk creation successful.

C:\Program Files\VMware\VMware Workstation>vmware-vdiskmanager.exe -c -s 3Gb -a lsilogic -t 4
M:\VM5\SharedDisks\asm2.vmdk
Creating disk 'M:\VM5\SharedDisks\asm2.vmdk'
  Create: 100% done.
Virtual disk creation successful.

more about Virtual Disks

Modify VMX file Shutdown the guest machine, open file VMX with notepad
Location of VMX file for example here D:\MyVM\OEL53_11gR2\OEL53_11gR2.vmx
Append this to end of the file:

# Begin Virtual VM Disks for Oracle
disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"

scsi1.present = "TRUE"
scsi1.virtualDev = "lsilogic"
scsi1.sharedBus = "VIRTUAL"

scsi1:0.present = "TRUE"
scsi1:0.fileName = "M:\VM5\SharedDisks\asm1.vmdk"
scsi1:0.mode = "independent-persistent"
scsi1:0.deviceType = "disk"

scsi1:1.present = "TRUE"
scsi1:1.fileName = "M:\VM5\SharedDisks\asm2.vmdk"
scsi1:1.mode = "independent-persistent"
scsi1:1.deviceType = "disk"

# End Virtual VM Disks for Oracle
Check which disk are available Power on the guest machine again, check if the new disks available

[root@pc1 ~]# ls -l /dev/sd*
brw-r----- 1 root disk 8,  0 Sep 24 09:04 /dev/sda
brw-r----- 1 root disk 8,  1 Sep 24 09:05 /dev/sda1
brw-r----- 1 root disk 8,  2 Sep 24 09:04 /dev/sda2
brw-r----- 1 root disk 8, 16 Sep 24 09:04 /dev/sdb
brw-r----- 1 root disk 8, 32 Sep 24 09:04 /dev/sdc

/sda contents Linux, also /dev/sdb, /dev/sdc are the new disks.

Create partition on device /dev/sdb This step we create partition for the new disks

[root@pc1 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table
[root@pc1 ~]# fdisk /dev/sdb
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): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

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

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@pc1 ~]# fdisk -l /dev/sdb

Disk /dev/sdb: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         391     3140676   83  Linux
[root@pc1 ~]# 
Create partition on device /dev/sdc
[root@pc1 ~]# fdisk -l /dev/sdc

Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdc doesn't contain a valid partition table
[root@pc1 ~]# 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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391): 391

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@pc1 ~]# fdisk -l /dev/sdc

Disk /dev/sdc: 3221 MB, 3221225472 bytes
255 heads, 63 sectors/track, 391 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         391     3140676   83  Linux
[root@pc1 ~]#

 

 

Install Oracle ASMLib 2.0

Steps Actions
Check kernel
[root@pc1 ~]# uname -r
2.6.18-128.el5
Download RPMs Open Page: Oracle ASMLib Downloads for Red Hat Enterprise Linux Server 5
Scroll to: ‘Intel IA32 (x86) Architecture’

and download this RPMs:
oracleasm-support-2.1.3-1.el5.i386.rpm
oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm

[root@pc1 ~]# cd /mnt/hgfs/OSource/Tools/asmlib_download/
[root@pc1 asmlib_download]# ls
oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-support-2.1.3-1.el5.i386.rpm
Install RPMs
[root@pc1 asmlib_download]# rpm -Uvh oracleasm-support-2.1.3-1.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:oracleasm-support      ########################################### [100%]
[root@pc1 asmlib_download]# rpm -Uvh oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm
Preparing...                ########################################### [100%]
   1:oracleasm-2.6.18-128.el########################################### [100%]
[root@pc1 asmlib_download]# rpm -Uvh oracleasmlib-2.0.4-1.el5.i386.rpm
Preparing...                ########################################### [100%]
   1:oracleasmlib           ########################################### [100%]
[root@pc1 asmlib_download]#
Note:

– This is exactly the order to install the ASMLib, else you get Error: "Failed dependencies".
– Be careful with the RPM oracleasm-2.6.18-128.el5-2.0.5-1.el5.i686.rpm.
With wrong RPM, you get problem later when run configure ASM Disk
Initializing the Oracle ASMLib driver: [FAILED]
 

Configure
[root@pc1 ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver.  The following questions will determine whether the driver is
loaded on boot and what permissions it will have.  The current values
will be shown in brackets ('[]').  Hitting  without typing an
answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [  OK  ]
Scanning the system for Oracle ASMLib disks:               [  OK  ]
Create ASM Disks
[root@pc1 ~]# ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sdb  /dev/sdb1  /dev/sdc  /dev/sdc1
[root@pc1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
Marking disk "VOL1" as an ASM disk:                        [  OK  ]
[root@pc1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
Marking disk "VOL2" as an ASM disk:                        [  OK  ]
Verify
[root@pc1 ~]# /etc/init.d/oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
[root@pc1 ~]# /etc/init.d/oracleasm listdisks
VOL1
VOL2

 

 

Install Oracle Grid Infrastructure

 

Download Software

Download Page: http://www.oracle.com/technology/software/products/database/oracle11g/112010_linuxsoft.html
Choose:
   Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for Linux x86
   linux_11gR2_grid.zip (980,831,749 bytes) (cksum – 3583041487)

or direct Link: http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_grid.zip

File: linux_11gR2_grid.zip size 957,844 KB

I downloaded the zip file, unzip it, share using VMWare Shared Folders /mnt/hgfs/OSource/linux_11gR2_grid

 

 

Start runInstaller:

[root@pc1 ~]# xhost +
access control disabled, clients can connect from any host
[root@pc1 ~]# su - grid
[grid@pc1 ~]$ /mnt/hgfs/OSource/linux_11gR2_grid/grid/runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 80 MB.   Actual 14231 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 2047 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-09-24_04-24-35PM. Please wait ...
Screen Action
1.Installation Option Select Install and Configure Grid Infrastructure for a Standalone server
Click Next
2. Product Languages Accept default language English or select other language
Click Next
3.Create ASM Disk Group Disk Group Name: DATA
Redundancy: Normal
Add Disks: select all 2 disks
Click Next
4. ASM Password Select Use same passwords for these accounts
Specify Password: your password
Confirm password again
Click Yes when message: The password entered does not conform to the Oracle recommended standards
5. Operation System Group Accept default.
Click Yes when message: OSDBA, OSOPER and OSASM are the same OS group. Are you sure you want to continue ?
6. Installation Location Oracle Base: /u01/app/grid
Software Location: /u01/app/grid/product/11.2.0/grid
Click Next
7. Create Inventory Inventory Directory: /u01/app/oraInventory
Click Next
8. Prerequistite Checks Select Ignore All
because my VM guest has:

[root@pc1 ~]# grep MemTotal /proc/meminfo
MemTotal:      1035244 kB
[root@pc1 ~]# grep SwapTotal /proc/meminfo
SwapTotal:     2097144 kB

but Oracle need minimum 1.5GB for memory and 2.5GB of swap space

RAM Swap Space
Between 1 GB and 2 GB 1.5 times the size of RAM
Between 2 GB and 16 GB Equal to the size of RAM
More than 16 GB 16 GB

Click Next
 

9. Summary Review Summary before starting setup
Click Finish
10. Setup Setup process
At the end of the process, 2 configuration script must be run:
Open a new terminal run:

[root@pc1 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.

[root@pc1 ~]# /u01/app/grid/product/11.2.0/grid/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/grid/product/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
2009-09-24 16:49:19: Checking for super user privileges
2009-09-24 16:49:19: User has super user privileges
2009-09-24 16:49:19: Parsing the host name
Using configuration parameter file:
   /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node pc1 successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting

pc1     2009/09/24 16:50:04
        /u01/app/grid/product/11.2.0/grid/cdata/pc1/backup_20090924_165004.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2047 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
11. Finish Click Close to finish the installation

 

 

Verify Test

Add to .bash_profile of user grid

export ORACLE_SID=+ASM
export ORACLE_HOME=/u01/app/grid/product/11.2.0/grid
export PATH=$ORACLE_HOME/bin:$PATH

 

Connect as SYSASM

[root@pc1 ~]# su - grid
[grid@pc1 ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 24 23:15:24 2009

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn / as sysasm
Connected.

 

Verify Instance Name, Instance Type, Status

SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
+ASM             STARTED
SQL> show parameter instance_type

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
instance_type                        string      asm

 

Verify Path, Mount Status

SQL> col path format a30
SQL> select path, mount_status from v$asm_disk;

PATH                           MOUNT_S
------------------------------ -------
ORCL:VOL1                      CACHED
ORCL:VOL2                      CACHED

 

Verify Diskgroup, State, Size

SQL> select group_number, name, state, type, total_mb from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE       TYPE     TOTAL_MB
------------ ------------------------------ ----------- ------ ----------
           1 DATA                           MOUNTED     NORMAL       6134

 

 

The next step we can do is: Install Oracle Database 11g Release 2 using Grid Infrastructure

 


Add Swap file on Linux

September 14th, 2009 . by admin

View amount of swap memory

[root@pc2 ~]# grep SwapTotal /proc/meminfo
SwapTotal:     2097144 kB

Add a swap file

Size: 1GB

[root@pc2 /]# dd if=/dev/zero of=/swapfile bs=1k count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 56.9259 seconds, 18.0 MB/s
[root@pc2 /]# chmod 600 swapfile
[root@pc2 /]# mkswap swapfile
Setting up swapspace version 1, size = 1023995 kB
[root@pc2 /]# swapon swapfile

View again amount of swap memory

[root@pc2 /]#  grep SwapTotal /proc/meminfo
SwapTotal:     3097136 kB