Pages

Saturday, April 29, 2017

Install Oracle 11G Release 2

Install Oracle 11G Release 2 


Oracle software that was verified

Oracle Database 11g Release 2 (11.2.0.1.0) for Linux x86-64

linux.x64_11gR2_database_1of2.zip (1,239,269,270 bytes) (cksum - 3152418844)
linux.x64_11gR2_database_2of2.zip (1,111,416,131 bytes) (cksum - 3669256139)

OS configuration and preparation

OS configuration is executed as root. To login as root just execute following command in terminal.

su - root

Add groups

groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54329 asmadmin

Add user Oracle

useradd -u 54321 -g oinstall -G dba,oper,asmadmin oracle

Change password for user

passwd oracle

Add kernel parameters to /etc/sysctl.conf

kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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

Apply kernel parameters

/sbin/sysctl -p

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf

oracle   soft   nproc    131072
oracle   hard   nproc    131072
oracle   soft   nofile   131072
oracle   hard   nofile   131072
oracle   soft   core     unlimited
oracle   hard   core     unlimited
oracle   soft   memlock  50000000
oracle   hard   memlock  50000000

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

<IP-address>  <fully-qualified-machine-name>  <machine-name>

For example.

127.0.0.1 linux linux.dbaora.com localhost localhost.localdomain

Modify .bash_profile for user oracle in his home directory and add following lines

# Oracle Settings
export TMP=/tmp

export ORACLE_HOSTNAME=linux.dbaora.com
export ORACLE_UNQNAME=ORA11G
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=ORA11G

PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

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

alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'

umask 022

Packages

Check which packages are installed and which are missing

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
numactl
numactl-devel

You can install missing packages from dvd. Just mount it and install missing packages using rpm -Uvh command from directory <mount dvd>/Packages or by using yum install command.

First option from dvd
rpm -Uvh/ivh libaio-devel*.x86_64.rpm
rpm -Uvh/ivh ksh*.x86_64.rpm

Second option using yum install command. It requires access to internet.
yum install libaio-devel*.x86_64
yum install ksh*.x86_64

Stop and disable firewall

systemctl stop firewalld
systemctl disable firewalld

Edit the “/etc/redhat-release” file replacing the current release information

"example"(Twenty Three)” with the following.

redhat release 6
Add the following line to the “/etc/pam.d/login” file, if it does not already exist.

session    required     pam_limits.so
Add following lines in .bash_profile for user oracle

Create directory structure

ORACLE_BASE – /ora01/app/oracle
ORACLE_HOME – /ora01/app/oracle/product/11.2.0/db_1

mkdir -p /ora01/app/oracle/product/11.2.0/db_1

chown oracle:oinstall -R /oracle01

Secure Linux

Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX  flag is set as follows. It requires REBOOT to be effective

SELINUX=permissive

Install database software

Issue the following command to avoid problems with starting binary installation in

graphical mode

xhost +<machine-name>

--in my case it's
xhost +linux.dbaora.com

Let’s start with database software installation as oracle user.

su - oracle

--unzip software 11.2.0.4
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip

--I defined 4 aliases in .bash_profile of user oracle to make
--administration easier :)

[oracle@linux]$ alias envo cdob cdoh tns
alias envo='env | grep ORACLE'
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'

--run alias command envo to display environment settings

envo
ORACLE_UNQNAME=ORA11G
ORACLE_SID=ORA11G
ORACLE_BASE=/ora01/app/oracle
ORACLE_HOSTNAME=linux.dbaora.com
ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1

--run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME
[oracle@linux]$ cdob
[oracle@linux oracle]$ pwd
/ora01/app/oracle

[oracle@linux db_1]$ cdoh
[oracle@linux db_1]$ pwd
/ora01/app/oracle/product/11.2.0/db_1

--run installation

./runInstall



















Post Installation Steps

Edit the “/etc/redhat-release” file to restore original release information.

linux release 23 (Twenty Three)

Edit the “/etc/oratab” file to set restart flag for ORA11G to ‘Y’.

ORA11G:/u01/app/oracle/product/11.2.0/db_1:Y




No comments:

Post a Comment