April 24, 2016

How to Install the Oracle Instant Client on Ubuntu 16.04

  1. Download the Oracle Instant Client RPMs from the Oracle website.

  2. Use the alien package to convert and install the RPMs.

     sudo alien -i oracle-instantclient11.2-basic-
     sudo alien -i oracle-instantclient11.2-devel-
     sudo alien -i oracle-instantclient11.2-sqlplus-
  3. Create a network/admin folder inside the installation folder and copy your tnsnames.ora and sqlnet.ora to this directory. My installation folder is /usr/lib/oracle/11.2/client64 .

  4. Set the Oracle environment variables by editing your PATH and adding ORACLE_HOME, OCI_LIB and TNS_ADMIN to your /etc/environment file as follows:


    The LD_LIBRARY_PATH variable needs special treatment as per the Ubuntu help page:

     echo "/usr/lib/oracle/11.2/client64/lib" | sudo tee /etc/ld.so.conf.d/oracle.conf
     sudo ldconfig -v
  5. Install libaio1

     sudo apt-get install libaio1
  6. Test client

     sqlplus USER@SERVER

That’s it. In a future post I will detail how to install ROracle in Ubuntu 16.04.