Step by Step Oracle 12c Database Installation on Linux



Last updated on May 4th, 2017 at 05:28 pm

I will be posting the step by step Oracle 12c Database Installation on Linux. First we will performing the binaries installation and then creating the database using dbca

Package and OS requirements

We can install the Oracle Provided 12c preinstall package to meet the  Package and OS requirement
running the below yum command (as root):
yum install oracle-rdbms-server-12cR1-preinstall

Download the database 12c software

You need to download both Oracle Database 12c parts from the Oracle Technology Network (OTN)

Once you’ve downloaded the software, unzip both files to a staging area:
unzip /home/oracle/linuxamd64_12c_database_se2_1of2.zip -d /u50/app/oracle/software
unzip /home/oracle/linuxamd64_12c_database_se2_2of2.zip -d /u50/app/oracle/software

All of the contents from the above will be extracted to a “database” directory.

Start the installation

Open an X-Windows session to the server as the ‘oracle’ user.

/u50/app/oracle/software/database/runInstaller

Once the GUI starts, respond as follows:

Step by Step Oracle 12c Database Installation on Linux_1

Click Next

Step by Step Oracle 12c Database Installation on Linux_2

Choose install Database software only

Step by Step Oracle 12c Database Installation on Linux_3

Choose Single instance installation

Step by Step Oracle 12c Database Installation on Linux_4

Choose Next
Step by Step Oracle 12c Database Installation on Linux_5

We are here doing standard edition  installation. You can do whatever licence you have

Step by Step Oracle 12c Database Installation on Linux_6

Give the location of Oracle base and Oracle Home directory

Step by Step Oracle 12c Database Installation on Linux_7

 

Step by Step Oracle 12c Database Installation on Linux_8

When Prompted run below scripts

When prompted, run the following as root:

/u50/app/oraInventory/orainstRoot.sh (first Oracle installations only)

/u50/app/oraInventory/orainstRoot.sh

Changing permissions of /u50/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

/u50/app/oracle/product/12.1.0.2/root.sh

/u50/app/oracle/product/12.1.0.2/root.sh

Performing root user operation for Oracle 12c

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u50/app/oracle/product/12.1.0.2

Enter the full pathname of the local bin directory: [/usr/local/bin]: <enter>
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.

Step by Step Oracle 12c Database Installation on Linux_9

This conclude the Oracle Binaries installation.

Now lets do the create database

./dbca

Step by Step Oracle 12c Database Installation on Linux_10

Step by Step Oracle 12c Database Installation on Linux_11

We are choosing the defualt option as it will ask for less question. Then click next

After prerequiste check ,database should create successfully

Post Installation Configuration Steps.

1) Set the values in .bash_profile for Oracle Environment

export ORACLE_BASE=/u50/app/oracle
export ORACLE_HOME==/u50/app/oracle /product/12.1.0.2
export ORACLE_SID=TEST
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

2) Do the Listener Configuration

Listener Configuration:                 $ORACLE_HOME/network/admin/listener.ora
TEST =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TECH.com)(PORT = 1521))
)
)
SID_LIST_TEST =
(SID_LIST =
(SID_DESC =(ORACLE_HOME= /u50/app/oracle/product/12.1.0.2)
(SID_NAME = TEST)
)
)

3) TNS Configuration:   $ORACLE_HOME/network/admin/tnsnames.ora

TEST=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=TECH.com)(PORT=1521))
(CONNECT_DATA=
(SID=TEST)
)
)

4) How to Login to 12c database

$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Sun Jun 30 14:52:50 2013Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> select status from v$instance;
STATUS
————————————
OPEN
SQL> select name from v$database;
NAME
—————————
TEST

 

Known issues with Oracle 12c Installation(ALL OS)

1) Dbca/dbua  gives issues

