Oracle

Oracle Database 11g Release 2 Installation on RHEL/CentOS 6.x/5.x/4.x

Oracle Database 11g Release 2 Installation on RHEL/CentOS 6.x/5.x/4.x &-8211; this Article or News was published on this date:2019-05-28 19:43:13 kindly share it with friends if you find it helpful

As we all know Oracle database is the most popular and widely used Relational Database Management System (RDBMS) in the world. This post describes step by step installation of Oracle Database 11g Release 2 32bit on CentOS 6.4 32bit. The installation steps should not be vary on most of the Red Hat based Linux distributions.

Installing Oracle Database 11g Release 2

Step 1: Install Oracle Dependencies

We use “oracle-rdbms-server-11gR2-preinstall” package offered by “Oracle Public Yum” repository. The Oracle public yum repository provides a free and easiest way to install all the latest Oracle Linux dependencies automatically. To setup yum repository, follow the instructions provided below.

Use “wget” command to Download appropriate yum configuration file under /etc/yum.repos.d/ directory as root user.

RHEL/CentOs 6.x
- cd /etc/yum.repos.d
- wget https://public-yum.oracle.com/public-yum-ol6.repo
RHEL/CentOs 5.x
- cd /etc/yum.repos.d
- wget https://public-yum.oracle.com/public-yum-el5.repo
RHEL/CentOs 4.x
- cd /etc/yum.repos.d
- wget https://public-yum.oracle.com/public-yum-el4.repo

Now perform the following “yum” command to install all the necessary prerequisites automatically.

[[email protected]]- yum install oracle-rdbms-server-11gR2-preinstall

While importing GPG key, you might get “GPG key retrieval failed” error as shown below. Here, you need to import proper GPG key for your OS release.

Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
GPG key retrieval failed: [Errno 14] Could not open/read file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle

Download and verify the appropriate Oracle Linux GPG Key that best matches your RHEL/CentOS compatible OS release.

RHEL/CentOs 6.x
- wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol6 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
RHEL/CentOs 5.x
- wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
RHEL/CentOs 4.x
- wget https://public-yum.oracle.com/RPM-GPG-KEY-oracle-el4 -O /usr/share/rhn/RPM-GPG-KEY-oracle

Step 2: Setting Hostname

Open the “/etc/sysconfig/network” file and modify the HOSTNAME to match your FQDN (Fully Qualified Domain Name) host name.

[[email protected]]- vi /etc/sysconfig/network
HOSTNAME=oracle.sfnews.com

Open “/etc/hosts” file and add fully qualified hostname for the server.

[[email protected]]- vi /etc/hosts
192.168.246.128		oracle.sfnews.com		oracle

Now you need to restart networking on the server to make sure that changes will be persistent on reboot.

[[email protected]]- /etc/init.d/network restart

Step 3: Oracle User Settings

Set the password for the “oracle” user.

[[email protected]]- passwd oracle

Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.

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

[[email protected]]- vi /etc/security/limits.d/90-nproc.conf
- Default limit for number of user's processes to prevent
- accidental fork bombs.
- See rhbz -432903 for reasoning.

*          soft    nproc     1024
- To this
* - nproc 16384

Set SELinux to “permissive” mode by editing the file “/etc/selinux/config“.

[[email protected]]- vi /etc/selinux/config
SELINUX=permissive

Once you’ve made change, don’t forger to restart the server to reflect new changes.

[[email protected]]- reboot

Login as Oracle user and open file “.bash_profile“, which is available on oracle user’s home directory, make an entries as described below. Make sure you set correct hostname to “ORACLE_HOSTNAME=oracle.sfnews.com“.

[[email protected]]- su oracle
[[email protected] ~]$ vi .bash_profile
- Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=oracle.sfnews.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH export PATH

Switch to root user and issue the following command to allow Oracle user to access X Server.

[[email protected]]- xhost +

Create the directories and set the appropriate permissions in which the Oracle software will be installed.

[[email protected]]- mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
[[email protected]]- chown -R oracle:oinstall /u01
[[email protected]]- chmod -R 775 /u01

Step 4: Downloading Oracle Software

Sign-up and Download the Oracle software using the following link.

  1. Oracle Database 11g Release 2
Download Oracle 11g Release 2Download Oracle 11g Release 2

