PREPARING LINUX FOR ORACLE 11GR2 64Bit INSTALLATION STEP BY STEP

This article explains you step by step how to prepare the linux OS for ORACLE 11G step by step. This article oracle 11g installation is primarily focuses on the prior steps  before the installation oracle 11g i.e the steps required to prepare  the linux for oracle 11g installation which is a quite a challenging task. Here goes the steps to prepare the linux for oracle 11g.

1.Login to the system as a root

2.Check Disk Space and Memory Requirement

To determine the RAM size

# grep MemTotal /proc/meminfo

Recommended: 2 GB of RAM or more

To determine the system architecture,

# uname -m

Note:This command displays the processor type.

To determine the size of the configured swap space,

# grep SwapTotal /proc/meminfo

Recommended: Double of RAM Size

To determine the available RAM and swap space

# free

Automatic Memory Management

Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm)and file descriptors. The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET andMEMORY_TARGET for each Oracle instance on that computer.
To determine the amount of shared memory available

# df -h /dev/shm/

To determine the amount of disk space available in the /tmp directory

# df -h /tmp

Recommended: At least 1 GB of disk space in the /tmp directory

To determine the amount of free disk space on the system,

# df -h

The following is the disk space requirements for software files, and data files for each installation type

on Linux x86_64:

Installation Type     Requirement for Software Files (GB)

Enterprise Edition        4.7

Standard Edition          4.6

Operating System Requirements

RHEL 6.3

To determine the distribution and version of Linux installed

# cat /proc/version

Kernel Requirements

To determine whether the required kernel is installed,

# uname -r

Recommended: 2.6.32-71.el6.x86_64 or later

——————————————————————————————————————————————

3.Install the  following Required Package

64-bit (x86_64) Installations

binutils-2.20.51.0.2

compat-libcap1-1.10

compat-libcap1-1.10 (32-bit)

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

elfutils-libelf-0.148

elfutils-libelf-devel-0.148

gcc-4.4.4

gcc-c++-4.4.4

glibc-2.12-1

glibc-2.12-1 (32 bit)

glibc-common-2.12

glibc-devel-2.12

glibc-devel-2.12 (32 bit)

glibc-headers-2.12

ksh-20100621

Insert RedHat Installation media into the DVD room

Create a local directory as follows

# mkdir /repo

# cp /media/R<TAB>/Packages/* /repo

Note: R<TAB> is the Installation Media, if you Press Capital R and TAB key then it autocompletes. However, if your installation media’s Initial

character name is different, then do accordingly.

Install the createrepo package, which require couple of dependencies.

# cd /repo

# rpm -ivh deltarpm* python-deltarpm*

# rpm -ivh createrepo*

Create repository out of the contents of the directory.

# cd /repo

# createrepo .

Edit the Repository to allow the yum command as follows.

# vi /etc/yum.repos.d/localrepo.repo

libaio-0.3.107

libaio-0.3.107 (32 bit)

libaio-devel-0.3.107

libaio-devel-0.3.107 (32 bit)

libgcc-4.4.4

libgcc-4.4.4 (32 bit)

libstdc++-4.4.4

libstdc++-4.4.4 (32 bit)

libstdc++-devel-4.4.4

libstdc++-devel-4.4.4 (32 bit)

make-3.81

numactl-devel-2.0.3

sysstat-9.0.4

unixODBC-2.2.14

unixODBC-2.2.14 (32 bit)

unixODBC-devel-2.2.14

[localrepo]

name=localrepo

baseurl=file:///repo/

enabled=1

gpgcheck=0

Check all Missing Packages to be installed

# rpm -qa binutils compat* gcc* glibc* ksh libgcc* libstdc* libaio* make sysstat unixODBC*

Install all the missing packages

# yum -y install binutils compat* gcc* glibc* ksh libgcc* libstdc* libaio* make sysstat unixODBC*

4. Create Required Operating System Groups and User

# /usr/sbin/groupadd oinstall

# /usr/sbin/groupadd dba

# /usr/sbin/groupadd oper

Create  oracle User

# /usr/sbin/useradd -g oinstall -G dba,oper oracle

# passwd oracle

5. Configure Kernel Parameters and Resource Limits

# vi /etc/sysctl.conf

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 = 1048576

Note: Put Comment on Different parameter values than listed in the file.

Save the Change in Kernel Parameter.

#sysctl –p

Note:  If any error occurs, Put Comment on these error using # vi /etc/sysctl.conf.

6. Edit the Resource Limits for the Oracle Software Installation User as follows

# vi /etc/security/limits.conf

oracle     soft     nproc    2047

oracle    hard     nproc    16384

oracle    soft    nofile    1024

oracle    hard     nofile    65536

#vi /etc/pam.d/login

session    required    pam_limits.so

7. Creating Required Directories

The Oracle base directory must have 3 GB of free disk space, or 4 GB of free disk space if you choose not

to create a separate Oracle data file directory.

To display information about all mounted file systems:

# df -k

Create the directory and Set the appropriate owner, group, and permissions

# mkdir -p /u01/app/oracle

# chown -R oracle:oinstall /u01/app/oracle

# chmod -R 775 /u01/app/oracle

# mkdir -p /u01/app/oraInventory

# chown -R oracle:oinstall /u01/app/oraInventory

# chmod -R 775 /u01/app/oraInventory

# mkdir -p /u01/app/oracle/oradata

# chown -R oracle:oinstall /u01/app/oracle/oradata

# chmod -R 775 /u01/app/oracle/oradata

To determine the free disk space on /tmp :

# df -h /tmp

If Size of /tmp is Greather than or equal to 1GB

# mkdir -p /tmp/tmp

# chown oracle:oinstall /tmp/tmp

# chmod -R 775 /tmp/tmp

If size is less than 1 GB

# mkdir -p /u01/tmp

# chown oracle:oinstall /u01/tmp

# chmod -R 775 /u01/tmp

Note: Make sure /u01  has at least 5 GB of Space available to create /tmp directory in /u01.

8. Configure the oracle User’s Environment

–> Disable the Firewall

System–>Administration–>Firewall–>Close–>Disable–>Apply–>Quit

–> Disable selinux

# vi /etc/selinux/config

SELINUX=disabled

# vi /home/oracle/.bash_profile

——————————

ORACLE_SID=orcl; export ORACLE_SID

ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

ORACLE_HOSTNAME=localhost; export ORACLE_HOSTNAME

JAVA_HOME=/usr/local/java; export JAVA_HOME

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME

ORACLE_PATH=/u01/app/oracle/dba_scripts/sql:$ORACLE_HOME/rdbms/admin; export ORACLE_PATH

SQLPATH=/u01/app/oracle/dba_scripts/sql; export SQLPATH

ORACLE_TERM=xterm; export ORACLE_TERM

NLS_DATE_FORMAT=”DD-MON-YYYY HH24:MI:SS”; export NLS_DATE_FORMAT

TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

PATH=.:${JAVA_HOME}/bin:$JAVA_HOME/db/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

PATH=${PATH}:/u01/app/oracle/dba_scripts/bin

export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant.jar

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/oc4j/ant/lib/ant-launcher.jar

CLASSPATH=${CLASSPATH}:$JAVA_HOME/db/lib/derby.jar

CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

export CLASSPATH

THREADS_FLAG=native; export THREADS_FLAG

export TEMP=/tmp/tmp

export TMPDIR=/tmp/tmp

umask 022

9. Configure the shell limits for the oracle user

# vi /etc/profile

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/bash" ]; then

ulimit -u 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

10 Set Supported Time Zone for Enterprise Manager

# vi /etc/sysconfig/clock

ZONE=”Asia/calcutta”

ZONE=”GMT”

UTC=false

ARC=false

Note: Check your supported Time Zone for your windows setting. ZONE=Asia/Kathmandu is no more supported time zone for Enterprise

Manager.

11.  Set Fully Qualified Hostname as follows;

#vi /etc/hosts

27.0.0.1     localhost.localdomain localhost

192.168.1.106 localhost.caresoft.com localhost

# vi /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=localhost

12. Log out of root and login as ‘oracle’ user from GUI

13. Install Oracle 11GR2 from Installation Media or from Downloaded File

14.Prerequisite Check

It May Detect following packages are missing in RHEL 6.3. However, RHEL 6.3 have newer versions of

these packages so ignore all and proceed Installation.

glibc-common-2.3.4-2.x86_64.rpm

libaio-0.3.105-2.x86_64.rpm

unixODBC-2.2.11-7.1.x86_64.rpm

elfutils-libelf-devel-0.97.1-5.x86_64.rpm

libstdc++-3.4.6-3.1.x86_64.rpm

unixODBC-devel-2.2.11-7.1.x86_64.rpm

gcc-3.4.6-3.1.x86_64.rpm

glibc-devel-2.3.4-2.36.x86_64.rpm

glibc-headers-2.3.4-2.43.x86_64.rpm

pdksh-5.2.14-30.x86_64.rpm

15.IF ENTERPRISE MANAGER FAILED TO START,

–>Check Time Zone Setting for Oracle EM

$ vi $ORACLE_HOME/sysman/admin/supportedtzs.lst

–> look for supported time zone for your windows

$ vi $ORACLE_HOME/sysman/config/emd.properties

–>add one line to the last of the file ‘emd.properties

Run the Following command

Syntax:

$agentTZRegion=<TimeZone>

Example:

$agentTZRegion=Asia/calcutta

To Apply Run The Following Command;

$emctl resetTZ agent

–> If necessary, Change Host as it is in ‘/etc/hosts’ and ‘/etc/sysconfig/network’ in Listener.ora file

$ vi /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

)

)

ADR_BASE_LISTENER = /u01/app/oracle

–> If necessary, Change Host as it is in ‘/etc/hosts’ and ‘/etc/sysconfig/network’ in tnsnames.ora file

$ vi /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

# service network restart

 

Enjoy the ORACLE 11G R2 in Linux OS.

Hope you enjoyed and helpful to you.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *

Visit Us On FacebookVisit Us On Google PlusVisit Us On Youtube