Thursday, May 7, 2015

Oracle Database 11g Release 2 (11.2) Installation On Redhat Linux



Install the linux os and then create the directory structure as following
/-- root partition
/boot -- boot partition
/var
/usr
/opt
/tmp
/oraeng or /u01  ---where you want to install the oracle software.i.e Oracle installation directory.
/disk1 -- if you want to write the data-file in separate directory. else: no need to create the directory

Swap is mandatory partition and it should be double of the RAM

Download the Oracle software from OTN  depending on your support status.

Oracle Database 11g Release 2 (11.2.0.1.0)Standard Edition, Standard Edition One, and Enterprise Edition

After successful download unzip the files using unzip command.

Hosts File Configuration
edit the host file using editors "like vi/gedit", "/etc/hosts" update the server ip and host-name in the file.

For example.
127.0.0.1       localhost.localdomain  localhost
192.168.1.164   murthy.localdomain  murthy

Oracle Installation Prerequisites

Perform either the Automatic Setup or the Manual Setup to complete the basic prerequisites. The Additional Setup is required for all installations.Automatic Setup
If you plan to use the "oracle-validated" package to perform all your prerequisite setup, follow the instructions at "http://public-yum.oracle.com" to setup the yum repository for OL, then perform the following command.
# yum install oracle-validated
All necessary prerequisites will be performed automatically.
It is probably worth doing a full update as well, but this is not strictly speaking necessary.
# yum update

Manual configuration

If you have not used on-line configuration to perform all prerequisites packages, you will need to do manually perform the following setups.
Oracle recommend the following minimum parameter settings.

The current values can be tested using the following command.
/sbin/sysctl -a | grep
 

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

Add  the following lines in the "/etc/sysctl.conf" file.
 
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
Run the following command to change the current kernel parameters.
/sbin/sysctl -p
Add the following lines to the "/etc/security/limits.conf" file.


oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240
 
Install the following packages if they are not already present.
# Mount the Oracle Linux (version) DVD from there you can install/update the following packages.

cd /media/cdrom/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*
cd /
eject

Mandatory steps :

Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.
SELINUX=permissive
If you have the Linux firewall enabled, you will need to disable.

Create the new groups and users.

If you execute the below commands then linux will automatically assign the group and user IDS for the group and users. :

groupadd oinstallgroupadd dbagroupadd oper
useradd -g oinstall -G dba oraclepasswd oracle

or

If you want to manually assign the ID's for groups and users follow the below commands:

groupadd -g 1000(group id should be any one) oinstallgroupadd -g 2000(group id should be any one which id is free) dba

useradd -u 3000(user id is mandatory ) -g (primary group) oinstall -G (secondary group) dba -d (home landing directory) /home/oracle  -m (specify the user name) oracle
useradd -u 3000 -g oinstall -G dba -d /home/oracle -m oracle
password oracle : passwd oracle

Create the directories in which the Oracle software will be installed.

mkdir -p /u01/app/oracle/product/11.2.0/db_1

change the ownership and permissions for the created directory.you can change the ownership and permissions using root.

chown -R oracle:oinstall /u01
chmod -R 775 /u01

To check the display output, Login as root and issue the following command.

xhost +

Login as oracle user and update the  ".bash_profile"


# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=murthy; export ORACLE_HOSTNAME
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH 


Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.
 
DISPLAY=:0.0; export DISPLAY

Start the Oracle Universal Installer (OUI) by running the following command in the database directory.

./runInstaller

No comments:

Post a Comment

Thanks for giving comments!!