Setting Up Prerequisites for Oracle 12c Installation in RHEL/CentOS/Oracle Linux 6.5 – Part I

Oracle database is the set of related data collections, we can call it as Relational database management system (RDBMS) or just Oracle. While comparing to any other database solution oracle is one of the powerful DBMS with many features such as tune-able, reliable and scalable. Oracle produce separate hardware for oracle software’s, but same can be used in any other vendor products too.

Update: How to Install Oracle Database 12c on RHEL/CentOS 7

In 1977 Larry Ellison and his friends founded a software development system as oracle. In 1978 Oracle released its 1st version and later in 1979 they released the version 2 which was commercially used. The current version of oracle is 12c (C stands for Cloud) with cloud features. Oracle provides several supports regarding the products which includes troubleshooting supports patches and updates, which makes it rock solid, because it is very easy to organize different applications data. While comparing to any other database management Oracle is costly and mostly used for commercial purpose, almost everywhere, e.g: Banking, Universities for results, commerce related departments etc.

Oracle supports almost every operating systems such as Linux, HP-UX, AIX, Oracle Solaris, IBM zLinux64, and Windows. Oracle packages are available for both 32bit and 64bit platforms.


  1. For large-scale installation we need to use multicore processors with High availability.
  2. Recommended minimum RAM needed for Oracle is 2GB or more.
  3. Swap must be enabled double the size of RAM.
  4. Disk space must be more than 8GB, its depends on edition which are we going to choose for installing.
  5. /tmp directory must have free space more than 1GB for error free installation.
  6. Supported Linux operating systems are RHEL, Centos, Oracle.
  7. Both x86_64 and i686 packages are required for installation.
  8. Screen resolution must be more than 1024×768 resolution.

If your systems meets all the above requirements, then we are ready to move forward to start oracle installation. Please remember, here I am using CentOS 6.5 operating system with 32GB size of Virtual HDD and 4GB Memory for installation, but same steps can also be followed in RHEL, Oracle Linux too.

My Testing Environment
IP Address	:
Host-name	:	oracle12c.tecmint.local
OS		:	Centos 6.5 Final

Note: I’ve used ‘tecmint‘ user with sudo privileges for this Oracle installation, but I strongly recommend you to use root login for all below installation instructions.

Step 1: Setting Hostname and Upgrading System

1. Before, heading up for the installation process, first makes sure your / and /tmp partitions has enough available space to carry error free installation.

$ df -h

2. Next, verify that your system has correct hostname, static IP address and distribution version, using following commands.

$ hostname
$ ifconfig | grep inet
$ lsb_release -a
Verify System Details
Verify System Details

3. If you’ve not set your system hostname, edit the system hosts file ‘/etc/hosts‘ and enter your hostname entry along with IP address as shown below.

$ vim /etc/hosts       localhost  oracle12c.tecmint.local   oracle12c.tecmint.local
Set System Hostname
Set System Hostname

4. Now change the SELinux mode to permissive and restart the system to make Permanent changes for selinux.

$ sudo vim /etc/sysconfig/selinux
$ sudo init 6
Set SeLinux Mode
Set SeLinux Mode

Step 2: Installing Packages and changing Kernel Values

5. Once your system boots up properly, you can do a system upgrade and then install following required dependencies.

$ sudo yum clean metadata && sudo yum upgrade

$ sudo yum install binutils.x86_64 compat-libcap1.x86_64 compat-libstdc++-33.x86_64 compat-libstdc++-33.i686 \ 
compat-gcc-44 compat-gcc-44-c++ gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 \ 
ksh.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libaio.i686 \
libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libXext.i686 libXext.x86_64 libXtst.i686 libXtst.x86_64 libX11.x86_64 \ 
libX11.i686 libXau.x86_64 libXau.i686 libxcb.i686 libxcb.x86_64 libXi.i686 libXi.x86_64 make.x86_64 unixODBC unixODBC-devel sysstat.x86_64

6. After installing all the above needed packages, now it’s time to do some changes at kernel level parameters in ‘/etc/sysct.conf file.

$ sudo vim /etc/sysctl.conf

Add or change the following values as suggested. Save and quit using wq!.

