Sunday 1 November 2015

ORACLE AND GRID INSTALLATION

ORACLE AND GRID INSTALLATION 


It's Easy with AJEET,

In the Below section we will look into how to install ORACLE AND GRID and after installing applying the required patch and creating DATABASE using DBCA.

The below steps is for installing oracle 11.2.0.3 on Linux 5, which is almost same for all the oracle version except some kernel parameters.

This document can be used exactly or by making little or required changes to implement new installation on Linux.

Check the Required hardware, software and RPMS & KERNAL parameters

Befor starting we need to make sure that all the hardware and software meets the minimum requirement of oracle

We  will check the available disks,Processor,RAM,Operating system version and Required RPMS are installed or not.

1.      Checking disks
fdisk –l   df -h

2.      Check memory information
Cat  /proc/meminfo

3.      Check cpu information
Cat /proc/cpuinfo
4.      Check kernel parameters
Sysctl –p

5.      Check RPMS
Rpm –qa|grep opracle
Rpm –qa |grep oraasm

6.      Check Operating system
Cat /etc/issue



INSTALL THE REQUIRED RPMS.

with the below command we will check the required RPMS are installed or not at the OS level, RPMS slightly varies for different version of oracle to be installed so its better to request your system/os admin to install all the updated/current RPMS. If any RPMS are not installed ask your system/os admin to configure it for you.


Check the rpms.
rpm -q binutils compat-libstdc++-33 compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common- glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++ libstdc++-devel make numactl-devel sysstat unixODBC unixODBC-devel

rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}  (%{ARCH})\n' binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

rpm -Uvh oracleasm-support-2.1.7-1.el5.i386.rpm
yum install gcc

Add Group and user

We need OS user group to be created we need user at OS level. it is required so that we can have access to OS above which we will install our oracle and work on it, somewhat its similar as we create user in database.

It is not the job of DBA, please ask your OS admin to create the required groups.

add os user and groups as per requirements.


EDIT AS PER ORACLE STANDARDS /etc/security/limits.conf:



EDIT AS PER ORACLE STANDARDS  /etc/sysctl.conf
`

EDIT AS PER ORACLE STANDARDS /etc/pam.d/login:


EDIT AS PER ORACLE STANDARDS /etc/profile:



EDIT AS PER ORACLE STANDARDS /etc/csh.login:





Create Directories

Directories are required to place/install the software file in a particular location so before proceeding further create directories as per your requirement for ORACLE_HOME,GRID_HOME and ORACLE_BASE.

The directories are suppose to have appropriate permission for the user to install the oracle software/binaries, for information on permission contact your OS admin.
If  your have access to change the permission of the directories your can change it as per your requirement.



Set the path in bash_profile

At ASM
 [ASM@oracle ~]$ ls -Fal


This is required in order to access the instance without setting it every time you login to the database.

It is not mandatory but if you don't set in bash_profile each before you login to database you have set ORACLE_SID and ORACLE_HOME.



Add the below lines in bash_profile as oraasm user

[ASM@oracle ~]$ vi .bash_profile

MAIL=/usr/mail/${LOGNAME:?}

# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0

stty erase `tput kbs`

# Set up the shell variables:
        EDITOR=vi
        export EDITOR

# set up quiet scp
alias scp='scp -q'

# Preventing Oracle Clusterware Installation Errors caused by stty Commands
if [ -t 0 ]; then
   stty intr ^C
fi

# For Grid Infrastructure setup
export PATH=/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/openwin/bin:/usr/bin/X11:/usr/lib:
export PS1=`hostname`':$PWD> '
export TEMP=$HOME/tmp
export TMPDIR=$HOME/tmp
export ORACLE_TERM=vt100
umask 022


save and run the bash_profile and echo the variables
[ASM@oracle ~]$. .bash_profile          
Check the host name and check for self ping
[root@oracle asm]# hostname

AT ORACLE
[ora@oracle ~]$ ls -Fal


This is required in order to access the instance without setting it every time you login to the database.

It is not mandatory but if you don't set in bash_profile each before you login to database you have set ORACLE_SID and ORACLE_HOME.

  Add the below lines in bash_profile as oracle user

[oraPRD@oracle ~]$ vi .bash_profile

MAIL=/usr/mail/${LOGNAME:?}

# Set up the shell environment:
        set -u
        trap "echo 'logout'" 0

stty erase `tput kbs`

# Set up the shell variables:
        EDITOR=vi
        export EDITOR

# set up quiet scp
alias scp='scp -q'

# Preventing Oracle Clusterware Installation Errors caused by stty Commands
if [ -t 0 ]; then
   stty intr ^C
fi

# For Grid Infrastructure setup
export PATH=/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/openwin/bin:/usr/bin/X11:/usr/lib:
export PS1=`hostname`':$PWD> '
export TEMP=$HOME/tmp
export TMPDIR=$HOME/tmp
export ORACLE_TERM=vt100
umask 022


save and run the bash_profile and echo the variables
[oraPRD@oracle ~]$  . .bash_profile           
  

INSTALL ASM LIBRARY

     [root@localhost ~]# rpm -qa|grep oracleasm
      oracleasmlib-2.0.4-1.el5
      oracleasm-2.6.18-194.el5-debuginfo-2.0.5-1.el5
      oracleasm-2.6.18-194.el5-2.0.5-1.el5
      oracleasm-2.6.18-238.el5-2.0.5-1.el5
      oracleasm-support-2.1.7-1.el5
      oracleasm-2.6.18-194.el5xen-2.0.5-1.el5
       oracleasm-2.6.18-194.el5debug-2.0.5-1.el5

It's mandatory to install all the ASM Library Files before installing grid.

Oracle Grid Infrastructure
               Software Installation
[root@oracle sysconfig]# pwd
/etc/sysconfig
[root@oracle sysconfig]# vi selinux
[root@oracle sysconfig]# grep disable selinux
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
[root@oracle sysconfig]#

[root@oracle ~]# xhost +
Install the grid by running ./runInstaller and follow the steps.
After installing create disk groups by running ASMCA  utility. as required


Set the HOME AND ORACLE BASE PATH IN bash_profile at gride home.
[ora@oracle ~]$ vi .bash_profile
export ORACLE_BASE=ASMBASE path
export ORACLE_HOME=$GRID_HOME_path
export ORACLE_SID=+ASM
export PATH=$ORACLE_HOME/bin:$PATH
export PATH=$ORACLE_HOME/OPatch:$PATH

Oracle infrastructure
Software Installation

In order to get the GUI we need to use the xhost+ or any other utility.

[ora@oracle ~]# xhost +
[ora@oracle ~]# ./runInstaller
Install the grid by running ./runInstaller and follow the steps.

Set the HOME AND ORACLE BASE PATH IN bash_profile at oracle home.
[ora@oracle ~]$ vi .bash_profile
export ORACLE_BASE=ORABASE path
export ORACLE_HOME=$ORACLE_HOME_ path
export ORACLE_SID=sid_name
export PATH=$ORACLE_HOME/bin:$PATH
export PATH=$ORACLE_HOME/OPatch:$PATH

Patching
Check for the available patch and apply the patch for both DATABASE HOME AND GRID HOME.

Database Creation using DBCA utility.
[ora@oracle ~]# dbca

To create database follow the instruction as show in GUI and customize as per your requirements.




That's It 


There you good to go.................................................



Please subscribe for latest updates.

No comments:

Post a Comment

Please leave your feedback, that improve me.............

RemoteHostExecutor.pl The file access permissions while patching

Hi, In this article, I am going to share one the issue which we usually face while patching. Here our DB and Grid home are 12.1.0.2, an...