0% found this document useful (0 votes)
164 views

CentOS 6 - Install and Configure Oracle Client - Void Technology

The document provides instructions for installing and configuring an Oracle client on CentOS 6. It outlines downloading required RPM packages, using yum to install the packages, creating a tnsnames.ora file to store database connection information, configuring environment variables via a shell script, and testing the installation by connecting to a database with sqlplus.

Uploaded by

gochornea
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
164 views

CentOS 6 - Install and Configure Oracle Client - Void Technology

The document provides instructions for installing and configuring an Oracle client on CentOS 6. It outlines downloading required RPM packages, using yum to install the packages, creating a tnsnames.ora file to store database connection information, configuring environment variables via a shell script, and testing the installation by connecting to a database with sqlplus.

Uploaded by

gochornea
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

CentOS 6: Install and Configure Oracle Client | Void Technology

1 de 4

http://voidtech.wordpress.com/2013/11/05/centos-6-install-and-configure...

Void Technology
My How-to repository

CentOS 6: Install and Configure Oracle Client


Requirements
You must have downloaded RPM Packages for your desired Oracle Version. Those packages can be downloaded from Oracle Website (but requieres authentication, you could need create an account).
Packages are:
oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpm
oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64.rpm
oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64.rpm

For the future, i will include a post with how to download these packages

1. Oracle Client Installation


In a terminal as root (or sudo user) set your current directory to your downloaded RPM Packages and xecute:
[root@HOST ~]# yum localinstall oracle* --nogpgcheck

2. Configure TNSNames.ora
tnsnames.ora file is used to store database connection information. This file must be created and configured
in your current client installation.
To do this, first create your network/admin directory
[root@HOST ~]# mkdir /usr/lib/oracle/12.1/client64/network/admin -p

after, create or put your tnsnames.ora in this folder.

3. Configure Environment Variables


Create file /etc/profile.d/oracle.sh with the following file content
export ORACLE_HOME=/usr/lib/oracle/11.2/client
export PATH=$PATH:$ORACLE_HOME/bin

03/06/2014 12:04 p.m.

CentOS 6: Install and Configure Oracle Client | Void Technology

2 de 4

http://voidtech.wordpress.com/2013/11/05/centos-6-install-and-configure...

export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin

Now you can; 1) logout and logon again 2) run sh /etc/profile.d/oracle.sh

4. Test Installation
To test if Oracle Client and tnsnames.ora works properly execute the following command
[root@HOST ~]# sqlplus username@ALIAS_IN_TNSNAMES_ORA

Links
http://eldespistado.com/instalacion-de-oracle-instantclient-y-modulos-perl-dbdoracle-en-linux/
About these ads

You May Like


1.

Share this:

Google+
Paulino Padial

53

Be the first to like this.

CentOS 6: Install webmin using yum repository

CentOS 6: Install EPEL repository

CentOS 6: Enable Perl Oracle


DB scripts support
Follow

03/06/2014 12:04 p.m.

CentOS 6: Install and Configure Oracle Client | Void Technology

3 de 4

http://voidtech.wordpress.com/2013/11/05/centos-6-install-and-configure...

This entry was posted in Espaol, GNU\Linux and tagged centos, oracle on November 5, 2013
[http://voidtech.wordpress.com/2013/11/05/centos-6-install-and-configure-oracle-client/] .

3 thoughts on CentOS 6: Install and Configure Oracle Client

p45l1

Post author

December 18, 2013 at 2:28 pm

Could you try to run


export ORACLE_HOME=/usr/lib/oracle/11.2/client
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
to set your variables and after try:
sqlplus username@ALIAS_IN_TNSNAMES_ORA
to check if is working?
if this works, just create /etc/profile.d/oracle.sh file with this content
export ORACLE_HOME=/usr/lib/oracle/11.2/client
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
Then logout and logon again.
Hope it helps

robertow
November 18, 2013 at 5:37 pm

Follow

03/06/2014 12:04 p.m.

CentOS 6: Install and Configure Oracle Client | Void Technology

4 de 4

http://voidtech.wordpress.com/2013/11/05/centos-6-install-and-configure...

I performed you described steps but I dont have any env variables set. Also I cant run /usr/lib/oracle
/11.2/client64/bin/sqlplus. Error message is:
/usr/lib/oracle/11.2/client64/bin/sqlplus: error while loading shared libraries: libsqlplus.so: cannot open
shared object file: No such file or directory

Pingback: CentOS 6: Install and configure CX_Oracle Python Library | Void Technology

Follow

03/06/2014 12:04 p.m.

You might also like