How to install Oracle Database 12c on RedHat Enterprise Linux 6

IMHO, installing Oracle Database is not straight forward. There are lots of prerequisites packages and configurations that need to be installed and configured before you can actually install Oracle Database. Especially if you have a headless server that does not have any physical display attached to it, because you cannot install Oracle Database on a headless server without a response file (a response file is basically a configuration file that automate the installation process – however in order to create a response file, you will need another machine with display). Oh yes, I don’t have any other machine, and for god sake, I only want to install a single instance of Oracle Database, so why so complicated?

By the way, here is the full instruction that will help you install a single instance Oracle Database, straight forward from the beginning to the end.

A. Install prerequisites packages and configuration

Oracle has a very handy package called oracle-rdbms-server-12cR1-preinstall however it’s only available for Oracle Linux (yes, Oracle Linux). However, we can easily add yum repository to RHEL and install that package:

sudo wget http://public-yum.oracle.com/public-yum-ol6.repo -O /etc/yum.repos.d/public-yum-ol6.repo
sudo wget http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

After this, installing prerequisites packages is straight forward:

yum install oracle-rdbms-server-12cR1-preinstall

B. Install Oracle Database

Since our server does not have any physical display attached to it, we need to create a virtual display and use X11 forwarding to setup Oracle Database. First step is to create virtual display

xorg-x11-server-Xvfb

Login under “oracle” account (this account should be created when we install prerequisites packages) and create a virtual display:

Xvfb :1 -screen 0 1280x1024x24

Fire another SSH session with parameter -X (to enable X11 forwarding) and login under “oracle” account. Then, download and extract 2 installation files into the same directory and run the Oracle Universal Installer

unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
cd database
./runInstaller -ignorePrereq

Note that you will have to use -ignorePrereq parameter to bypass prerequisites check (since we’ve already installed it by the way)

OUI will open up a Installation window and things will be pretty straight forward from now on.