Download Oracle 11g Release 2

The Oracle package contains 2 zip files which you must first accept the license agreement before downloading. I’ve given the files names for you reference, please download these files for your system architecture somewhere under “/home/oracle/“.

For Linux x86 Systems
http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_1of2.zip
http://download.oracle.com/otn/linux/oracle11g/R2/linux_11gR2_database_2of2.zip
For Linux x86-64 Systems
http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip
http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip

Step 5: Oracle Installation

Now let’s start Oracle installation. First of all need to switch as ‘oracle’ user to install database.

[[email protected] ~]$ su oracle

Extract compressed Oracle database source files to the same directory “/home/oracle/“.

[[email protected] ~]$ unzip linux_11gR2_database_1of2.zip

[[email protected] ~]$ unzip linux_11gR2_database_2of2.zip

Post unzip source file, directory called database will be created, go to inside the directory and execute below script to start Oracle database installation process.

[[email protected] database]$ cd database

[[email protected] database]$ ./runInstaller

1. RunInstaller will call Oracle Universal Installer (OUI), wherein look and feel & steps are the same across all the operating system.

Download Oracle 11g Release 2Oracle Universal Installer

Oracle Universal Installer

2. Provide your email address to be informed of security issues and receive security updates.

Download Oracle 11g Release 2Configure Security Updates

Configure Oracle Security Updates

3. Create and Configure a Database

Download Oracle 11g Release 2Create Oracle Database

Create Oracle Database

4. Choose the system class, either Desktop or Server.

Download Oracle 11g Release 2Select System Class

Select Oracle System Class

5. Select the type of database installation you want to perform.

Download Oracle 11g Release 2Oracle Node Selection

Select Database Installation Type

6. Select “Typical install” option to install full oracle installation with basic configuration.

Download Oracle 11g Release 2Select Oracle Install Type

Select Typical Install

7. Set Administrative password and perform full Database installation with basic configuration.

Download Oracle 11g Release 2Oracle Typical Installation Configuration

Set Oracle Administrative Password

8. Please click on “Yes” to continue with installation.

Download Oracle 11g Release 2Oracle Typical Install Configuration

Typical Install Configuration Confirm

9. Create Inventory

Download Oracle 11g Release 2Create Oracle Inventory

Create Inventory

10. If you faced prerequisites warning during installation. Click on “Fix & Check Again“. Oracle fixes Prerequisites by itself. This is the new feature of Oracle Database 11g.

Download Oracle 11g Release 2Perform Prerequisite Checks

Perform Prerequisite Checks

The pdksh package is not available in Oracle repository due to which you need to download and install it manually.

[[email protected]]- wget ftp://rpmfind.net/linux/redhat-archive/6.2/en/os/i386/RedHat/RPMS/pdksh-5.2.14-2.i386.rpm

During pdksh package installation you may encountered conflict error of ksh package. Remove ksh package forcefully and install the pdksh package with given below command:-

[[email protected]]- rpm -e ksh-20100621-19.el6_4.4.i686 --nodeps
[[email protected]]- rpm -ivh pdksh-5.2.14-2.i386.rpm

11. Performing Prerequisite checks: It’s test whether sufficient total SWAP space is available on the system.

Download Oracle 11g Release 2Performing Prerequisite SWAP Check

Performing Prerequisite SWAP Check

12. Installation Summary: Click on Save Response File. This file is useful for Oracle Silent Mode Installation

Download Oracle 11g Release 2Oracle Installation Summary

Oracle Installation Summary

13. Save Response File somewhere in your system.

Download Oracle 11g Release 2Save Response File

Save Response File

14. Product Installation Progress

Download Oracle 11g Release 2Install Oracle Product

Product Install

15. Copying database files

Download Oracle 11g Release 2Copying Database Files

Copying Database Files

16. Click on “Password Management“.

Download Oracle 11g Release 2Oracle Password Management

Oracle Password Management

17. Set password for user “SYS” and click on OK to continue.

Download Oracle 11g Release 2Set SYS User Password

Set SYS User Password

18. Configuration scripts need to be executed as the “root” user. Go to the path given in the screen and execute the scripts one by one. Click on ‘OK‘ once scripts is executed.

Download Oracle 11g Release 2Execute Configuration Scripts

