TRIUMF Grid Software and Applications

Oracle Installation

These instructions are for an example installation of an Oracle 10g 64-bit database on SL 4.01 x86_64.  These instructions are similar to installing a 32-bit version of the database.

Preinstallation Tasks

  1. Create required groups and users if they do not already exist.  Set the oracle user password:
    groupadd -g 550 oinstall
    groupadd -g 551 dba
    groupadd -g 552 oper
    useradd -u 550 -g oinstall -G dba,oper oracle
    passwd oracle
  2. Set permissions on directories (assuming dirs are empty):
    mkdir /home/oradata3 /orabase/oradata2
    ln -s /orabase/oradata2 /oradata2
    ln -s /home/oradata3 /oradata3
    chown oracle:oinstall /orabase /oradata?/.
  3. Change Shell limits for oracle user:
    cd /etc/security/
    cp -p limits.conf limits.conf.orig
    tail -7 limits.conf
    ## for oracle
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536
  4. Alter the pam login rule by addling pam_limits session entry:
    cat /etc/pam.d/login
    auth required
    auth required service=system-auth
    auth required
    account required service=system-auth
    password required service=system-auth
    # close should be the first session rule
    session required close
    session required service=system-auth
    session required
    session optional
    # open should be the last session rule
    session required multiple open
  5. Change the oracle users shell to increase the following limits by adding this to to ~oracle/.bash_profile:
    ulimit -u 16384 -n 65536 2>/dev/null
  6. Set up the kernel configuration, then reboot the node:
    cp -p /etc/sysctl.conf /etc/sysctl.conf.orig
    tail -5 /etc/sysctl.conf
    ## for Oracle
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 1024 65000
    kernel.shmmax = 1073741824

    # reboot
    /sbin/sysctl -a 2>/dev/null | \
    grep -E '(file-max|shm|ip_local_port|rmem|wmem|sem)'| \
    grep -v tcp_ |grep -v huge|sort

    fs.file-max = 203502
    kernel.sem = 250 32000 100 128
    kernel.shmall = 2097152
    kernel.shmmax = 1073741824
    kernel.shmmni = 4096
    net.core.rmem_default = 262144
    net.core.rmem_max = 262144
    net.core.wmem_default = 262144
    net.core.wmem_max = 262144
    net.ipv4.ip_local_port_range = 1024 65000

Pre-installation tasks related to SL 4

  1. Temporarily edit /etc/redhat-release so that it advertises itself as a version 3 operating system installation.
  2. Temporarily link /usr/bin/gcc to the older version of gcc:
    mv /usr/bin/gcc /usr/bin/gcc.orig
    ln -s /usr/bin/gcc32 /usr/bin/gcc
    mv /usr/X11R6/bin/rman /usr/X11R6/bin/rman.orig

Installation Tasks

The installation is done as the 'oracle' user.  Some steps require a root shell; the installer prompts you when you need to run a shell script as root.

For 64-bit installations 2 CD images are required.  The 2nd CD is small, so it can be copied into, for example, /var/tmp so that when you are prompted to change CDs you can specify the alternate path, avoiding running to the server room.
  1. Set the necessary environment variables for the oracle user, and then login as 'oracle':
    $ tail -5 ~/.bash_profile
    ulimit -u 16384 -n 65536 2>/dev/null
    export ORACLE_BASE
  2. Mount the CD and start the installer:
  3. Accept most defaults.  Pick 'Enterprise Edition' and the 'Do not create a starter database' option (i.e. install software only).
  4. Near the end of the install, the last script you run as root (something like /orabase/OraHome_1/ will prompt you for where the local bin directory is - specify /usr/local/bin.  It will also replace /etc/inittab with a modified version.  We prefer to use the sysv init system.  Therefore copy back the previous version of initab and send a signal to init:
    cp -p /etc/inittab.no_cssd /etc/inittab
    telinit Q
  5. Copy into /etc/init.d/oracle a startup script and enable it:
    chkconfig --add oracle

Post-installation tasks

Configure the Oracle Networking - there are a few tools for this purpose: netca, netmgr.  These can be a source of grief if you get them wrong.  I have attached below 3 simple configurations that just work for our simple setup.


Online Installation Guide

Useful Red Hat Clone Installation Guide