Search This Blog

Tuesday 1 May 2018

Oracle Database Step by Step Silent installation


This post, I am sharing on how to install Oracle Database 12c in silent installation. I went through lot of Posts and blogs and sharing how to simplify and have smooth database installation. This includes post installation steps where we would have little struggle in create listener.ora and tnsnames.ora and How to create and start pluggable database automatically. This installation is done in Redhat Linux 7.

Installation follows below steps

                1. Prerequisites

                2. Oracle DB Installation

                3. Oracle DB Configuration

                4. Listener.ora & tnsnames.ora File setup

1. Prerequisites 

Adding IP and Hostname Hosts File

Edit "/etc/hosts" file  and add your IP Address and hostname as shown in the example.

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example.

$ vi /etc/hosts       localhost localhost.localdomain localhost4 localhost4.localdomain4     bose_pc    bose_pc 

Set the correct hostname in the "/etc/hostname" file.


 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-database-server-12cR2-preinstall" package to perform all your prerequisite setup, issue the following command.

# yum install oracle-database-server-12cR2-preinstall -y

It is probably worth doing a full update as well, but this is not strictly speaking necessary.

# yum update -y

 It's worth running the all the YUM commands listed in the manual setup section. Depending on the OS package groups you have selected, some additional packages might also be needed.

Manual Setup

If you have not used the "oracle-database-server-12cR2-preinstall" package to perform all prerequisites, you will need to manually perform the following setup tasks.

Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-oracle.conf".

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500


Run one of the following commands to change the current kernel parameters, depending on which file you edited.

/sbin/sysctl -p
# Or
/sbin/sysctl -p /etc/sysctl.d/98-oracle.conf

Add the following lines to a file called "/etc/security/limits.d/oracle-database-server-12cR2-preinstall.conf" file.

oracle   soft   nofile    1024
oracle   hard   nofile    65536
oracle   soft   nproc    16384
oracle   hard   nproc    16384
oracle   soft   stack    10240
oracle   hard   stack    32768
oracle   hard   memlock    134217728
oracle   soft   memlock    134217728


For RHEL OL6 or OL7

# OL6 and OL7 (RHEL6 and RHEL7)
yum install binutils -y
yum install compat-libcap1 -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install make -y
yum install nfs-utils -y
yum install net-tools -y
yum install smartmontools -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
# Required for 12.1, not listed for 12.2
yum install gcc -y
yum install gcc-c++ -y
yum install libXext -y
yum install libXext.i686 -y
yum install zlib-devel -y
yum install zlib-devel.i686 -y
# OL6 only (RHEL6 only)
yum install e2fsprogs -y
yum install e2fsprogs-libs -y
yum install libs -y
yum install libxcb.i686 -y
yum install libxcb -y

Create the new groups and users.

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
#groupadd -g 54330 racdba
useradd -u 54321 -g oinstall -G dba,oper oracle

Uncomment the extra groups you require.

Additional Setup

The following steps must be performed, whether you did the manual or automatic setup.

Set the password for the "oracle" user.

passwd oracle

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


Once the change is complete, restart the server or run the following command.

# setenforce Permissive

If you have the Linux firewall enabled, you will need to disable or configure it, as shown here or here. To disable it, do the following.

# systemctl stop firewalld
# systemctl disable firewalld

If you are not using Oracle Linux and UEK, you will need to manually disable transparent huge pages.

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

mkdir -p /app/oracle/product/
chown -R oracle:oinstall /u01
chmod -R 775 /u01


Putting mount points directly under root without mounting separate disks to them is typically a bad idea. It's done here for simplicity, but for a real installation "/" storage should be reserved for the OS.

Unless you are working from the console, or using SSH tunneling, login as root and issue the following command.

xhost +bose_pc

 2. Oracle DB Installation

Download Oracle Database12.1.0.2 and unzip the software in server and start the installation with the following command in putty or terminal. 

Just click this link to get db_install.rsp file details. copy the content and save as db_install.rsp and move to your intallation directory

$ cd /u01/stage/softwares/database/database

$ ./runInstaller -ignoreSysPrereqs -ignorePrereq -showProgress -silent -responseFile  /u01/stage/softwares/database/database/response/db_install.rsp INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOME=/u01/app/oracle/product/ ORACLE_BASE=/u01/app/oracle

It will start the installation and will send successfully without configuring the DB.

As shown in the screenshot, Login as root user and run file.

 3. Oracle DB Configuration:

Next step is configuring the DB. To configure get the dbca.rsp from this link. Copy the content from the post and save as dbca.rsp and move to installation diretory.

After that run the below command to initiate the DB configuration.

$ cd /u01/app/oracle/product/

$ dbca -silent -createDatabase -responseFile /u01/stage/softwares/database/database/response/dbca.rsp

Oracle 12c has been installed successfully. To check run lsnrctl status command from linux to check the listener status.

4. Listener.ora & tnsnames.ora File setup

create tnsnames.ora and listener.ora file in the following directory. /u01/app/oracle/product/


    (ADDRESS = (PROTOCOL = TCP)(HOST = bose-pc)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = bose-pc)(PORT = 1521))


   (ADDRESS = (PROTOCOL = TCP)(HOST = biapp)(PORT = 1521))
   (ORACLE_HOME = /u01/app/oracle/product/

Happy Blogging!


No comments:

Post a Comment

OBIEE 12c to OAS Migration

 Hi All, I have migrated successfully few projects from BI 12c to OAS 6.4. If  anyone wants help then please reach Me! Cheers! Bose

Recent Posts