RedHatInstallOracle32

Installation of a 32 bit Oracle client on a 64 bit machine

This seems to be a problem with some legacy applications: they need to access a huge Oracle database, which has been installed on a 64 bit machine, but they can only manage Oracle connections through the 32 bit Oracle client application.

Now, how do you install that 32 bit client on a 64 bit machine, to make that _______________ (insert favourite expletive here) application work? Follow the steps below.

A word of warning, though: this is highly specific, I have no idea what I am doing, I am neither an Oracle expert or even a beginner's Oracle DBA, your machine may well blow up on you, etc... And, even worse, it's not really supported by Oracle (or Red Hat) which explains the lack of documentation on this subject. Even Google is not really your friend when it comes to this issue.

Another important point is that this page assumes you already have an installation of the Oracle database

Now, let's start the main event:

1. Remove all previous installations of the 32 bit client (if needed).

If you are like me, you may already have tried to install the client a couple of times and failed miserably. So, please remove the 32 bit client before doing anything else. Here is how to do it (as user oracle):

oracle$ /soft/oracle/client32/deinstall/deinstall

Replace /soft/oracle/client32/ by the directory where the previous installation of the 32 bit Oracle client was performed. Follow the instructions on the screen, and you should be able to get rid of the previous installation in short order.

WARNING Oracle has very badly localized its uninstallation procedure. You may find yourself staring at a message such as this one:

Voulez-vous continuer (o pour oui, n pour non) ? [n] : o
Voulez-vous continuer (o pour oui, n pour non) ? [n] : y

The problem here is that the message and the possible entry are localized (for English speakers, the message is a simple : "Would you like to continue (y for yes, n for no)?". HOWEVER... while the message is localized, the answer expected by the procedure is not! Therefore, you need to enter "Y" (for "yes") for the program to proceed. In other word, Oracle sucks! But you knew that already, right?

On to the next step!

2. Make sure all libraries and development tools are installed.

Now, this is the most important step: your installation fails or succeeds here.

To properly install the Oracle 32 bit client, you need the following RPM packages to be installed in a 32 bit version:

cpp-4.1.2.50.el5 (i386)
gcc-4.1.2.50.el5 (i386)
gcc-c++-4.1.2.50.el5 (i386)
gcc-gfortran-4.1.2.50.el5 (i386)
glibc-common-2.5.58 (i386)
glibc-devel-2.5.65 (i386)
glibc-headers-2.5.58 (i386)
libXp-1.0.0.8.1.el5 (i386)
libXp-devel-1.0.0.8.1.el5 (i386)
libgfortran-4.1.2.50.el5 (i386)
compat-libstdc++-33-3.2.3.61 (i386)
libstdc++-4.1.2.51.el5 (i386)
libstdc++-devel-4.1.2.50.el5 (i386)
libaio-0.3.106.5 (i386)
libaio-devel-0.3.106.5 (i386)

To create a list of all 32 bit RPM packages installed on your machine, use the following shortcut as root:

# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" | sort > ~/rpmlist.txt

The file ~/rpmlist.txt contains all the packages installed on your machine, followed by the architecture (i386 or x86_64) in a nice sorted list. The list shown above is a short subset of the output.

PLEASE NOTE (1) The list shown above should be adapted to your particular machine since the version number(s) may be inconsistent with your server. Also, it may or may not be complete, and I may have forgotten a couple of packages (but not much more than a couple). If you have any doubts, please check the links shown at the bottom of the page, in the "See Also:" section, click on the link that details the installation of the 64 bit client.

PLEASE NOTE (2) On the Red Hat machine I was working on, there were a couple of minor conflicts between the packages already installed and the packages I was trying to install: if you encounter the same problem, force the installation with the --force --nodeps options of RPM, like:

# rpm --install --force --nodeps -vvv package-version.rpm

3. Login as Oracle and check the X11 over SSH connection.

Login as Oracle should be obvious.

On the other hand, since Oracle has a graphical installation procedure, you need to make sure you can SSH into the machine and execute X11 applications to be displayed on your machine. I have written a page about solving possible Putty issues: click on this link to see it.

Test the SSH/X11 connection by launching, as root, for instance:

$ xterm &
$ clock &

If an xterminal and an xclock open on your remote desktop: congratulations! You can move on to the next step!

Of course, if you are doing all of this on the console of the Linux machine, you don't really need to worry about remote X11 and all that... :-)

4. Launch the Oracle installation software.

You should first make a copy of the installation software in a sub-directory the /tmp directory, and assign that sub-directory to the user oracle with:

# chown -Rfv oracle:oinstall /tmp/oracle_client32

Now, login as oracle and execute the installation procedure with:

$ /tmp/oracle_client32/runInstaller

If everything has been correctly configured, the Oracle graphical installer should launch. The darn thing is so ugly I am not even going to post a screenshot of this sad excuse for an installer... :-)

WARNING Please make sure you select a different 'home' for the 32 client than the main Oracle (64 bit) installation: this will greatly simplify cleaning-up and configuration if the installation fails.

For instance, here are the homes of the client and server on my main Oracle machine:

/soft/oclient32                          :    32 bit Oracle client
/soft/oracle/server                      :    64 bit Oracle server
/soft/oracle/client                      :    64 bit Oracle client

If anything fails especially at the linking stage: make a copy of the installation logs, go back to step 1, remove the failed installation, then try figuring out what went missing in step 2. When you are done installing the missing RPMs, restart the installation. Hopefully, step 2 above should be enough to give you a hint about what's missing from your current installation.

Once your installation has been completed with success: move on to the next stage!

5. Make sure the 32 bits client libraries are correctly referenced.

That part is rather easy: simply insert the correct directory in the /etc/ld.so.conf.d/.

In the example shown below, I have chosen to add it to the oracle.conf file:

root@galactus:/etc/ld.so.conf.d#  cat oracle.conf
/soft/oracle/server/product/11.2.0/dbhome_1/lib
/soft/oclient32/lib/

Do a quick ldconfig -v and the 32 bit client libraries should now be installed and configured correctly on your system.

You can test this, for instance, by doing a ldd on a client 32 binary. Here is an example:

root@galactus:~#  which sqlplus
/soft/oclient32/bin/sqlplus

root@galactus:~#  ldd $(which sqlplus)
        linux-gate.so.1 =>  (0xffffe000)
        libsqlplus.so => /soft/oclient32/lib/libsqlplus.so (0xf7e59000)
        libclntsh.so.11.1 => /soft/oclient32/lib/libclntsh.so.11.1 (0xf6154000)
        libnnz11.so => /soft/oclient32/lib/libnnz11.so (0xf5f07000)
        libdl.so.2 => /lib/libdl.so.2 (0x4c8d4000)
        libm.so.6 => /lib/libm.so.6 (0x4c8a9000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x4c88e000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x4c9bc000)
        libc.so.6 => /lib/libc.so.6 (0x4c728000)
        libaio.so.1 => /usr/lib/libaio.so.1 (0xf5ee9000)
        /lib/ld-linux.so.2 (0x4c709000)

No missing libraries? No problem!

6. Edit the tnsnames.ora and listener.ora files to configure network connections.

Now, here is where I am totally out of my depth: if you'd like to connect through a network to a database, you need to modify these two files:

root@galactus:~#  ls -lrt /soft/oclient32/network/admin/*.ora* | grep -i Dec..7
-rw-r--r-- 1 oracle oinstall 401 Dec  7 10:29 /soft/oclient32/network/admin/tnsnames.ora
-rw-r--r-- 1 oracle oinstall 380 Dec  7 10:29 /soft/oclient32/network/admin/listener.ora

The easiest way to do this is to copy the original files from the 64 bit installation into the directory of the 32 bit client, and replace all the paths that point to the 64 bit installation to make them point to the 32 bit client directory.

For instance, here is a quick comparison, based on the files of my machine:

This is the 64 bit installation listener.ora file:

(ORACLE_HOME = /soft/oracle/server/product/11.2.0/dbhome_1)

This is the 32 bit installation listener.ora file:

(ORACLE_HOME = /soft/oclient32)

I think this should be clear enough.

7. Test the whole thing with sqlplus.

Finally, you can launch the (32 bit) sqlplus command and make sure it connects correctly to the 64 bit Oracle database. If you have a listener or a network problem, go back to step 6 and check the configuration is correct.

Congratulations! Your installation of the 32 bit client on a 64 bit Oracle Red Hat Linux server should now be complete!

Give yourself a pat on the back, you have earned it.

I am going to go out on a limb here, but if you thought that was useful, please feel free to send me an email to the following address: gil [at] panix [dot] com and do include improvements and changes you'd like to see.

See Also: