Guenadi N Jilevski's Oracle 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 /

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.       localhost.localdomain   localhost
# Public        raclinux1        raclinux2
# Private   raclinux1-priv   raclinux2-priv
# Virtual    raclinux1-vip    raclinux2-vip
# SCAN 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
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
Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows.
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/
# rm /var/run/
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/”
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
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
PATH=/usr/sbin:$PATH; export PATH


if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
ulimit -u 16384 -n 65536
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.
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/ 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 >> 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 >> 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 date
ssh date
exec /usr/bin/ssh-agent $SHELL
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 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: Logo

You are commenting using your 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: