Home / 12c / Installation Oracle Database 12C Release 2 (12.2) on Oracle Linux 6 (OEL6) and 7(OEL7)
This article describes the installation of Oracle Database 12c Release 2 (12.2) 64-bit on Oracle Linux 6 (OL6) and 7 (OL7) 64-bit. The article is based on a server installation with a minimum of 2G swap and secure Linux set to permissive. An example of this type of Linux installation can be seen here

Installation Oracle Database 12C Release 2 (12.2) on Oracle Linux 6 (OEL6) and 7(OEL7)

This article presents how to install Oracle Database 12C(12.2) Release 2 on Oracle Enterprise Linux 7 (OEL7). you can install on Oracle VirtualBox. To easy our installation procedure on VirtualBox we need to install Oracle VirtualBox Gust Addition.

Download Software

Download the Oracle software from OTN or MOS depending on your support status.

Unpack Files

After downloading unzip the file.

You should now have a single directory called “database” containing installation files.

Hosts File

The “/etc/hosts” file must contain a fully qualified name for the server.

For example.

Set the correct hostname in the “/etc/hostname” file.


Oracle Installation Prerequisites

You can perform either the Automatic Setup or the Manual Setup to complete the prerequisites. The Additional Setup is required for all installations.

Setup Using RPM

If you plan to use the “oracle-database-server-12cR2-preinstall” package to perform all your prerequisite setup, issue the following command.

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

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 according to your OS version.


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”.

Run the following command to change the current kernel parameters.

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

Someone in the comments suggested you might need to add the previous lines into the “/etc/security/limits.conf” file also for CentOS7. This is definitely not needed for OL7, but worth considering if the installer gives prerequisite failures for these settings.

The following packages are listed as required, including the 32-bit version of some of the packages. Many of the packages should be installed already.

Create the new groups and users.

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.

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.

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

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

Putting mount points directly under root is typically a bad idea. It’s done here for simplicity, but for a real installation “/” should be reserved for the OS.

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

Create a “scripts” directory.

Create an environment file called “setEnv.sh”.

Note:  The scripts are created using the cat command, with all the “$” characters escaped. If you want to manually create these files, rather than using the cat command, remember to remove the “” characters before the “$” characters.

Add a reference to the “setEnv.sh” file at the end of the “/home/oracle/.bash_profile” file.

Create a “start_all.sh” and “stop_all.sh” script that can be called from a startup/shutdown service. Make sure the ownership and permissions are correct.

Once the installation is complete and you’ve edited the “/etc/oratab”, you should be able to start/stop the database with the following scripts run from the “oracle” user.


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

Start the Oracle Universal Installer (OUI) by issuing the following command in the database directory.

The “Database Configuration Assistant Complete” screen displays the Database Express 12c URL, which will be something like “https://ol7.localdomain:5500/em”.


Post Installation

Edit the “/etc/oratab” file setting the restart flag for each instance to ‘Y’.

For more information see:

Check Also


Oracle Database 12c – How to Add / Multiplex Control Files

PURPOSE: – protect your Database in case of a disk failure – reduce the risk …


Oracle Database 12c Release 1 (12.1) Installation on Oracle Linux 7 (OL7.2)

Table of Contents ▼▲ Note from Oracle Database 12c R1 Installation Guide: Starting with Oracle …