kernel.shmmax = 4294967295
kernel.shmall = 2097152
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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
Add Kernel Parameters
Add Kernel Parameters

7. Once you’ve added above values, now issue following command to take new changes into effect.

$ sudo sysctl -p
Load Kernel Parameters
Load Kernel Parameters

Note: The above values are half the size of physical memory in bytes. For example, have assigned 5GB memory for my virtual machine. So I’m using half of the memory for these settings.

8. Now it’s time to restart the machine and move further instructions on installing Oracle database.

$ sudo init 6

Step 3: Configuring System for Oracle Installation

9. Create the new groups Oracle inventory, OSDBA and OSOPER for Oracle installation.

$ sudo groupadd -g 54321 oracle
$ sudo groupadd -g 54322 dba
$ sudo groupadd -g 54323 oper
Create Oracle Groups
Create Oracle Groups

10. Create the new user oracle and add the user to already created groups.

$ sudo useradd -u 54321 -g oracle -G dba,oper oracle
$ sudo usermod -a -G wheel oracle
$ sudo passwd oracle
Create Oracle User
Create Oracle User

11. If your system is enabled with firewall, you need to disable or configure it according to your needs. To disable it, run the following commands.

$ sudo iptables -F
$ sudo service iptables save
$ sudo chkconfig iptables on
Disable CentOS Firewall
Disable Firewall

12. Create the following directory for installing Oracle and change the ownership and grand permission to the newly created directory using recursive.

$ sudo mkdir -p /u01/app/oracle/product/12.1.0/db_1
$ sudo chown -R oracle:oracle /u01
$ sudo chmod -R 775 /u01
$ ls -l /u01
Create Oracle Directory
Create Oracle Directory

13. Switch to root user to create environment for oracle user. You can skip this step, if you’re already using root login.

$ su - root

14. Next, we need to add the environmental variable for oracle user. Open and edit the profile file of oracle user and append the oracle environment entries. Here we don’t need to use sudo command, as we are already logged in as root user.

# vim /home/oracle/.bash_profile

Append the below Environment Entry. Save and exit the vi editor using wq!.

## Oracle Env Settings 

export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=oracle12c.tecmint.local
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl

export PATH=/usr/sbin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Add Environment Variables
Add Environment Variables

Now exit from root user and login again as tecmint user and switch to oracle user. Again, this step is not required, if you are already using root account, just switch to oracle user for further instructions.

# exit  
# su - oracle

15. Here we need to check for the resource limits for oracle installing user. Here our Oracle installer user is oracle. So we must be logged in as oracle user, while doing resource check. Check for the soft and hard limits for file descriptor settings before installation.

$ ulimit -Sn
$ ulimit -Hn
$ ulimit -Su
$ ulimit -Hu
$ ulimit -Ss
$ ulimit -Hs
Check Resource Limits
Check Resource Limits

You may get different values in the above command. So, you need to manually assign the values for limits in configuration file as shown below.

$ sudo vim /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
Assign Limits Values
Assign Limits Values

Next, edit the below file to set the limit for all users.

$ sudo vim /etc/security/limits.d/90-nproc.conf

By default it was set to

* soft nproc 1024

We need to change it to.

* - nproc 16384
Set User limits
Set User limits

Step 4: Downloading Oracle Packages

16. Then its time to pull down the oracle zip package from official site. To download Oracle package, you must be registered user or else sing-up and download the package using the below link.

  1. Oracle Database Software Downloads

I have already downloaded the zip package and extracted the contents of oracle installer.

$ cd ~
$ ls
$ unzip
$ unzip

That’s it for now, the article getting too lengthy and I can’t include all instructions in a one single page. So, in our next article we will show you step-by-step instructions on Oracle 12c installation and further configurations, till then stay tuned to Tecmint for latest updates.

Read Also: Installing Oracle 12c in RHEL/CentOS/Oracle Linux 6.5 – Part II

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

16 thoughts on “Setting Up Prerequisites for Oracle 12c Installation in RHEL/CentOS/Oracle Linux 6.5 – Part I”

    • Hi Bob,

      It’s the default UID and GID for oracle installation you can define your own, But if you keep the default and common for every installation in your environment it will be easier for migration, mount NFS etc..


Leave a Reply to Bob Cancel reply

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.