How to build Oracle Instant client under Linux

Michal Táborský
Tallship
Published in
2 min readJun 2, 2009

The Oracle Intant Client is a minimalistic version of necessary runtime libraries needed to run an application which uses an OCI interface to connect to the Oracle database. In this article I will describe how to build your very own Instant client.

If you ever installed a full Oracle client, you know how painfull process it is and how much diskspace you need. Especially if you are running a large farm of webservers and need to maintain an identical version of the client libraries, the Instant client comes handy. Oracle provides the client free to download on their pages, but there are times, when the exact version of the client you need is not available. In our case, we needed to apply a special patch to the client library and all patches are always issued against a full client.

Pre-requisites

The bad news is, you will still have to install the full client on one of your servers, prefferably with the same configuration and system version as is your target system. I will describe the build for a RedHat ES or CentOS system, though probably any RPM-base distribution will do. For building the instant client RPMs you will need the rpm-build package. If you have a yum setup, it’s as simple as:

yum -y install rpm-build

After you have the full client installed, you may want to install the necessary patches to your client install.

Create the Instant client

The actual process can be found in the manual, but it’s well hidden. Thanks to Chris Jones for pointing me in the right direction.

To build the client, run the following commands:

mkdir -p $ORACLE_HOME/rdbms/install/instantclient/light
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk ilibociei

If all goes well, the ZIP archives and mainly the RPMs will be created for you, which you may transfer to your other servers and install as usual. If the install fails with the following error message, you must install the rpm-build package (see above).

-bb: unknown option
make: *** [/u01/app/oracle/product/11.1.0/client_1/rdbms/install/instantclient/libociei.so] Error 1

The RPM files with the client, as well as other libraries like JDBC, ODBC or the SQL*Plus application, will be located in the following directory (assuming you are building 32-bit versions):

cd $ORACLE_HOME/rdbms/install/instantclient/rpm/RPMS/i386

Enjoy your DIY Instant Client!

--

--