Wednesday, July 2, 2008

Install Oracle Database 10g Software on Red Hat Linux

I already assume that you have installed Linux on your machine and now you want to install oracle software in linux box. Before installing oracle you have to perform several checkings. In the following section I have discussed one by one which may help you to install oracle on linux.

1)Check the OS bit:
---------------------------

Before installing oracle it is necessary which type of oracle software you will install. It is actually depend on OS. You have to check whether OS is 32 or 64 bit. Then you have to decide which version of oracle you will install. I have a fine post related to checking OS
Check OS 64 or 32 bit

2)Verify System Requirements:
---------------------------------------------

To install oracle on your system you should be at least 1GB RAM, 1GB swap space on your system. To find the available RAM and swap space on your system issue,

grep MemTotal /proc/meminfo
grep SwapTotal /proc/meminfo


Besides RMAN and SWAP space you need to have space in your hard disk in a partition where oracle software will reside. Approximately you need 2.5GB space for oracle software, 1.2GB space for oracle database and 400MB space in /tmp directory.

You can check your space available on the hard disk by,

df -h

3)Configure the Linux Kernel Parameters
------------------------------------------------------------------

In order to effect changed linux kernel parameters no need to reboot. Linux support modification of most kernel parameters while the system is up and running.
To install oracle on linux several kernel parameters need to be set. You can see the current settings of these parameters by,

/sbin/sysctl -a | grep shm
/sbin/sysctl -a | grep sem
/sbin/sysctl -a | grep file-max
/sbin/sysctl -a | grep ip_local_port_range
/sbin/sysctl -a | grep rmem_default
/sbin/sysctl -a | grep rmem_max
/sbin/sysctl -a | grep wmem_default
/sbin/sysctl -a | grep wmem_max

You can see the kernel parameter permanently by Forcing the /etc/sysctl.conf settings to the Kernel at run-time.
Here is an example. This will immediately reflect the settings in /etc/sysctl.conf to the Kernel (/proc/sys).

cat >> /etc/sysctl.conf <<

kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
EOF

Copy and paste abouve code and then run,
debian:/home/Arju# /sbin/sysctl -p
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144

This procedure sets kernel parameter permanently, however you can set temporary by

debian:/home/Arju# cd /proc/sys/net/core
echo 1048576 > /proc/sys/net/core/rmem_default
echo 1048576> /proc/sys/net/core/rmem_max
echo 262144 > /proc/sys/net/core/wmem_default
echo 262144 > /proc/sys/net/core/wmem_max


4)Create the Oracle Groups and User Account
----------------------------------------------------------------

Log in as a root user and then create two groups oinstall and dba, create oracle user who owns the oracle software making initial group oinstall and secondary group dba.


$su
Password:
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle

uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)

Set the password on the oracle user,

# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

5)Create Directory for Oracle software
----------------------------------------------------

Create directory as root and then change permission 755 and make owner to oracle user.
mkdir /u01/oracle
chown -R oracle:oinstall /u01/oracle
chmod -R 775 /u01/oracle


6)Set Shell Limits for the oracle User
-------------------------------------------------------------

It is sometime necessary to set limit of how much memory oracle user permit to use, how many files it can open, how many processes it can run. This is done by,
cat >> /etc/security/limits.conf <<> /etc/pam.d/login <<

7)Install Oracle
-------------------------------

Go to the location of the oracle cd or software.Change the directory install and run the runInstaller file as a oracle user. Like
$cd install
$./runInstaller


Go according to OUI as prompted and click next.

In the end run root.sh as root as OUI prompted.

No comments:

Post a Comment