Wednesday, 16 July 2014

Intalling Oracle 11g on RedHat Linux Server

Prerequisites:
  • Checking the Hardware Requirements
  • Checking the Software Requirements
  • Preinstallation Requirements for Oracle Configuration Manager
  • Checking the Network Setup
  • Creating Required Operating System Groups and Users
  • Configure Oracle Installation Owner Shell Limits
  • Configuring Kernel Parameters
  • Identifying Required Software Directories
  • Identifying or Creating an Oracle Base Directory
  • Choosing a Storage Option for Oracle Database and Recovery Files
  • Creating Directories for Oracle Database or Recovery Files
  • Preparing Disk Groups for an Automatic Storage Management Installation
  • Configuring Disk Devices for Oracle Database
  • Stopping Existing Oracle Processes
  • Configuring the oracle User's Environment
COPY ALL RPM FILES FROM LINUX CD
-------------------------------------------------------
copy all rpm files to local disk in folder "repo"
$cp /oracle/server/*.rpm   /u02/repo

CREATE A REPOSITORY FOR RPM
---------------------------------------------------
#cd /U02
#createrepo  -v repo

#cd  /etc/yum.repos.d

#vi reposcript.repo
[mainrepo]
name=mainrepo
baseurl=file:///mnt/repo
enabled=1
gpgcheck=0
:wq

#yum clean all
#yum list

install required rpm:
---------------------

Goto ”repo” folder
#cd  /u02/repo

rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*


Manual Setup

Oracle recommend the following minimum parameter settings.

#vi     /etc/sysctl.conf

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 268435456
kernel.shmmax = 536870912
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=1048586

Run the following command to change the current kernel parameters.
#/sbin/sysctl   -p

#vi    /etc/security/limits.conf

oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240


Set secure Linux to permissive by editing the     "/etc/selinux/config" file
#vi   /etc/selinux/config
SELINUX=disable

Create the new groups and users.
#groupadd dba
#useradd -g dba oracle
#passwd oracle


Create the directories in which the Oracle software will be installed.
#mkdir -p /u01/app/oracle/product/11.2.0/db_1
#chown -R oracle:dba /u01
#chmod -R 775 /u01

Copy Oracle Database Software into /u02 mount point.
#chown -R oracle:dba /u02
#chmod -R 777 /u02


Login as root and issue the following command.
#xhost +

Login as the oracle user and add the following lines at the end of the ".bash_profile" file, remembering to adjust them for your specific installation.

#su – oracle

$vi  db.env
export ORACLE_BASE=/u01/app/oracle;
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1;
export PATH=/usr/sbin:$PATH;
export PATH=$ORACLE_HOME/bin:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export ORACLE_SID=ORCL;
:wq

$.   db.env

Installation
$cd   /u02/db
$ . /runInstaller

At the end run the scripts given
Root.sh   and oraInstRoot.sh

# yum install oracle-database-server-12cR2-preinstall -y

groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
groupadd -g 54330 racdba

usermod -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba  oracle

useradd -u 54322 -g oinstall -G asmdba,asmoper,asmadmin   grid

No comments:

Post a Comment

Optimizer Access Paths using Indexes

Introduction In this tutorial you will use the Optimizer Access Paths for the following cases (scenarios): Case 1: With and Without Index Ca...