Installing Oracle Instant Client on Mac OS X
Published: 26 Jul 2007
Getting right down to business…
- Download the Instant Client Packages (4 files)
- Unzip the files into
instantclient10_1
unzip instantclient-basic-macosx-10.1.0.3.zip
unzip instantclient-sqlplus-macosx-10.1.0.3.zip
unzip instantclient-sdk-macosx-10.1.0.3.zip
unzip instantclient-jdbc-macosx-10.1.0.3.zip
Create two symbolic links for the files that have the version appended. This is so the Ruby OCI8
driver can find what it’s looking for.
cd instantclient10_1
ln -s libclntsh.dylib.10.1 libclntsh.dylib
ln -s libocci.dylib.10.1 libocci.dylib
cd ..
Create directory /usr/local/oracle
and then copy instantclient10_1
into it
sudo mkdir /usr/local/oracle
sudo mv instantclient10_1 /usr/local/oracle/instantclient10_1
Open the system /etc/profile
sudo pico /etc/profile
Add these lines to /etc/profile
DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient10_1"
export DYLD_LIBRARY_PATH
SQLPATH="/usr/local/oracle/instantclient10_1"
export SQLPATH
Add /usr/local/oracle/instantclient10_1
to your PATH
while you have /etc/profile
open. Then save it.
Reload your profile
source /etc/profile
Test it out with the sqlplus
command line app.
sqlplus [username][/password]@//[hostname][:port][/database]
If you can connect with that, then you’re good to go.