Wednesday, August 7, 2013

Installing oracle instant client on CentOS RHEL OEL 5.9

This is a guide of Install sqlplus with the minimal oracle-software fingerprint.

I try to not install the Oracle Client in my computers, it modify lots of registry in Windows, and in linux you need XWindow GUI or remote XWindow plus set lots of environment variables and deal with Oracle Universal Installer (OUI) that depends on many packages, versions, java … etc.

1.First Download the package from Oracle Instant Client

2.Install the 2 packages matchs your OS, I am using OEL 5.9 x86 as example:

rpm -ivh oracle-instantclient-basic-10.2.0.5-1.i386.rpm
rpm -ivh oracle-instantclient-sqlplus-10.2.0.5-1.i386.rpm


3.You should have a structure and files like:

/usr/lib/oracle/10.2.0.5/client/bin/genezi
sqlplus
/usr/lib/oracle/10.2.0.5/client/lib/glogin.sql
libsqlplusic.so
libsqlplus.so
libocci.so.10.1
libocijdbc10.so
ojdbc14.jar
libclntsh.so.10.1
libnnz10.so
libociei.so


4.Add lib to ldconfig

vi /etc/ld.so.conf.d/oracle.conf
/usr/lib/oracle/10.2.0.5/client/lib
re-run: #//sbin/ldconfig
to active the changes


5.create a tnsnames.ora at /etc:

PRODUCT_ORA1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = ora1)
)
)


6.To test it out:

/usr/lib/oracle/10.2.0.5/client/bin/sqlplus sys@PRODUCT_ORA1

5 comments:

  1. I installed the InstantClient following your guide above.. very easy and nice BTW> But now I need to remove it in favor of the full client. I'm not that experienced in CentoS. What's the easiest way to accomplish that?

    Thanks

    ReplyDelete
  2. Glade it helps.
    To remove it, simple run rpm -e package_name or yum remove package_name

    ReplyDelete
  3. I followed your guide and it works cool. Thank you so much.

    ReplyDelete
  4. thanks a lot. it work on centos 5.8 x86_64 with instant client 12.1.

    ReplyDelete