UnsatisfiedLinkError exception loading native library: njni12
java.lang.UnsatisfiedLinkError: njni12 (rtld: 0712-001 Symbol CreateIoCompletionPort was referenced
from module /u01/products/rdbms_12102/lib/libnjni12.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-001 Symbol GetMultipleCompletionStatus was referenced
from module /u01/products/rdbms_12102/lib/libnjni12.so(), but a runtime definition
of the symbol was not found.
rtld: 0712-002 fatal error: exiting.)
Exception in thread “main” java.lang.UnsatisfiedLinkError: oracle/net/common/NetGetEnv.get(Ljava/lang/String;)Ljava/lang/String;

Oracle NOTE : 1949184.1

CAUSE

IOCP module not enabled on the server.
To check if the IOCP module is enabled, run the lsdev command:
The following sample output shows the IOCP status is set to Defined and hence not enabled:

$ lsdev | grep iocp
iocp0       Defined  I/O Completion Ports

By default, IOCP is set to Defined.

SOLUTION

Enable the “iocp” option and  relink the oracle binaries.
To enable IOCP, set IOCP to Available using the following procedure:
Log in as root and run the following command:

smitty iocp

Select Change / Show Characteristics of I/O Completion Ports.
Change configured state at system restart from Defined to Available.
Run the lsdev command to confirm the IOCP status is set to Available:

$ lsdev | grep iocp
iocp0 Available I/O Completion Ports

Perform a system restart to make the changes permanent.
Relink the binaries using ” relink all ” and then root.sh as root user.

 

2) 12.1.0.2 Installation fails with error:

PRVG-11322 : One or more node names “host_name” contain one or more of the following invalid characters “_”

Cause

As per standards for protocols RFC 952 , host names cannot contain the underscore character (“_”)

Solution

The 12.1.0.1 & earlier versions, were able to install on hostaname with underscore “” , as there was no pre check during the installation for hostaname with underscore (“”).
Now this is fixed in 12.1.0.2 . And from 12.1.0.2, the CVU checks for hostaname with underscore “” and the installation will fail, if it finds the hostaname with underscore “
3) Oracle 12c Installation fails with PRCI-1113 PRVF-5300 PRKC-1032

While performing the 12c standalone installation, the installer is failing with below error:

ERRORMSG(localhost): PRCI-1113 : Directory /u01/app/oracle/product/12.1.0.2/grid does not exist

ERRORMSG(localhost): PRCI-1113 : Directory /u01/app/oracle/product/12.1.0.2/grid does not exist

ERRORMSG(localhost): PRVF-5300 : Failed to retrieve active version for CRS on this node

PRKC-1032 : Directory /u01/app/oracle/product/12.1.0.2/grid does not exist

INFO: Executing action at state performChecks

INFO: CVU PREREQ LOCATION SET TO: /Patchsets/12.1.0.2.0/database/database/install/../stage/cvu/cvu_prereq.xml

INFO: CVU tracingEnabled = false

INFO: Nodes are prepared for verification.

SEVERE: [FATAL] An internal error occurred within cluster verification framework

ERRORMSG(localhost): PRCI-1113 : Directory /u01/app/oracle/product/12.1.0.2/grid does not exist

ERRORMSG(localhost): PRCI-1113 : Directory /u01/app/oracle/product/12.1.0.2/grid does not exist
ERRORMSG(localhost): PRVF-5300 : Failed to retrieve active version for CRS on this node
PRKC-1032 : Directory /u01/app/oracle/product/12.1.0.2/grid does not exist.
Refer associated stacktrace #oracle.install.commons.util.exception.DefaultErrorAdvisor:696
INFO: Advice is ABORT
SEVERE: Unconditional Exit
INFO: Adding ExitStatus FAILURE to the exit status set

The OUI / Installer is detecting the references for earlier installed GI home. Due to the previous failed GI / ASM installation and GI / ASM as it was not removed or cleaned up.

Solution

Remove any references for GI Home /u01/app/oracle/product/12.1.0.2/grid.
Delete the files:

/var/tmp/.oracle
/etc/oracle/ocr.loc and /etc/oracle/olr.loc files.

what is Oracle 12c
The Oracle first database designed for the cloud. Oracle Database 12c also introduces 500 new features to the database, most notably pluggable databases and multitenant architecture
Related Oracle 12 Articles
Top Oracle 12c New Features for developers

Leave a Reply