About Me

Wednesday 12 June 2013

Installation of Oracle 11g r2 database on RHEL 5.4

This post shows Installation of Oracle 11 g r2 database (11.2.0.1) on Red Hat Linux 5.4 .
For this installation I have installed RHEL 5.4 selecting all the packages available . Still we need to install some extra RPMs which i will show in coming steps.

Following are the mount points i have in my RHEL machine whose hostname is LINUX1.

[root@linux1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             3.8G  288M  3.4G   8% /
/dev/sda12            4.8G  138M  4.4G   4% /tmp
/dev/sda11            5.7G  203M  5.2G   4% /var
/dev/sda10            5.7G  140M  5.3G   3% /data03
/dev/sda9             7.6G  146M  7.1G   2% /orabin
/dev/sda8             9.5G  1.4G  7.7G  15% /opt
/dev/sda7             9.5G  151M  8.9G   2% /data01
/dev/sda6             9.5G  151M  8.9G   2% /data02
/dev/sda5              12G  3.1G  7.8G  29% /usr
/dev/sda1             965M   23M  893M   3% /boot
tmpfs                1014M     0 1014M   0% /dev/shm
/dev/hdc               57M   57M     0 100% /media/VBOXADDITIONS_4.2.12_84980

I will install Oracle RDBMS in  /orabin mount point under the path /orabin/app/oracle/product/11.2.0 . This path is nothing but the ORACLE HOME. For ORACLE BASE the path will be /orabin/app/oracle/product

We will create OINSTALL group which will install the software and DBA which can create the database .

Let us make the path in OS

[root@linux1 orabin]# mkdir -p /orabin/app/oracle/product/11.2.0
[root@linux1 orabin]# groupadd oinstall
[root@linux1 orabin]# groupadd dba
[root@linux1 orabin]# useradd -g oinstall -G dba -d /home/oracle -m oracle
[root@linux1 orabin]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

[root@linux1 orabin]# chown -R oracle:oinstall /orabin
[root@linux1 orabin]# chown -R oracle:dba /data01 /data02 /data03

Oracle RDBMS software has been kept in /opt hence set permission to /opt so that we can unzip the RDBMS binaries .

[root@linux1 orabin]# chmod -R 777 /opt

Lets move to location where RDBMS software has been kept.

[root@linux1 opt]# ls
linux_11gR2_database_1of2.zip  linux_11gR2_database_2of2.zip  lost+found

Now unzip the two zip files as below.

[root@linux1 opt]# unzip linux_11gR2_database_1of2.zip
[root@linux1 opt]# unzip linux_11gR2_database_2of2.zip

after you finish unzip of files you will get single directory as "database" .
 
[oracle@linux1 opt]$ ls
database  linux_11gR2_database_1of2.zip  linux_11gR2_database_2of2.zip  lost+found  OsRPMs

Now we will set the bash profile for our installation.

[root@linux1 opt]# su - oracle
[oracle@linux1 ~]$ vi .bash_profile

export ORACLE_HOME=/orabin/app/oracle/product/11.2.0
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin
export PATH=$ORACLE_HOME/bin:$PATH:.


After setting the bash profile we can start the installation of Oracle Database.

Upto 11g r1 we had to set kernel parameters required for oracle manually but now from 11g r2 this can be skipped and will be taken care while installation. OUI will give us runfixup.sh script which will fix kernel parameters for us. This script needs to be run from root user.

[oracle@linux1 database]$ ls
doc  install  response  rpm  runInstaller  sshsetup  stage  welcome.html

OUI is GUI based installar hence for Allowing normal user to invoke GUI, run following command as root user.

[root@linux1 ~]# xhost +

Now its time to invoke OUI i.e runInstallar

[oracle@linux1 database]$ ./runInstallar

First window is the welcome page where either you can provide your valid mail ID or can leave blank by unchecking  the box.



























 
Here all the per-requisites will be verified before starting the installation . Some per-requisites can be fixable and some , like missing RPMs , are not .  as you can see that some packages needs to bee installed before we can proceed .

Next window gives you the script which need to run as root user to fix kernel parameters. 














[root@linux1 ~]# /tmp/CVU_11.2.0.1.0_oracle/runfixup.sh
Response file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.1.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.1.0_oracle/orarun.log
Setting Kernel Parameters...
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)














To fix the above failed packages you can download and install as below

[root@linux1 OsRPMs]# rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm sysstat-7.0.2-3.el5.i386.rpm unixODBC-devel-2.2.11-7.1.i386.rpm
warning: libaio-devel-0.3.106-3.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:unixODBC-devel         ########################################### [ 33%]
   2:libaio-devel           ########################################### [ 67%]
   3:sysstat                ########################################### [100%]


















Run the above given scripts as root user .

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

Changing groupname of /orabin/app/oracle/oraInventory to oinstall.
The execution of the script is complete.
[root@linux1 ~]# /orabin/app/oracle/product/11.2.0/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /orabin/app/oracle/product/11.2.0

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.
Finished product-specific root actions.
[root@linux1 ~]#














Click on close and 
You are done...................................................... :)







No comments:

Post a Comment