Guenadi N Jilevski's Oracle BLOG

Oracle RAC, DG, EBS, DR and HA DBA BLOG

Prerequisites for CRS install for Oracle 11g R2

Prerequisites for CRS install for Oracle 11g R2

Once the basic installation is complete, install the following packages whilst logged in as the root user. This includes the 64-bit and 32-bit versions of some packages.
# From Enterprise Linux 5 DVD
cd /media/cdrom/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-0.*
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-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
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.*
cd /
eject

Oracle Installation Prerequisites

Perform the following steps whilst logged into the raclinux1 machine as the root user.

Make sure the shared memory filesystem is big enough for Automatic Memory Manager to work.
# umount tmpfs
# mount -t tmpfs shmfs -o size=1500m /dev/shm
The “/etc/hosts” file must contain the following information.
127.0.0.1       localhost.localdomain   localhost
# Public
92.148.2.101   raclinux1.gj.com        raclinux1
92.148.2.102   raclinux2.gj.com        raclinux2
# Private
10.10.10.101   raclinux1-priv.gj.com   raclinux1-priv
10.10.10.102   raclinux2-priv.gj.com   raclinux2-priv
# Virtual
92.148.2.111   raclinux1-vip.gj.com    raclinux1-vip
92.148.2.112   raclinux2-vip.gj.com    raclinux2-vip
# SCAN
92.148.2.201   rac-cluster.gj.com rac-cluster
Note. The SCAN address should not really be defined in the hosts file. Instead is should be defined on the DNS to round-robin between 3 addresses on the same subnet as the public IPs. For this installation, we will compromise and use the hosts file.

Add or amend the following lines to the “/etc/sysctl.conf” file.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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 in order for them to take effect without re-boothing the system.
/sbin/sysctl -p
Add the following lines to the “/etc/security/limits.conf” file to ensure that the hard and soft shell limits for the oracle Linux user are met.
oracle               soft    nproc   2047
oracle               hard    nproc   16384
oracle               soft    nofile  1024
oracle               hard    nofile  65536
Add the following lines to the “/etc/pam.d/login” file, if it does not already exist. This way you will make sure that the values specified in  /etc/security/limits.conf file take effect. This is in accordance to PAM Linux.

session    required     pam_limits.so
Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.
SELINUX=disabled
Alternatively, this alteration can be done using the GUI tool (System > Administration > Security Level and Firewall). Click on the SELinux tab and disable the feature.

SELINUX has problems with ASMlib, Oracle 11g RAC with iSCSI, OEM Grid Control, CRS and some Oracle 11g R2 libraries.

Either configure NTP, or make sure it is not configured so the Oracle Cluster Time Synchronization Service (ctssd) can synchronize the times of the RAC nodes. In this case we will deconfigure NTP.
# service ntpd stop
Shutting down ntpd:                                        [  OK  ]
# chkconfig ntpd off
# mv /etc/ntp.conf /etc/ntp.conf.org
# rm /var/run/ntpd.pid
If you are using NTP, you must add the “-x” option into the following line in the “/etc/sysconfig/ntpd” file.
OPTIONS=”-x -u ntp:ntp -p /var/run/ntpd.pid”
Then restart NTP.
# service ntp restart
Create the new groups and users.
groupadd -g 1000 oinstall
groupadd -g 1200 dba
useradd -u 1100 -g oinstall -G dba oracle
passwd oracle
Create the directories in which the Oracle software will be installed.
mkdir -p  /u01/app/11.2.0/grid
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01/
Login as the oracle user and add the following lines at the end of the .bash_profile file.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=raclinux1.gj.com; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID=RACDB1; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
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/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Add the following commands to the /etc/rc.local file for all the disks that will be used by CRS and Oracle RAC.
chown oracle:oinstall /dev/sdb1
chown oracle:oinstall /dev/sdc1
chown oracle:oinstall /dev/sdd1
chown oracle:oinstall /dev/sde1
chown oracle:oinstall /dev/sdf1
chmod 650 /dev/sdb1
chmod 650 /dev/sdc1
chmod 650 /dev/sdd1
chmod 650 /dev/sde1
chmod 650 /dev/sdf1

Edit the /home/oracle/.bash_profile file on the raclinux2 node to correct the ORACLE_SID and ORACLE_HOSTNAME values.
ORACLE_SID=RACDB2; export ORACLE_SID
ORACLE_HOSTNAME=raclinux2.gj.com; export ORACLE_HOSTNAME
Start the raclinux1  machine and restart the raclinux1 machine. When both nodes have started, check they can both ping all the public and private IP addresses using the following commands.
ping -c 3 raclinux1
ping -c 3 raclinux1-priv
ping -c 3 raclinux2
ping -c 3 raclinux2-priv
At this point the virtual IP addresses defined in the /etc/hosts file will not work, so don’t bother testing them.

Configure SSH on each node in the cluster. Log in as the “oracle” user and perform the following tasks on each node.
su – oracle
mkdir ~/.ssh
chmod 700 ~/.ssh
/usr/bin/ssh-keygen -t rsa # Accept the default settings.
The RSA public key is written to the ~/.ssh/id_rsa.pub file and the private key to the ~/.ssh/id_rsa file.

Log in as the “oracle” user on raclinux1, generate an “authorized_keys” file on raclinux1 and copy it to raclinux2 using the following commands.
su – oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys raclinux2:/home/oracle/.ssh/
Next, log in as the “oracle” user on raclinux2 and perform the following commands.
su – oracle
cd ~/.ssh
cat id_rsa.pub >> authorized_keys
scp authorized_keys raclinux1:/home/oracle/.ssh/
The “authorized_keys” file on both servers now contains the public keys generated on all RAC nodes.

To enable SSH user equivalency on the cluster member nodes issue the following commands on each node.
ssh raclinux1 date
ssh raclinux2 date
ssh raclinux1.gj.com date
ssh raclinux2.gj.com date
exec /usr/bin/ssh-agent $SHELL
/usr/bin/ssh-add
You should now be able to SSH and SCP between servers without entering passwords.

December 13, 2009 - Posted by | oracle

1 Comment »

  1. […] installation is covered here. The prerequisites for the Oracle 11gR2 installation are described here. Setting up a VMware clusters for Oracle 11gR2 installation is covered […]

    Pingback by Fresh Oracle 11.2.0.2 Grid Infrastructure Installation PRVF-5150 PRVF-5184 « Guenadi N Jilevski's Oracle BLOG | November 9, 2010 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: