Sunday, 8 September 2013

Installing Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 5 (64-bit) using VMware workstation.


Installing Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 5 (64-bit) using VMware workstation.

Purpose:-

In this article, you learn how to install Oracle Oracle Database 12c Release 1 (12.1) (64-bit) on Oracle Linux 5 (64-bit).

This tutorial covers the following topics:-

Ø  Overview
Ø  Installing Oracle Database 12c on Linux
Ø  Download Software
Ø  Requirements check
Ø  Unpack Files
Ø  Hosts File
Ø  Oracle Installation Prerequisites
Ø  Manual Setup
Ø  Installation
Ø  Summary

Overview:-

Here I am going to install oracle 12c release 1 on RHEL5 using VMware workstation. This article is for learning purpose only as you have to adjust some parameter values and other options while installing in real time environment.

Download Software:-
OTN: Oracle Database 12c Release 1 (12.1.0.1) Software (64-bit). -> http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Requirements check:-

Ø  We should have atleast 1gb of ram memory for the linux machine.
Ø  The swap space should be atleast 1.5 times the ram size(for ram size b/n 1gb to 2 gb).
Ø  The /tmp mount should have atleast 1gb of space available.


I am going to show you, how to increase more swap space to my Linux system

Note: - You can either use a dedicated hard drive partition to add new swap space, or create a swap file on an existing filesystem and use it as swap space


Ø  To check the amount of memory and swap space are currently used by the system.
cat /proc/meminfo | grep MemTotal
cat /proc/meminfo | grep SwapTotal

Use a File for Additional Swap Space:-

If you have less than 4GB of memory (between your RAM and SWAP), you can add temporary swap space by creating a temporary swap file. This way you do not have to use a raw device or even more drastic, rebuild your system.
As root, make a file that will act as additional swap space, let's say about 3000MB..



dd if=/dev/zero of=tempswap bs=1k count=3000000 ( I have to increased 3GB)


Next, change the file permissions.
Ø  chmod 600 /root/tempswap

Finally, format the "partition" as swap and add it to the swap space.

Ø  mke2fs tempswap
Ø  mkswap tempswap
Ø  swapon tempswap


    


To make this swap file available as a swap area even after the reboot, add the following line to the /etc/fstab file.



Verify whether the newly created swap area is available for your use.



Hosts File:-

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

To add an entry of ip address, fully qualified name and machine name in /etc/hosts

                                                                                                                     
                                 


To install the following require packages if they are not already present.




To configure  kernel parameters:-

Some entries may already existing in this linux kernel configuration file. If the given value is greater than the existing value for any parameter, we have to adjust it to the greater value otherwise we can ignore it.

RHEL/CentOS 5 already comes configured with default values defined for the following kernel parameters. The default values for these two kernel parameters is adequate for Oracle Database 12c Release 1 and therefore do not need to be modified.

Ø  kernel.shmall
Ø  kernel.shmmax

Use the default values if they are the same or larger than the required values.

fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500



Activate All Kernel Parameters for the System:-

The above command persisted the required kernel parameters through reboots by inserting them in the /etc/sysctl.conf startup file. Linux allows modification of these kernel parameters to the current system while it is up and running, so there's no need to reboot the system after making kernel parameter changes. To activate the new kernel parameter values for the currently running system, run the following as root


Ø  /sbin/sysctl -p



Set the shell limits in /etc/security/limits.conf for the oracle owner




Add the following line to /etc/pam.d/login if the same is not there


Ø  session    required     pam_limits.so



Check the /etc/selinux/config to see whether the selinux parameter is disabled. ( Changes reflect after reboot )

Ø  SELINUX=disabled



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

Ø  service iptables stop
Ø  chkconfig iptables off



Create OS user (oracle software owner) and groups needed to install oracle software.




Create a directory where oracle software will be installed and provide the necessary ownership and privileges.




To configure Enviromental variables


Add the following lines to .bash_profile file.

 

# Oracle Settings

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_HOSTNAME=vmlinux02

export ORACLE_UNQNAME=DB12C

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1

export ORACLE_SID=DB12C

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





Run the following command to make the given changes effective.





Install the oracle software:-


Now the system is ready to install oracle software.

Login as oracle user, download/copy the oracle 12c R1 software and unzip the media file.A folder named "database" will be created, go to the database folder and execute the "runInstaller" script to start oracle universal installer






To execute the "runInstaller" script to start oracle universal installer




Configure security updates:-


Enter the credentials like email id and My oracle support password. For learning purpose, you can ignore this option. Click next button.






Installation option:-

Select "install database software only "  option . Click next button


Grid option:-

Select "single instance" or "Real application clusters" database installation. Click next button.



Database Edition option:-

Select "Enterprise Edition" or "Standard Edition or Standard Edition one" database installation. Click next button.




Installation Location option:-


Select "Oracle base" and  " Software location" database installation. Click next button.


Create inventory:-


Verify the pre-populated inventory directory and it's group name and click the next button.





Prerequisite checks:-

Proceed only after confirming all the prerequisite checks are succeeded and click the next button




Summary:-

Go through the configuration summary and click the install button.


Install product:-


Wait for installation of all the products to complete.


Execute configuration scripts:-

Execute both the scripts by login as root user and after successful completion click the ok button.





In this tutorial, you learned how to install the Oracle Database 12c R1 installation on
Linux


Hope it helps. Please stay tuned, add me to your G+ Circles!! Your feedback always
helps me and motivates me to blog more, please leave your valuable comment that is
always a pleasure to read.

Many Thanks,
Regards
Senthilkumar Devaraj

1 comment:

  1. Thank you Senthil, this is very usefull and nice for beginners like me. Somewhere to start and this is good start.
    Once again Thank you.

    ReplyDelete