The most important thing is not to download the 64 bit files as this is broken on OS X Lion, plain and simple, use the 32 bit version.
Step 1 - Get the software you need
Files I downloaded (you need an Oracle dev account) were;- instantclient-basic-10.2.0.4.0-macosx-x86.zip
- instantclient-sqlplus-10.2.0.4.0-macosx-x86.zip
- instantclient-jdbc-10.2.0.4.0-macosx-x86.zip
Step 2 - Install the software
- Create a folder where you want to unzip instantclient zip's to, I used "/Users/munchy/dev/oracle" as the root folder into which I unzipped the files
- Unzip the downloaded files all in the same place
Step 3 - Set Environment properties
- Create or edit the file ~/.profile adding the following
export ORACLE_HOME=/Users/H06810659/dev/oracle
export DYLD_LIBRARY_PATH=$ORACLE_HOME/instantclient_10_2x32
export TNS_ADMIN=$ORACLE_HOME/network/admin
export PATH=$PATH:$DYLD_LIBRARY_PATH
Step 4 - TNSNAMES.ora
- Create a tnsnames.ora file in the folder you define in your system property TNS_ADMIN
The End
Thats it open terminal and connect to your chosen Oracle database e.g. sqlplus system/password@xe