Execute Configuration Scripts

[[email protected]]- cd /u01/app/oraInventory
[[email protected] oraInventory]- ./orainstRoot.sh
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.
[[email protected]]- cd /u01/app/oracle/product/11.2.0/dbhome_2/
[[email protected] dbhome_2]- ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_2

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.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

19. The installation of Oracle Database is successful.

Download Oracle 11g Release 2Oracle Installation Completed

Oracle Installation Finish

20. To test your Oracle installation navigate to web based management interface for your system at “localhost” with the user name “SYS” connecting as “SYSDBA” and using the password you set during the install of Oracle. Remember to open port 1158 on your firewall and restart the iptables service.

[[email protected]]- iptables -A INPUT -p tcp --dport 1158 -j ACCEPT
[[email protected]]- service iptables restart
https://localhost:1158/em/
Download Oracle 11g Release 2Oracle Enterprise Manager Login

Oracle Enterprise Manager Login

21. Oracle Enterprise Database Control Manager

Download Oracle 11g Release 2Oracle Database Control Manager

Oracle Database Control Manager

Now you can start using Oracle. I highly recommend you to follow the Oracle Documentation for more help. There are number of client applications out there which can help you, like the command line tool called Oracle Instant Client and the Oracle SQL Developer UI program.

This is end of the Oracle Database Software Installation. In our upcoming article we will be covering how to create database using DBCA and how to Start-up and Shutdown Oracle Database. Please stay tuned…!!!

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

Setting Up Prerequisites for Oracle 12c Installation in RHEL/CentOS/Oracle Linux 6.5 &-8211; Part I &-8211; this Article or News was published on this date:2019-05-28 19:00:11 kindly share it with friends if you find it helpful

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.

Requirements

  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	:	192.168.0.100
Host-name	:	oracle12c.sfnews.local
OS		:	Centos 6.5 Final

Note: I’ve used ‘sfnews‘ 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 DetailsVerify 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

127.0.0.1       localhost  oracle12c.sfnews.local
192.168.0.100   oracle12c.sfnews.local
Verify System DetailsSet 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
Verify System DetailsSet 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
Verify System DetailsAdd 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
Verify System DetailsLoad 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
Verify System DetailsCreate 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
Verify System DetailsCreate 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
Verify System DetailsDisable 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
Verify System DetailsCreate 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.sfnews.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 PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Verify System DetailsAdd Environment Variables

Add Environment Variables

Now exit from root user and login again as sfnews 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
Verify System DetailsCheck 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
Verify System DetailsAssign 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
Verify System DetailsSet 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 linuxamd64_12c_database_1of2.zip
$ unzip linuxamd64_12c_database_2of2.zip

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 sfnews for latest updates.

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

Installing and Configuring Oracle 12c in RHEL/CentOS/Oracle Linux 6.5 – Part II

Installing and Configuring Oracle 12c in RHEL/CentOS/Oracle Linux 6.5 &-8211; Part II &-8211; this Article or News was published on this date:2019-05-28 18:59:41 kindly share it with friends if you find it helpful

In our previous article, we’ve shown you how to setup prerequisites for Oracle 12c installation. In this article we will cover installation and configuration of Oracle 12c in RHEL/CentOS/Oracle Linux 6.5, along with some Oracle post installation instructions.

Oracle 12c Installation in CentosOracle 12c Installation in Centos

Oracle 12c Installation

Requirements

  1. Installing Prerequisites for Oracle 12c in RHEL/CentOS/Oracle Linux 6.5 – Part I

Installing Oracle 12c Database in CentOS 6.5

1. After extracting, we will get database directory which has 2.6GB in size. So, next we can go-head and install the oracle. Let us start the installation by running runInstaller. Navigate the installer Directory and run the Installer.

- cd database/
- ./runInstaller

Our Installer has been launched here. For every steps we need to move forward by Clicking Next or OK.

Oracle 12c Installation in CentosOracle 12c Installer in RHEL

Oracle 12c Installer

Configure Security Updates

2. I’m going to skip this step as I don’t want security updates. Un-check the check box and mark the checkbox that says “Wish to receive security updates via My Oracle Support“.

Oracle 12c Installation in CentosOracle Security Updates

Security Updates

Click on Next, you will get a error saying that you’ve not provided and email address click Yes to continue.

Oracle 12c Installation in CentosEnter Email Address

Enter Email Address

Software Updates

3. While we skiped the email step by default it will choose skip software updates Click next to continue.

Oracle 12c Installation in CentosSkip Software Updates

Skip Software Updates

Here I have resolved every dependencies but still it says that I have not reached the minimum requirements. Don’t worry, you can move forward to choose Yes to continue.

Oracle 12c Installation in CentosOracle Requirement Check

Oracle Requirement Check

Installation Option

4. Next, choose the type of installation, I’m choosing the first option to Create and configure a database.

Oracle 12c Installation in CentosOracle Installer type

Oracle Installer type

System Class

5. I’m going to choose Server Class here. If we need to install in any Desktop machines we can choose the above Option as Desktop Class.

Oracle 12c Installation in CentosSystem Class Installation

System Class Installation

Grid Installation Options

6. We are going to setup only single instance database installation here. So, select the first option.

Oracle 12c Installation in CentosSingle Instance Database

Single Instance Database

Install Type

7. Choose the Advance install option to get more option while going through Installation steps.

Oracle 12c Installation in CentosSelect Oracle Advance Install

Select Advance Install

Product Languages

8. By Default Language will be chooses as English. If you need to change according to your language, choose from the below list.

Oracle 12c Installation in CentosSelect Oracle Language Type

Select Language Type

Database Edition

9. Time to choose which edition of database installation we looking for. For large scale Productions we can use Enterprise or if we need standard edition or we can choose the options as mentioned there. We need more than 6.5 GB space for Enterprise installation because database Population will grow soon/increase.

Oracle 12c Installation in CentosSelect Oracle Database Edition

Select Database Edition

Installation Location

10. Enter the Oracle base installation location, here all installed configurations files will be stored. Here you need to define the location of oracle installation path, as we created the location in step -12 in the first part of this article.

Oracle 12c Installation in CentosSelect Oracle Installation Location

Select Oracle Installation Location

Creating Inventory

11. For the first time installation, every Inventory files will be created under ‘/u01/app/oralnventory‘ directory. We have created the group oracle for installation. So now the oracle group has permission to access Inventory Directory. Let us choose the Oracle as the Group for Operating system group.

Oracle 12c Installation in CentosCreate Oracle Inventory

Create Inventory

Configuration Type

12. Select the type of database, you want to create. Since, we are using for General purpose, so choosing general from the below options and click Next.

Oracle 12c Installation in CentosOracle Configuration Type

Configuration Type

Database identifiers

13. Specify the Global Database name for uniquely identified and un-check the Create as Container database, as here we are not going to create multiple databases.

Oracle 12c Installation in CentosDatabase Identifiers

Database Identifiers

Configuration Options

14. In my installation, I have assigned 4GB of Memory to my virtual machine, but this is not enough for Oracle. Here we need to Enable allocate memory automatically for the use of system global Area.

Check the box that says Enable Automatic Memory Management and keep the default allocate memory. If we need some sample schema’s we can check and continue for installation.

Oracle 12c Installation in CentosOracle Configuration Options

Configuration Options

Database Storage

15. We need to choose the location to store the database storage. Here I’m going to assign ‘/u01/app/oracle/oradata‘ location to save the databases and Click Next to continue to installer steps.

Oracle 12c Installation in CentosDefine Database Storage

Define Database Storage

Management Options

16. I don’t have a Cloud control manager credentials from oracle, so I have to skip this step.

Oracle 12c Installation in CentosManagement Options

Management Options

Recovery Options

17. If we have to Enable recovery options, then we have to check the Enable Recovery. In real environment these options are Compulsory to setup. Here to enable this option we need to add separate group and we need to define one of the file system location rather than default location where our database save.

Oracle 12c Installation in CentosRecovery Options

Recovery Options

Schema Passwords

18. We need to define the password for starter database which is all pre-loaded while the installations. Password must contain alphanumeric, upper_case and lower_case. For example, my password is Redhat123. This password we will use in web interface login too.

Oracle 12c Installation in CentosSet Password

Set Password

Operating system Groups

19. We need to provide system privileges to create database for that we need to choose the oracle group. Choose oracle for every options.

Oracle 12c Installation in CentosSelect Oracle Group

