RPM Oracle Instant Client 11.2
A short guide to build RPM of Oracle Instant Client.
Installing the Oracle Instant Client is probably the simplest solution to get a Oracle server access from a Unix/Linux/Windows/MacOS client. Oracle provides some RPM (usable with Fedora) for some versions and for some architectures. For others versions, only ZIP archives are available on their site.
Personally, official RPM don't suits my need for various reasons:
- Installation in /usr/lib instead of /usr/lib64
- No provides (mandatory to solve dependencies between packages)
- No configuration for the shared libraries dynamic load
For this reasons, I'm used, for years, to build my own RPM, which I use to build and run tora or php-oci8. Of course, it will be great if I could distribute them on my repository, but the Oracle license probably don't allow this.
This is an update of this small guide for the new version 220.127.116.11.0 which will be used for my next build.
Setting the environment
About 300Mio of disk space will be required.
Under the root account, install the needed tools
yum install rpmdevtools rpm-build unzip
Create a dedicated account, you must never build under the root account, and a dedicated account is always a good idea.
Under the new orabuild account, setup the needed directories
Getting the latest versions
Download from the Oracle web site the last version of the available archives, and save them in the ~/rpmbuild/SOURCES folder
32 bits version :
64 bits version:
Download from my repository the last version of the source RPM, into the ~/rpmbuild/SRPMS folder
Bulding the RPM
Always under the orabuild account:
rpmbuild --rebuild rpmbuild/SRPMS/oracle-instantclient-*-18.104.22.168.0-1.remi.nosrc.rpm
After a few minutes... you'll have the RPM available in the ~/rpmbuild/RPMS/i386 or ~/rpmbuild/RPMS/x86_64 folder:
Installation / Utilisation
You can now install this RPM as usually, under the root account:
yum install --nogpgcheck /home/orabuild/rpmbuild/RPMS/*/oracle-instantclient-*-22.214.171.124.0-1.*.rpm
You can test your access to the server with the usual command:
To continue, you can read, for example Accès aux bases de données Oracle en PHP (which need to be translated)
As always, your feedback is welcome.