Install Oracle Client On CentOS

This installation is same for all rpm based systems like (Centos/Fedora/RHEL/SLES/Opensuse/Mandriva..)

This tutorial is about 11.2 version client, but should work even for 12.1 version.

Packages are:


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

1. Oracle Client Installation

Go to Downloaded rpm packages directory and install them with root privileges.

[[email protected] ~]# yum localinstall oracle* --nogpgcheck

---> Package oracle-instantclient11.2-basic.x86_64 0: set to be updated
 ---> Package oracle-instantclient11.2-devel.x86_64 0: set to be updated
 ---> Package oracle-instantclient11.2-sqlplus.x86_64 0: set to be updated
 --> Finished Dependency Resolution
Dependencies Resolved
 Package                                           Arch                    Version                         Repository                                                              Size
 oracle-instantclient11.2-basic                    x86_64                            /oracle-instantclient11.2-basic-                    179 M
 oracle-instantclient11.2-devel                    x86_64                            /oracle-instantclient11.2-devel-                    1.9 M
 oracle-instantclient11.2-sqlplus                  x86_64                            /oracle-instantclient11.2-sqlplus-                  2.8 M
Transaction Summary
 Install       3 Package(s)
 Upgrade       0 Package(s)
Total size: 184 M
 Is this ok [y/N]: y

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

[[email protected] ~]# mkdir /usr/lib/oracle/11.2/client64/network/admin -p

Now inside you can make your tnsnames.ora  file.

3. Configure Environment Variables

Create file /etc/profile.d/ with the following file content

 export ORACLE_HOME=/usr/lib/oracle/11.2/client64
 export TNS_ADMIN=$ORACLE_HOME/network/admin


1) logout and logon again.

2) Then, run:

sh /etc/profile.d/

4. Test Installation

To test if Oracle Client and tnsnames.ora works properly execute the following command:

[[email protected] ~]# sqlplus [email protected]_TNSNAMNE.ORA