Install Oracle 9i (9.2.0.4) on CentOS 4.7

Problem: Oracle 9i is old but still there are people who is using it.  There is quite a bit of steps that need to be taken to install Oracle 9i on CentOS 4.7 (I am not sure if Oracle 9i will ever work on CentOS 5).  There are information (bits and pieces) on the Web, I want to record down step by step instruction of installation of Oracle 9i on CentOS 4.7

Solution: The installation is not very hard:

  1. Install CentOS
  2. Install the the compat packages (with dependencies):
    yum install compat-gcc-32 compat-gcc-32-c++ compat-libstdc++-296 compat-l
    ibstdc++-33
  3. Get the Oracle patch p3006854_9204_LINUX.zip, unzip and run it
    unzip p3006854_9204_LINUX.zip
    cd 3006854
    sh rhel3_pre_install.sh

    • Basically patch 3006854 is to create libwait.so
    • The source code of libwait is:
      #include <errno.h>
      #include <sys/syscall.h>
      #include <sys/types.h>
      #include <sys/wait.h>
      pid_t
      __libc_wait (int *status)
      {
      int res;
      asm volatile ("pushl %%ebx\n\t"
      "movl %2, %%ebx\n\t"
      "movl %1, %%eax\n\t"
      "int \$0x80\n\t"
      "popl %%ebx"                : "=a" (res)
      : "i" (__NR_wait4), "0" (WAIT_ANY), "c" (status), "d" (0), "S" (
      0));
      return res;
      }
    • To compile a .so, use gcc -O2 -shared -fpic -xc libwait.c -o libcwait.so
    • You need to add the libwait.so into /etc/ld.so.preload
  4. Replace gcc with the older gcc (version 3.2):
    cd /usr/bin/
    mv gcc gcc34
    mv gcc32 gcc
  5. Add the following parameters to /etc/sysctl.conf:
    # Oracle parameters
    kernel.shmall = 2097152
    kernel.shmmax = 2147783648
    kernel.shmmni = 4096
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sim = 256 3200 100 142
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000
    kernel.msgmni = 2878
    kernel.msgmax = 8192
    kernel.msgmnb = 65535
  6. Issue the command /sbin/sysctl -p
  7. Add oracle user:
    groupadd dba
    groupadd oinstall
    useradd -c "Oracle software owner" -g oinstall -G dba oracle
  8. Add the followings to oracle’s ~/.bash_profile:
    # Oracle setting
    export LD_ASSUME_KERNEL=2.4.19
    export ORACLE_BASE=/opt/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
    export ORACLE_SID=p9test
    export ORACLE_TERM=xtermexport NLS_LANG=AMERICAN
    export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
    export PATH=$PATH:$ORACLE_HOME/bin
  9. Now, login as oracle user and run the runInstall
  10. You should be able to install Oralce 9i without any problem.

2 Responses to “Install Oracle 9i (9.2.0.4) on CentOS 4.7”

  1. logo Says:

    Hi,

    I already try this, but i have an error after launching the runinstaller script, the script copy a jre in the tmp directory and then launch it but there’s a lot of error. Even if i have the splash screen of Oracle i can’t click anywhere.
    If somebody have a solution about this!!

  2. linus Says:

    Could you share what’s the error you saw?

Leave a Reply