How to install Oracle 11g on Linux

In this article i'm going to explain step by step installationAuto Startup and Shutdown of Database and Listener
of Oracle 11g Release 1 on RHEL 4 and 5,EnterpriseLogin as root and modify /etc/oratab file and change
Linux 4 and 5 by Oracle.This version is certified bylast character to Y for apropriate database.
Oracle.Article also covers guide for Centos Linux 4ORCL:/u01/app/oracle/product/11.1.0/db_1:Y
and 5.As root user create new file "oracle" (init script for
Guide includes:startup and shutdown the database) in /etc/init.d/
1.Pre-Installation Stepsdirectory with following content:
2.Installation#!/bin/bash
3.Post-Installation Steps.#
Pre-Installation Steps:# oracle Init file for starting and stopping
1. Create oracle users and groups.groupadd# Oracle Database. Script is valid for 10g and 11g
oinstallgroupadd dbagroupadd operuseradd -g oinstallversions.
-G dba,oper oraclepasswd oracle#
2. Set Kernel Parameters# chkconfig: 35 80 30
Edit /etc/sysctl.conf and add following lines.kernel.shmall# description: Oracle Database startup script
= 2097152kernel.shmmax = 2147483648kernel.shmmni# Source function library.
= 4096kernel.sem = 250 32000 100 128fs.file-max =. /etc/rc.d/init.d/functions
6553600net.ipv4.ip_local_port_range = 1024ORACLE_OWNER="oracle"
65000net.core.rmem_default =ORACLE_HOME="/u01/app/oracle/product/11.1.0
4194304net.core.rmem_max =db_1"case "$1" instart)echo -n $"Starting Oracle DB:"su
4194304net.core.wmem_default =- $ORACLE_OWNER -c "$ORACLE_HOME/bin
262144net.core.wmem_max = 262144execute sysctldbstart $ORACLE_HOME"echo "OK"
command;;stop)echo -n $"Stopping Oracle DB:"su -
# sysctl -porreboot to apply above changes.$ORACLE_OWNER -c "$ORACLE_HOME/bin
For RedHat (OEL, Centos, WBL) 4 version: Edit thedbshut $ORACLE_HOME"echo "OK"
etc/pam.d/login file and add following line:session;;
required /lib/security/pam_limits.so*)echo $"Usage: $0 {start|stop}"esac
For RedHat (OEL, Centos) 5 version: Edit the /etcExecute (as root) following commands (First script
pam.d/login file and add following line:session requiredchange the permissions, second script is configuring
pam_limits.soexecution for specific runlevels):chmod 750 /etc/init.d
Edit the /etc/security/limits.conf file and add followingoraclechkconfig --add oracle --level 0356
lines:oracle soft nproc 2047oracle hard nprocAuto Startup and Shutdown of Enterprise Manager
16384oracle soft nofile 1024oracle hard nofile 65536Database Control
3. Creating oracle directoriesmkdir -p /u01/app/oracleAs root user create new file "oraemctl" (init script for
product/11.1.0/db_1chown -R oracle:oinstall /u01chmodstartup and shutdown EM DB Console) in /etc/init.d/
-R 775 /u01directory with following content:
4. Setting Oracle Enviroment#!/bin/bash
Edit the /home/oracle/.bash_profile file and add#
following lines:# oraemctl Starting and stopping Oracle Enterprise
ORACLE_BASE=/opt/oracleManager Database Control.
ORACLE_HOME=$ORACLE_BASE/product/11.1.0# Script is valid for 10g and 11g versions.
db_1#
ORACLE_SID=ORCL# chkconfig: 35 80 30
LD_LIBRARY_PATH=$ORACLE_HOME/lib# description: Enterprise Manager DB Control startup
PATH=$PATH:$ORACLE_HOME/binexportscript
ORACLE_BASE ORACLE_HOME ORACLE_SID# Source function library.
LD_LIBRARY_PATH PATH. /etc/rc.d/init.d/functions
Save the .bash_profile and execute followingORACLE_OWNER="oracle"
commands to load new user enviroment:cd /homeORACLE_HOME="/u01/app/oracle/product/11.1.0"case
oracle"$1" instart)echo -n $"Starting Oracle EM DB
. .bash_profileConsole:"su - $ORACLE_OWNER -c
Login as root and issue the following command:xhost +"$ORACLE_HOME/bin/emctl start dbconsole"echo
Some additional packages are required for succesful"OK"
instalation of Oracle software. To check wheter;;stop)echo -n $"Stopping Oracle EM DB Console:"su -
required packages are installed on your operating$ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl
system use following command:rpm -q binutils elfutilsstop dbconsole"echo "OK"
elfutils-libelf gcc gcc-c++ glibc glibc-common glibc-devel;;
compat-libstdc++-33 cpp make compat-db sysstat*)echo $"Usage: $0 {start|stop}"esac
libaio libaio-devel unixODBC unixODBC-devel|sortExecute (as root) following commands (First script
Installation:change the permissions, second script is configuring
Download the Oracle 11g release 1 (11.1.0.6.0) softwareexecution for specific runlevels):chmod 750 /etc/init.d
from Oracle website.oraemctlchkconfig --add oraemctl --level 0356
Extract the files using following command:unzipYou may consider to use rlwrap for comfortable work
linux_11gR1_database.zipwith sqlplus and adrci utility. RPM package for RedHat
Now the system is prepared for Oracle softwarecompatible (x86) distribution you can download here.su
installation. To start the installation process go to-
database directory and execute the following# rpm -ivh rlwrap-0.24-rh.i386.rpm
commands:cd database# exitecho "alias sqlplus='rlwrap sqlplus'" >> /home
./runInstalleroracle/.bash_profileecho "alias adrci='rlwrap adrci'"
Click here for screenshot>> /home/oracle/.bash_profile
Post-Instalation:. /home/oracle/.