by danang.wijanarko@ gmail.com
What is it ?
My intention is to help you people debian bloody user to put a connection client of oracle instance client for your own work. But some prerequisite need to be installed first.
If you're still have some interest on this subject, so let's continue.
Prerequisites
Get the oracle-instantclient11.1-basiclite-11.1.0.7.0-1.i386.rpm, oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm, and oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/...
# apt-get install libaio1 alien
Then install the client that previously we download
# alien -i oracle-instantclient11.1-basiclite-11.1.0.7.0-1.i386.rpm
# alien -i oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
# alien -i oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
Find the library path of these clients
# dpkg -L oracle-instantclient11.1-basiclite
...
/usr/lib/oracle/11.1/client/lib
...
Install the path to LD_LIBRARY_PATH environmental variable
# vi /etc/ld.so.conf.d/oracle.conf
...
/usr/lib/oracle/11.1/client/lib
...
Reload library path
# ldconfig
Next test your connection
# sqlplus <user>/<password>@<ip_address_oracle_server>:1521/<database_name_>
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jul 9 16:41:38 2009
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Solaris: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> quit
Disconnected from Oracle Database 10g Release 10.2.0.1.0 - 64bit Production
If you have some question, just drop me comment or mail me out.
Done.
-d
Great Article
I suspected that it would be relatively easy like this, but wasn't sure that the results would be quite as desired- your article confirmed it for me! So thanks a lot. My only difference was that it was for 11.2, on a 64bit client. FYI- although i skipped the "-i" for the alien commands (didn't want to install it, just create the debs for our repo) you have to use a 64bit based box to use alien for these packages, else they don't get created (even though they say they do!)- common sense i guess, but always worth a go! ;)
The only minor difference is that i then extracted the "basic" .deb archive back out (Used fileroller- part of Debian/Ubuntu), edited the "DEBIAN/control" file to contain details which were relevant to our internal repository, and also added the "etc/ld.so.conf.d/oracle" into the file structure, along with adding that file's md5sum into the "DEBIAN/md5sums" file. That removed any need for manual intervention after the package was installed on hosts.
Also added a "postinst" script into the "sqlplus" package, which created a symlink:
ln -s /usr/lib/oracle/11.2/client64/bin/sqlplus /usr/bin/sqlplus
And a "postrm" script which would remove said symlink.
Then repackage both individually with "dpkg --build <foldername>", and commit both to our internal repo. Wonderful!
FingAZ.