Oracle Database 12cR1 Installation on RHEL 6

Oracle Installation  of 12cR1 method’s are clearly indicated below. Each and every step is crucial to perform a error free setup. The following Installation is performed on a RHEL 6 64 Bit OS. The software Binaries vary from 32 and 64 Bit, be sure to download the correct software binaries.The files shown below are those for 64 Bit Linux OS on RHEL 6. Download only the first two files for installing Database Software.

linuxamd64_12c_database_1of2.zip
linuxamd64_12c_database_2of2.zip

Let’s get started with the Installation, there are two major parts of any Oracle Database Installation.

  1. Operating System Settings
  2. Oracle Database Installation

Let’s start with each one of them,

1. Operating System Settings

All settings indicated here are to be performed after RHEL 6 64 Bit OS Installations

  • Ensure hostname and IP are set up properly, you will need to do the check same after Linux 64 Bit Installation.
[root@rhel1 ~]# more /etc/hosts
127.0.0.1 localhost
192.168.1.10 rhel1
192.168.1.11 rhel2
[root@rhel1 ~]# ifconfig -a | grep 192
 inet addr:192.168.1.12 Bcast:192.168.1.255 Mask:255.255.255.0
[root@rhel1 ~]# more /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=rhel1
GATEWAY=192.168.1.1
  • Disable Firewall Settings : Firewall Settings can cause network issues while communicating with Applications.

[root@rhel1 ~]# service iptables save
[root@rhel1 ~]# service iptables stop
[root@rhel1 ~]# chkconfig iptables off
[root@rhel1 ~]# service network restart

Kernel Settings : Kernel Settings are of utmost importance to configure system wide configurable memory and allowable Port Ranges

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
  • Ensure the /etc/sysctl.conf settings are setup fine, the following command should not throw any error’s
[root@rhel1 ~]# sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
  • Create Users,Groups & Folder Structures
[root@rhel1 ~]# groupadd -g 54321 oinstall
[root@rhel1 ~]# groupadd -g 54322 dba
[root@rhel1 ~]# groupadd -g 54323 oper
[root@rhel1 ~]# useradd -u 54321 -g oinstall -G dba,oper oracle
[root@rhel1 ~]# passwd oracle
[root@rhel1 ~]# mkdir -p /u01/app/oracle/product/11.2.0/db_1
[root@rhel1 ~]# mkdir -p /u01/softwares
[root@rhel1 ~]# chown -R oracle:oinstall /u01
[root@rhel1 ~]# chmod -R 775 /u01
  • Add the following Entries to /etc/security/limits.conf
more /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
  • Change Settings in /etc/security/limits.d/90-nproc.conf and /etc/selinux/config as shown below
/etc/security/limits.d/90-nproc.conf

# Comment the following Line
* soft nproc 1024

# Include the following Line
* - nproc 16384

/etc/selinux/config
SELINUX=permissive
  • Transfer the Oracle Database Media files linuxamd64_12c_database_1of2.zip and  linuxamd64_12c_database_1of2.zip to /u01/softwares

Mount the RHEL 6 64 bit CD or you can mount the ISO image

[root@rhel1 ~]# mkdir -p /media/rhel6iso
[root@rhel1 ~]# mount -o loop /u01/softwares/rhel_6.2_x86_64_disc_1.iso /media/rhel6iso
[root@rhel1 ~]# df -h
The df -h output shows you that the ISO media for RHEL6 64bit ISO has been mounter

The df -h output shows you that the ISO media for RHEL6 64bit ISO has been mounted

  • Transfer ( using sftp, ftp in bin mode,scp,filezilla, etc.. ) Oracle Database Media files p10404530_112030_Linux-x86-64_1of7.zip and p10404530_112030_Linux-x86-64_2of7.zip to /u01/softwares. Mount the RHEL 6 64 bit CD or you can mount the ISO image
[root@rhel1 ~]# mkdir -p /media/rhel6iso
[root@rhel1 ~]# mount -o loop /u01/softwares/rhel_6.2_x86_64_disc_1.iso /media/rhel6iso
[root@rhel1 ~]# df -h
----------The df -h output shows you that the ISO media for RHEL6 64bit ISO has been mounter
[root@rhel1 ]# cd /media/rhel6iso/Packages
[root@rhel1 Packages]# touch /u01/softwares/rpm_inst.sh
[root@rhel1 Packages]# echo "cd /media/rhel6iso/Packages" > /u01/softwares/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep binutils > /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep compat-libcap1 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep compat-libstdc++-33 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep compat-libstdc++-33.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep gcc >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep gcc-c++ >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep glibc >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep glibc.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep glibc-devel >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep glibc-devel.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep ksh >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libgcc >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libgcc.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libstdc++ >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libstdc++.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libstdc++-devel >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libstdc++-devel.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libaio >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libaio.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libaio-devel >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libaio-devel.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXext >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXext.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXtst >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXtst.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libX11 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libX11.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXau >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXau.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libxcb >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libxcb.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXi >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep libXi.i686 >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep make >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep sysstat >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep unixODBC >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# ls -l | awk '{ print $9 }' | grep unixODBC-devel >> /tmp/rpm_inst.sh
[root@rhel1 Packages]# chmod +x /u01/softwares/rpm_inst.sh
-------- Use vi Editor and include rpm -ivh at the beginning of every line (except first line) using esc :s/^/rpm -ivh /g
[root@rhel1 Packages]# sh /u01/softwares/rpm_inst.sh
-------- Rerun the script about 6 times or so that all dependency rpms will be installed

2. Oracle Database Installation

  • Login as Oracle User and set the Environment Variables in  /home/oracle/.bash_profile
-- Add the following Entries to .bash_profile
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=ol6-121.localdomain
export ORACLE_UNQNAME=cdb12c
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=cdb12c
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
-- Change Parameter Settings in Database Software area
-- /u01/softwares/database/stage/cvu/cv/admin
CV_ASSUME_DISTID=OEL4
to
CV_ASSUME_DISTID=OEL6
More information see metalink [ID 1304727.1]
  •  Create Database using dbca, use the GUI to set up all parameters for Database Creation, the Listener should be running at this time otherwise use netca to create the Listener.
oracle@rhel1 ]# cd /u01/softwares/database
[oracle@rhel1 database]# ./runInstaller
--
-- Complete the Installation and run the root scripts at the end
--
[root@rhel1 ~]# /u01/app/oraInventory/orainstRoot.sh
[root@rhel1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
  • In case you are directlly working on the server Set “xhost +” as root user and start working from oracle user.
  • In case you are working from a Ubuntu client, login to oracle as “ssh -X oracle@192.168.1.10
  • In case you are connecting to oracle user from a Windows PC to the Serve through putty, install Xmanager Software and export DISPLAY=<IP_of _your_PC>:0.0 and start XManager in the Start Tray
  • Start Installation of Oracle with software only option ( You will need to run a couple of scripts as root user at the End of the Installation )

That brings to the End of Oracle Software Installation & Database Creation.

abhilash@M6600:~$ ssh -X oracle@192.168.1.10
oracle@192.168.1.10's password:
Last login: Sat Jul 13 20:15:48 2013 from 192.168.1.7
[oracle@rhel1 ~]$ sqlplus

SQL*Plus: Release 12.1.0.1.0 Production on Sat Jul 13 22:03:08 2013

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select instance_name,status from v$instance;

INSTANCE_NAME STATUS
---------------- ------------
orcl12c OPEN

SQL> select dbms_xdb_config.gethttpsport () from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
 5500

SQL> select sys_context('userenv','con_name') "CONTAINER_NAME" from dual;

CONTAINER_NAME
--------------------------------------------------------------------------------
CDB$ROOT

SQL> select SERVICE_ID,NETWORK_NAME,PDB from dba_services;

SERVICE_ID NETWORK_NAME PDB
---------- -------------------- ------------
 1 CDB$ROOT
 2 CDB$ROOT
 5 orcl12cXDB CDB$ROOT
 6 orcl12c CDB$ROOT

  • For configuring up Pluggable Databases see other posts ( to be available soon)
Advertisements

6 Responses to Oracle Database 12cR1 Installation on RHEL 6

  1. Joshua says:

    Thanks for the post, using your instructions now.

  2. Joshua says:

    spelling error
    /ete/sysctl.conf
    should be
    /etc/sysctl.conf

  3. prem says:

    how to apply for oracle dba jobs at fugo…

  4. prem says:

    Thanks a lot for your quick response BTW i forwarded my profile.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: