Wednesday, July 18, 2012

Guide to install Oracle 10 on Linux

Checking minimum hardware requirements

At least, your system should meet the following requirements:
1GB RAM 

Requirement for swap space in Oracle installation is as follows:

AVAILABLE  RAM
 SWAP SPACE REQUIRED


Between 1 GB and 2 GB       
1.5 times the size of RAM
Between 2 GB and 8 GB   
Equal to the size of RAM
More than 8 GB                    
.75 times the size of RAM


400MB free space in /tmp directory
Depending on type of the installation, 1.5-3.5 GB free space for Oracle Software
1.5GB free space if new Oracle Database is created

Getting familiar with requirements mentioned above, we need to get hardware information of our system. To check the size of RAM, Swap space and tmp directory, we run these commands:

To check the size of physical memory, execute 
grep MemTotal     /proc/meminfo
df –h /tmp

Making Directories
To make directories, execute:
su - root
mkdir –p /app/oracle/product/10.2.0/ [u01 if needed]

Checking Kernel Parameters
To see all kernel parameters, execute:
su - root
sysctl –a

The options for sysctl are as follows:
     -a   List all the currently available string or integer values.  This is the default, if no parameters are given to sysctl. Verify that the kernel parameters shown in the following table are set to values greater than or equal to the recommended value shown. Do not change the value of any kernel parameter on a system where it is already higher than listed as minimum requirement.


Parameter
Value
File
semmsl
semmns
semopm
semmni
250
32000
100
128
/proc/sys/kernel/sem
Shmall
2097152
/proc/sys/kernel/shmall
Shmmax
Half the size of physical memory (in bytes)
/proc/sys/kernel/shmmax
Shmmni
4096
/proc/sys/kernel/shmmni
file-max
65536
/proc/sys/fs/file-max
ip_local_port_range
Minimum:1024
Maximum: 65000
/proc/sys/net/ipv4/ip_local_port_range
rmem_default
1048576
/proc/sys/net/core/rmem_default
rmem_max
1048576
/proc/sys/net/core/rmem_max
wmem_default
262144
/proc/sys/net/core/wmem_default
wmem_max
262144
/proc/sys/net/core/wmem_max


We added the following lines to the /etc/sysctl.conf file which is used during the boot process:

# Kernel Parameters for Oracle 10.2.0
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Creating Oracle Groups

To create the oracle group(s), execute the following commands:
su – root
groupadd <groupname> [For Primary Group]
groupadd <groupname> [For Secondary Group .If Needed]

Creating Oracle User Account

To create the oracle account  execute the following commands:
su – root
useradd –c "Oracle Owner" –g oinstall –G dba –d /app/oracle/product/10.2.0/
oracle

Changing Owner and Mode

To change the user and mode execute
root>chown <username>.<primarygroupname> –R /app/
root>chmod 755 –R /app/

Setup Environment

Before installing the Oracle software, set the environment. To set an environment execute
root>su - <username>
user>vi.bash_profile

Modify the .bash_profile according to your requirements

Sample bash_profile

unset TWO_TASK

export ORACLE_SID=GENTIC
export LISTENER_NAME=$ORACLE_SID
export ORACLE_BASE=/export/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0
export ORACLE_DOC=$ORACLE_HOME/doc
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export TNS_ADMIN=/export/home/oracle/admin/sqlnet

export PATH=$ORACLE_HOME/bin:$PATH
export NLS_LANG=american_america.al32utf8
export ORA_NLS10=$ORACLE_HOME/nls/data
export TEMP=/tmp
export TMPDIR=/tmp
export EDITOR=vi

ulimit -u 16384 -n 63536
Compile the bash_profile by executing
 ./.bash_profile

Start Installer

The runInstaller will on the path /dump/database. To proceed  execute

cd /dump/database/
./runInstaller

The DBCA screen will appear. Please follow the wizard to install the oracle on your machine.

No comments:

Post a Comment