Install Oracle Database 12 In Oracle Linux 6.5

Share this Article: Facebook73Google+2Twitter13LinkedIn0Reddit0Pinterest0StumbleUpon1Digg

In this tutorial, I’d like to show you step by step latest Oracle installation in Oracle Linux 6.5 64bit. Normally Virtualbox is not that good to install a production Oracle database environments, but it can be  enough for Developers and testers.

I suggest you to use minimum of 40GB VM hard disk, 4GB SWAP and 6GB RAM.

Download Oracle database files from Oracle

Please note: Using  database express server package is free and no license is required.

I downloaded the following database packages.

After downloading, unzip the files to a folder.

Change the hostname like this:

[root@Databases Databases]# cat  /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 Databases.localdomain Databases

Oracle Installation Prerequisites

Add oracle repository to your system:

# cd /etc/yum.repos.d
# wget


# yum install oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64

All necessary prerequisites will be installed automatically.

Run yum update again:

# yum update

Manual Setup

If you have not used the oracle-rdbms-server-12cR1-preinstall-1.0-11.el6.x86_64  package to perform all prerequisites, you have to manually perform the following setup tasks.

Oracle recommend the following minimum parameter settings.

“/etc/sysctl.conf” file.

[root@Databases Databases]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
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

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.

yum install binutils-2*x86_64*
yum install glibc-2*x86_64* nss-softokn-freebl-3*x86_64*
yum install glibc-2*i686* nss-softokn-freebl-3*i686*
yum install compat-libstdc++-33*x86_64*
yum install glibc-common-2*x86_64*
yum install glibc-devel-2*x86_64*
yum install glibc-devel-2*i686*
yum install glibc-headers-2*x86_64*
yum install elfutils-libelf-0*x86_64*
yum install elfutils-libelf-devel-0*x86_64*
yum install gcc-4*x86_64*
yum install gcc-c++-4*x86_64*
yum install ksh-*x86_64*
yum install libaio-0*x86_64*
yum install libaio-devel-0*x86_64*
yum install libaio-0*i686*
yum install libaio-devel-0*i686*
yum install libgcc-4*x86_64*
yum install libgcc-4*i686*
yum install libstdc++-4*x86_64*
yum install libstdc++-4*i686*
yum install libstdc++-devel-4*x86_64*
yum install make-3.81*x86_64*
yum install numactl-devel-2*x86_64*
yum install sysstat-9*x86_64*
yum install compat-libstdc++-33*i686*
yum install compat-libcap*

Create the new groups and users.

 groupadd -g 501 oinstall
 groupadd -g 502 dba
 groupadd -g 503 oper
 groupadd -g 504 asmadmin
 groupadd -g 506 asmdba
 groupadd -g 505 asmoper
useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
passwd oracle

Note: We are not going to use the “asm” groups, since this installation will not use ASM.

Amend the “/etc/security/limits.d/90-nproc.conf” file as described below.

# Change this
 *          soft    nproc    1024
# To this
 * - nproc 16384

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.

If you have the Linux firewall enabled, you will need to disable:

/etc/init.d/iptables stop

Or Configure Iptables to allow the databases ports.

Create this file and  change the ownership (the installation will use this later).

touch /etc/oratab
chown -R oracle:oinstall /etc/oratab

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

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

Login from terminal  and  make X11 enabled:

Edit the “.bash_profile” file of the oracle user.

# Oracle Settings
 TMP=/tmp; export TMP
 ORACLE_HOSTNAME=Databases.localdomain; export ORACLE_HOSTNAME
 ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
 ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOME
 PATH=/usr/sbin:$PATH; export PATH


Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable.

DISPLAY=<machine-name>:0.0; export DISPLAY

Go to the extracted Zip file and start  the installation under oracle user.

 [oracle@Databases database]$ ./runInstaller
 Starting Oracle Universal Installer...
 Checking Temp space: must be greater than 500 MB.   Actual 12551 MB    Passed
 Checking swap space: must be greater than 150 MB.   Actual 2803 MB    Passed
 Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
 Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-02-10_01-33-40PM. Please wait .

oracle11 oracle12 oracle13 oracle14 oracle15 oracle16 oracle17 oracle18 oracle19 oracle20

[root@Databases Databases]# /u01/app/oraInventory/
 Changing permissions of /u01/app/oraInventory.
 Adding read,write permissions for group.
 Removing read,write,execute permissions for world.
  Changing groupname of /u01/app/oraInventory to oinstall.
 The execution of the script is complete.
 [root@Databases Databases]#
[root@Databases Databases]# /u01/app/oracle/product/12.1.0/db_1/
 Performing root user operation for Oracle 12c
The following environment variables are set as:
 ORACLE_HOME=  /u01/app/oracle/product/12.1.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
 Copying dbhome to /usr/local/bin ...
 Copying oraenv to /usr/local/bin ...
 Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
 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 script.
 Now product-specific root actions will be performed.


Via password management, make a password for SYS and SYSTEM users:

oracle22 oracle23

Test your oracle Server (Listeneing  ports 1521/ managment http port 5500):

[root@Databases ~]# netstat  -an  |  grep  "::" | grep tcp
tcp        0      0 ::1:6010                    :::*                        LISTEN
tcp        0      0 :::5500                     :::*                        LISTEN
tcp        0      0 :::54570                    :::*                        LISTEN
tcp        0      0 :::111                      :::*                        LISTEN
tcp        0      0 :::1521                     :::*                        LISTEN
tcp        0      0 :::22                       :::*                        LISTEN
tcp        0      0 :::42230                    :::*                        LISTEN
tcp        0      0 ::1:631                     :::*                        LISTEN
tcp        0      0 ::1:25                      :::*                        LISTEN
tcp        0      0 ::ffff:      ::ffff:     ESTABLISHED

Point your browser with IP address https://ip:5500/em

Note: Iptables should be configured or disabled.


Login with sys or System as DBA to configure and add users and databases.



For questions please refer to our Q/A forum at :

Share this Article: Facebook73Google+2Twitter12LinkedIn0Reddit0Pinterest0StumbleUpon1Digg