Tuesday, July 10, 2007

Oracle On Linux

To check the size of physical memory, execute:
grep MemTotal /proc/meminfo

To check the size of swap space, execute:
grep SwapTotal /proc/meminfo

You also can add temporary swap space to your system by creating a temporary swap file instead of using a raw device. Here is the procedure:
su - root
dd if=/dev/zero of=tmpswap bs=1k count=900000
chmod 600 tmpswap
mkswap tmpswap
swapon tmpswap

To disable the temporary swap space execute the following commands:
su - root
swapoff tmpswap
rm tmpswap

Checking /tmp Space
According to Oracle's documentation, the Oracle Universal Installer (OUI) requires up to 400 MB of free space in the /tmp directory. But OUI checks if /tmp is only greater than 80 MB. To check the space in /tmp, run:
$ df /tmp

If you do not have enough space in the /tmp filesystem, you can temporarily create a tmp directory in another filesystem. Here is how you can do this:

su - root
mkdir //tmp
chown root.root //tmp
chmod 1777 //tmp
export TEMP=/ # used by Oracle
export TMPDIR=/ # used by Linux programs like the linker "ld"

When you are done with the Oracle installation, shutdown Oracle and remove the temporary /tmp directory:

su - root
rmdir //tmp
unset TEMP
unset TMPDIR

Checking Software Packages (RPMs)

For 10g R2 (32-bit) on RHEL 4 x86, the document Oracle Database Release Notes 10g Release 2 (10.2) for Linux x86 lists the following required package versions or higher:

binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2

Also ensure to install the libaio-0.3.96 RPM or a newer version! Otherwise the OUI prerequisite check will fail. To check the RPMs, run:

rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs \
libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio



Installing the RPMs10g R2 on RHEL AS 4 (x86)On my RHEL AS 4 x86 system I had to install the following RPMs and dependencies to meet the software requirements:

rpm -Uvh gcc-3.4.4-2.i386.rpm \
gcc-c++-3.4.4-2.i386.rpm \
libstdc++-devel-3.4.4-2.i386.rpm \
glibc-devel-2.3.4-2.13.i386.rpm \
glibc-headers-2.3.4-2.13.i386.rpm \
glibc-kernheaders-2.4-9.1.98.EL.i386.rpm

rpm -Uvh gnome-libs-1.4.1.2.90-44.1.i386.rpm \
compat-db-4.1.25-9.i386.rpm \
ORBit-0.5.17-14.i386.rpm \
gtk+-1.2.10-33.i386.rpm \
imlib-1.9.13-23.i386.rpm \
libpng10-1.0.16-1.i386.rpm \
gdk-pixbuf-0.22.0-16.el4.i386.rpm \
libungif-4.1.3-1.i386.rpm \
alsa-lib-1.0.6-5.RHEL4.i386.rpm \
audiofile-0.2.6-1.i386.rpm \
esound-0.2.35-2.i386.rpm

rpm -Uvh sysstat-5.0.5-1.i386.rpm

rpm -Uvh libaio-0.3.103-3.i386.rpm

rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm

rpm -Uvh compat-libstdc++-33-3.2.3-47.3.i386.rpm


To change the /etc/redhat-release file, you can simply copy/paste the following commands:

su - root
cp /etc/redhat-release /etc/redhat-release.orig
cat > /etc/redhat-release << EOF
Red Hat Enterprise Linux AS release 3 (Taroon)
EOF

After you are done with the Oracle10g installation, undo the changes you made to /etc/redhat-release:

su - root
cp /etc/redhat-release.orig /etc/redhat-release


Checking Kernel Parameters
To see all kernel parameters, execute:

su - root
sysctl -a

For Oracle10g, the following kernel parameters have to be set to values greater than or equal to the recommended values which can be changed in the proc filesystem:

shmmax = 2147483648 (To verify, execute: cat /proc/sys/kernel/shmmax)
shmmni = 4096 (To verify, execute: cat /proc/sys/kernel/shmmni)
shmall = 2097152 (To verify, execute: cat /proc/sys/kernel/shmall) (for 10g R1)
shmmin = 1 (To verify, execute: ipcs -lm grep "min seg size")
shmseg = 10 (It's hardcoded in the kernel - the default is much higher)

semmsl = 250 (To verify, execute: cat /proc/sys/kernel/sem awk '{print $1}')
semmns = 32000 (To verify, execute: cat /proc/sys/kernel/sem awk '{print $2}')
semopm = 100 (To verify, execute: cat /proc/sys/kernel/sem awk '{print $3}')
semmni = 128 (To verify, execute: cat /proc/sys/kernel/sem awk '{print $4}')

file-max = 65536 (To verify, execute: cat /proc/sys/fs/file-max)

ip_local_port_range = 1024 65000 (To verify,
execute: cat /proc/sys/net/ipv4/ip_local_port_range)

NOTE: Do not change the value of any kernel parameter on a system where it is already higher than listed as minimum requirement.

Wednesday, January 25, 2006

Test

Test the blog.

Oracle certified Professional.