How to install Oracle database 11g

In this post, we are going to learn “How to install Oracle Database 11g”.Before installing Oracle 11g database server on the Linux machine, please follow the below mentioned procedure.

INSTALL ORACLE DATABASE  11g SERVER ON LINUX

Download the Oracle server files from oracle.com

# 11.2.0.1

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

You can download the above files here

Kernel Requirements

set kernel parameters by adding the following lines in “/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

 

Here,

 

shmmax-> This parameter represents the size in bytes of a single shared memory segment

shmmni-> This parameter represents total no.of shared memory segments system wide(4096 is most probably enough)

shmall-> We specify this parameter in pages. The SHMALL defines the largest amount of shared memory pages that can be used at one time on the system.

kernel.sem -> This parameter is related to semaphores

e.g.,

kernel.sem = SEMMSL SEMMNS SEMOPM SEMMNI

where

semmsl:  The number of semaphores per set

semmns:  The total number of semaphores available

semopm:  The number of operations which can be made per semaphore call

semmni:  The maximum number of shared memory segments available in the system

net.ipv4.ip_local_port_range-> The range of ports that can be used for Oracle services.

fs.file-max -> This represents maximum no.of datafiles supported by Oracle.

aio-max-nr file ->  the maximum number of allowable concurrent requests.

net.core.rmem_max -> This sets the max OS receive buffer size for all types of connections

net.core.wmem_max-> This sets the max OS  send buffer size for all types of connections.

net.core.rmem_default -> This sets the default OS receive buffer size for all types of connections.

net.core.wmem_default-> This sets the default OS  send buffer size for all types of connections.

 

we leave it to Oracle recommendation.

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

Setting Shell Limits

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

Here,

soft nofile -> Specifies the maximum number of 4096 file handlers are allowed to the user oracle on the server.

hard nofile -> This specifies upper limit which oracle user can set.

soft nproc  -> Specifies the maximum number of 2047 processes are allowed to run by the user oracle on the server.

hard nproc  -> This specifies upper limit which oracle user can set.

we leave this to default as recommended by Oracle.

Compiler rpm Requirements

The following or later version of packages for Oracle Linux 6, Red Hat Enterprise Linux 6, and Asianux Server 4 must be installed:

 

binutils-2.20.51.0.2-5.11.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6.i686

gcc-4.4.4-13.el6 (x86_64)

gcc-c++-4.4.4-13.el6 (x86_64)

glibc-2.12-1.7.el6 (i686)

glibc-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6.i686

ksh

libgcc-4.4.4-13.el6 (i686)

libgcc-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6 (x86_64)

libstdc++-devel-4.4.4-13.el6.i686

libaio-0.3.107-10.el6 (x86_64)

libaio-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6 (x86_64)

libaio-devel-0.3.107-10.el6.i686

make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)

Additional Software Requirements

Depending on the components you want to use, you must ensure that the following software is installed:

Oracle ODBC Drivers

Oracle JDBC/OCI Drivers

Linux-PAM Library

Oracle Messaging Gateway

Programming Languages

Browser Requirements

Creating Required Operating System Groups and Users

groupadd oinstall

groupadd dba

groupadd oper

groupadd asmadmin

useradd -g oinstall -G dba,oper,asmadmin oracle

passwd oracle

 

Set the SELINUX

Set secure Linux to permissive by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.

SELINUX=permissive

Software Directories Creation

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

chown -R oracle:oinstall /u01

chmod -R 775 /u01

 

Now, login as an Oracle user

go to unzip folder of Oracle software and go to database folder then run

./runInstaller

Step 1 : Select NO for Software updates and click next.

Step 2 : Select Install database software only.

 

 

 

 

 

 

 

 

 

 

 

 

Step 3. Select single instance database installation.

Step 4 : Select Language

 

 

 

 

 

 

 

 

 

 

 

 

Step 5 : Select Enterprise Edition

Step 6: Select software locations.

 

 

 

 

 

 

 

 

 

 

 

 

Step 7 : select operating system groups

Step 8: check prerequisites and if all prerequisites met, click next.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Step 9: Execute root.sh when prompted as a root user and click close after finish.

Execute root.sh when prompted

[root@node2 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

Running Oracle 11g root.sh script…

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The file “dbhome” already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

Copying dbhome to /usr/local/bin …

The file “oraenv” already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

Copying oraenv to /usr/local/bin …

The file “coraenv” already exists in /usr/local/bin.  Overwrite it? (y/n)

[n]: y

Copying coraenv to /usr/local/bin ..

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

Finished product-specific root actions.

[root@node2 ~]#

 

 

 

 

 

 

 

 

 

 

 

 

In the next post, we will learn how to create a database in Oracle 11g

 

Words from dbapath

Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.

If you want to be updated with all our articles

please follow us on Facebook | Twitter
Please subscribe to our newsletter.

Comments are closed.