Select Oracle Group

Summary

20. At last we can review every settings before database population. If we need any changes we can edit the settings.

Oracle 12c Installation in CentosReview Summary

Review Summary

Install Product

21. Installation started to Preparation and copying files. This will take long time to complete according to our Hardware Resource.

Oracle 12c Installation in CentosOracle Installation Process

Oracle Installation Process

22. During setup process, it will ask to run two scripts as a root user as shown in the below picture.

Oracle 12c Installation in CentosRun Configuration Scripts

Run Configuration Scripts

Login into your Oracle Server as root user and switch to ‘/‘ partition and execute below scripts as shown.

- cd /
- ./u01/app/oralnventory/orainstRoot.sh
- ./u01/app/oracle/product/12.1.0/db_1/root.sh

During the script execution process, might it will ask you to enter the full path-name of the local bin directory, just enter the path as shown below and press Enter.

/usr/bin
Oracle 12c Installation in CentosScript Execution Process

Script Execution Process

23. After successfully execution of above two scripts, we need to move forward by clicking on OK.

Oracle 12c Installation in CentosCopying Database Files

Copying Database Files

24. After finishing all the above tasks successfully, we will receive the Database Configuration Assistant window with the all the details and it will show you the EM Database Express URL. Click OK to move forward.

https://oracle12c.sfnews.local:5500/em
Oracle 12c Installation in CentosDatabase Configuration Assistant

Database Configuration Assistant

If you wish to change the database accounts password, you can use the password management.

Oracle 12c Installation in CentosPassword Management

Password Management

That’s it! We’ve successfully completed Database Configuration, now click Next to continue installation process.

Oracle 12c Installation in CentosDatabase Configuration Completed

Database Configuration Completed

Finally Oracle Database installation was successfully completed. Click on Close to quit the Oracle Installer.

Oracle 12c Installation in CentosOracle Installation Completed

Oracle Installation Completed

25. After completing the Database installation, now move ahead to do some Post installation configuration. Open file ‘oratab‘ using vi editor.

- vim /etc/oratab

After opening file, search for the the following line.

orcl:/u01/app/oracle/product/12.1.0/db_1:N 

And change the parameter N to Y as shown.

orcl:/u01/app/oracle/product/12.1.0/db_1:Y

Restart the machine to take new changes.

26. After restarting machine, verify that the listener is up and running using ‘lsnrctl status‘ command.

- lsnrctl status
Oracle 12c Installation in CentosVerify Oracle Listener

Verify Oracle Listener

If it does not start automatically, you will need to start it manually using ‘lsnrctl start‘ command.

- lsnrctl start
Oracle 12c Installation in CentosStart Oracle Listener

Start Oracle Listener

Note: If the lsnrctl does not start, read the troubleshooting step (mentioned at the end of the article) to get fix the errors if any and try to start the listener.

27. Next login into Oracle database as a Operating system user using sysdba and start-up the database.

- sqlplus / as sysdba
- startup
Oracle 12c Installation in CentosConnect Oracle Database

Connect Oracle Database

28. Now it’s time to access Oracle Web interface at the following addresses.

https://oracle12.sfnews.local:5500/em

OR

https://192.168.0.100:5500/em

When EM Express prompts you for your username and password, Use to log in as a user with DBA privilege such as SYS or SYSTEM and use the password which we used for Schema password.

Login User = SYSTEM
Password   = Redhat123
Oracle 12c Installation in CentosLogin Oracle Web

Login Oracle Web

29. After login into the Oracle panel, you can see the main interface as Database Home and few screen shot as shown below.

Oracle 12c Installation in CentosOracle Database Home

Oracle Database Home

Oracle 12c Installation in CentosOracle Memory Management

Oracle Memory Management

Oracle 12c Installation in CentosTablespaces

Tablespaces

Oracle 12c Installation in CentosPerformance Hub

Performance Hub

Step: Troubleshooting Oracle

30. If listener does not start, you need to replace the domain name with local IP address 127.0.0.1 in below file.

/u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Oracle 12c Installation in CentosTroubleshooting Listener

Troubleshooting Listener

That’s it! Finally we’ve successfully completed Oracle 12c installation and configuration in CentOS 6.5. If in-case any errors you get while setting up Oracle database 12c, feel free to drop your comments.