Ubuntu Oracle Instant Client


Step by step for installing instant client 12.1

Install RPMs

1. Download Oracle Instant client RPM files from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
Download "Basic lite", and "SQL*Plus".

2. Convert these .rpm files into .deb packages and install using "alien"
("sudo apt-get install alien" if you don't have it).

alien -i oracle-instantclient12.1-basiclite-12.1.0.2.0-1.x86_64.rpm
alien -i oracle-instantclient12.1-sqlplus-12.1.0.2.0-1.x86_64.rpm

3. Test your Instantclient install by using "sqlplus" to connect to your database:

sqlplus username/password@//dbhost:1521/SID


Integrate Oracle Libraries & ORACLE_HOME

Add the Oracle libraries to the LD_LIBRARY_PATH to the system library list create a new file as follows:

sudo vi /etc/ld.so.conf.d/oracle.conf && sudo chmod o+r /etc/ld.so.conf.d/oracle.conf

and add the oracle library path as the first line:

/usr/lib/oracle/12.1/client64/lib/

Then run ldconfig:

sudo ldconfig

Define ORACLE_HOME & LD_LIBRARY_PATH in a system-wide location.

sudo sudo vi /etc/profile.d/oracle.sh && sudo chmod o+r /etc/profile.d/oracle.sh

Add the following:

export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}


Alternatively, each user can define this in their ~/.bash_profile


Source: https://help.ubuntu.com/community/Oracle%20Instant%20Client



Comments

Popular posts from this blog

Fixing & Registering ORACLE_HOMES in Central Inventory

Export in Pl/Sql via DBMS_DATAPUMP