Tuesday, February 12, 2008

Preparing OS for Installing Oracle 11gR1 64bit RDBMS on RHEL 4 UPD4

Regarding "Preparing OS for Installing Oracle 11gR1 32bit RDBMS on OEL 5 & RHEL 5" post, I've attempted the same process on 64Bit so as to take advantage of an existing Linux installation.

I've followed Metalink notes:
437123.1 (
Requirements for Installing Oracle 11gR1 RDBMS on RHEL 4 on AMD64/EM64T) Revision 05-NOV-2007
169706.1 Revision 30-JAN-2008

I’ve started the installation on an IBM eServer xSeries x3650 with 2048MB and 2 Intel(R) Xeon(R) 5160 @ 3.00GHz, CPUs. The box has installed a default Red Hat Enterprise Linux ES release 4 (Nahant Update 4) (Linux 2.6.9-42.ELsmp #1 SMP x86_64 x86_64 x86_64 GNU/Linux)

This procedure is meant for those planning/trying to install Oracle Server 11.1.0.x.0 on Redhat 4 on the x86_64 (64-bit) platform. Since it is the expressed goal to keep Oracle Enterprise Linux functionally IDENTICAL to RHEL, this NOTE is also completely applicable to OEL 4 (update 4 or higher).

Info:

Automatic Memory Management.
Starting with Oracle Database 11g, the Automatic Memory Management feature requires more shared memory (/dev/shm) and file descriptors. The shared memory should be sized to be at least the greater of MEMORY_MAX_TARGET and MEMORY_TARGET for each Oracle instance on the computer. To determine the amount of shared memory available, enter the following command: # df -k /dev/shm/
In our case:

[root@xxxxx ~]# df -k /dev/shm/
S.ficheros Bloques de 1K Usado Dispon Uso% Montado en
none 1028096 0 1028096 0% /dev/shm

Note: MEMORY_MAX_TARGET and MEMORY_TARGET cannot be used when LOCK_SGA is enabled or with huge pages on Linux

Required RPMS
I've found a different list of required RPMs on both notes (437123.1, 169706.1)
Some RPMs where placed on system with the OS installation. Next graphic shows a detailed list and result:


TABLE 1 (click for zoom it)

Note: i386 packages might require the --force option during installation if the 64-bit version of the same package is already installed. For example, "rpm -ivh --force and could be found on both Red Hat updates (U4 & U5)


A list of required RPMs:
binutils-2.15.92.0.2
gcc-3.4.5
gcc-c++-3.4.5
gcc-3.4.6-8.i386.rpm
cpp-3.4.6-8.i386.rpm
libgcc-3.4.5 (32-bit)
libgcc-3.4.5
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.97
elfutils-libelf-devel-0.97
glibc-2.3.4-2.19
glibc-2.3.4-2.19 (32 bit)
glibc-common-2.3.4
glibc-devel-2.3.4
glibc-devel-2.3.4 (32-bit)
libaio-0.3.105
libaio-0.3.105 (32 bit)
libaio-devel-0.3.105
libstdc++-3.4.5
libstdc++-3.4.5 (32 bit)
libstdc++-devel 3.4.5
make-3.80
sysstat-5.0.5
glibc-headers-2.3.4-2.19
glibc-kernheaders-2.4-9.1.98.EL

*see Table 1

Note: to distinguish between a 32-bit or 64-bit package
i.e. #rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libaio-0.3

Setting Kernel parameters and environment.

* Required Environment Variable

umask for the oracle account must be 0022
the "ulimit" stack size value should be at least 32768 (ulimit -s 32768)

* Modify your kernel settings in /etc/sysctl.conf (RedHat) as follows. If the current value for any parameter is higher than the value listed in this table, do not change the value of that parameter. Range values (such as net.ipv4.ip_local_port_range) must match exactly.

kernel.shmall = 2097152
kernel.shmmax = 1/2 of physical RAM. This would be the value 2147483648 for a 4Gb RAM system.
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 512 x processes (for example 65536 for 128 processes)
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Local values:
# Oracle
kernel.shmall = 2097152
kernel.shmmax = 1052770304
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 76800
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144

Set Shell Limits for the oracle User. Assuming that the "oracle" Unix user will perform the installation, do the following:

- Add the following settings to /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

- Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
session required pam_limits.so

- Add the following lines to /etc/profile:

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

Note: User settings are best described on "
Preparing OS for Installing Oracle 11gR1 32bit RDBMS on OEL 5 & RHEL 5"

Installation note:

I’ve found an OS issue, launching runinstaller from linux.x64_11gR1_database.zip binaries.

./runInstaller

"You are attempting to install 64-bit Oracle on a 32-bit operating system. This is not supported and will not work."

It’s not true due the actual OS

[oracle@xxxxx bin]$ uname -mi

x86_64 x86_64

Problem, getconf shows 32 bit on a 64 bit system (maybe it's concerning Intel Extended Memory 64 Technology (Intel Intel64) that enables servers based on Intel Xeon processors to run both 32-bit and 64-bit applications under 64-bit operating systems):

[oracle@xxxxx bin]$ getconf LONG_BIT

32

Then, I’ve commented the following lines on “RunInstaller” and continue installation without problems:

#if [ `$UNAME` = "Linux" ]; then

# if [ -e $GETCONF ]; then

# value=`$GETCONF LONG_BIT`

# if [ $value != 64 ]; then

# echo "\"You are attempting to install 64-bit Oracle on a 32-bit operating system. This is not supported and will not work.\"";

# exit 0;

# fi

# fi

#fi

References:

Oracle Metallink Note: 437123.1
Oracle Metallink Note: 169706.1