Friday, August 22, 2008

Installing 32-bit Oracle software on 64-bit Linux

Some 32-bit Oracle software is certified to run on 64-bit Linux. Others are not. Several years ago, I had to install Oracle Enterprise Manager 10g Grid Control R2 (only a 32-bit version was available at the time) on Red Hat AS 3 x86_64.

There are a few points that must first be understood regarding Oracle software on Red Hat 64-bit:

  • Red Hat AS 3 guarantees that 100% of all 32-bit applications can run on their 64-bit OS (see http://www.redhat.com/magazine/009jul05/features/multilib/).
  • Red Hat 64-bit is a multilib OS (both 32-bit and 64-bit libraries, down to the C library itself, are installed).
  • Oracle binaries are linked during installations and upgrades on Unix-based OS'.

Solution

If a particular Oracle product is not certified and will not install under a 64-bit Red Hat OS, you can do the following:

1. Confirm that all prequisites of your Oracle product are met. Refer to the Oracle installation documentation for details.

2. Confirm that all Oracle required 32-bit versions of the prerequisite RPMs are installed.

    For example, 64-bit RPM prequisites may include:
      gcc-3.2.3-53.x86_64.rpm
      gnome-libs-1.4.1.2.90-34.2.x86_64.rpm
      compat-db-4.0.14-5.1.x86_64.rpm
      libpng10-1.0.13-15.x86_64.rpm
      ORBit_0.5.17-10.4.x86_64.rpm
    
    You may need to manually install the 32-bit versions of some RPMs such as:
      glibc-devel-2.3.2-95.37.i386.rpm
      gcc-3.2.3-53.i386.rpm
      gnome-libs-1.4.1.2.90-34.2.i386.rpm
3. Force the OS to link in 32-bit (i.e., essentially overriding gcc):
     su - root
     mv /usr/bin/gcc /usr/bin/gcc.oracle.original
     echo "/usr/bin/gcc.oracle.original -m32 $*" > /usr/bin/gcc
     chmod 755 /usr/bin/gcc

4. Login as the oracle user in a 32-bit shell:
     su - oracle
     linux32 bash
     export LDEMULATION=elf_i386

5. Install the Oracle product.

6. After installation, restore the original
gcc file:
     rm /usr/bin/gcc
     mv /usr/bin/gcc.oracle.original /usr/bin/gcc

Upgrading or patching

Make a habit of always logging in to the
oracle account in a 32-bit shell (see Step 4). Also, whenever you need to upgrade or patch the Oracle software, make sure to temporarily revert to the modified gcc file (Steps 3 and 6).

No comments: