September 12, 2007

The Penguin Meets The Oracle

I've not done a technical post for a looonnnnngggggg time.

It is high time that I write something geeky as I am a big geek after all. (^^)

Anyway, I've been dying to try my hand in installing Oracle on Linux. I always came close but due to some hardware limitation, I ran into a lot of problems. What to do when you're given a machine which only has the capability to run MySQL and you're asked to install Oracle??

Oh well, my torture weapons of choice today are as follows,
  1. CentOS 5 - A open source version of Red Hat Enterprise Linux (RHEL) 5
  2. VMWare Server 1.0 - My virtualization software so that I run this off my laptop
  3. Oracle 9i (9.2.0.4) for Linux x86
I began life by creating a new virtual machine and installing CentOS. The Linux installation went pretty smooth but as usual, I had to customize a few services and software to be installed - development libraries which you always need as some software depends on it.

Anyway, do take note that unlike the Windows installation, Oracle requires that for *nix based systems, some pre-installation steps need to take place. Note: Although the steps were outlined for RHELAS3, the pre-install steps are pretty relevant. Do check out the Oracle Installation Guide for more information.

However, since I'm running CentOS 5, naturally, a few things need to be changed or else you'll run into some library issues.

1. Change the LD_ASSUME_KERNEL environment variable in the user oracle's profile to match the current version of your kernel by running the command "uname -a". Edit the oracle user's ".bash_profile" file.

LD_ASSUME_KERNEL = 2.6.18; export LD_ASSUME_KERNEL

2. Create a symbolic link for the libstdc++-libc6.1-1.so.2 to your server's current version of libstdc++
ln -s /usr/lib/libstdc++.so.6.0.8 /usr/lib/libstdc++-libc6.1-1.so.2

3. Install the libXp library as this caused a lot of funny issues with my installer.
yum install libXp

NOTE: Ensure that you are "root" when executing the commands.

4. Create the libcwait.so file as follows
- Ensure that you are "oracle" user
- Ensure that gcc is installed by issuing the "locate" command.
- Create a file called "libcwait.c" in the home directory
- Enter the following content and save it.
#include 
#include
#include
#include
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;
}
- create the environment variable LD_PRELOAD as follows at the commandline
export LD_PRELOAD=/home/oracle/libcwait.so

- compile the file as follows
gcc -o -shared $HOME/libcwait.so -O -g $HOME/libcwait.c

Once this is complete, you may run the Oracle Universal Installer from Disk1 of the installation directories.

All hail the penguin God... **Ohhhhmmmmmmmm**

P/S: Unfortunately, I ran out of diskspace in the virtual machine before I could even install the software. I've got to move some stuff around before I can start my Oracle install. Oh well.....

UPDATE: The LD_PRELOAD variable should be entered in the oracle user's profile.

5 comments:

  1. Eek! When penguin meets oracle, they speak greek.

    ReplyDelete
  2. kekekekeke... yeap, their common language. lol!!!

    don't worry, my next post will be more normal.

    ReplyDelete
  3. How about 1100110111001110 ?
    Yippeee :):)

    ReplyDelete
  4. Ooooo.. Universal Language. Kekekeek...

    It might help but I think Windows will call it "OneZeroOneOneZeroZero".. LOL!!!

    ReplyDelete
  5. Since you're a geek.. I'd like to share something with you.

    See a program I've written (not really a program -- it's an add-in)

    Over 15000 downloads since the beginning of this year.. but not really known in Malaysia. Take it for a spin if you think it's of any use to u... it's freeware la.

    http://www.excel-extools.com

    ReplyDelete

Please feel free to add your comments. However, take note that your comments may be edited or deleted as seen fit by the author of this blog.

Take note that the author of this blog may not be held responsible for the comments which may be insensitive, vulgar or controversial.

Related Posts with Thumbnails