Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save DonerKebab/51f0aa23f3c637e77455157bf86ff3f5 to your computer and use it in GitHub Desktop.
Save DonerKebab/51f0aa23f3c637e77455157bf86ff3f5 to your computer and use it in GitHub Desktop.
#FROM http://mikelynchgames.com/software-development/installing-oracle-instant-client-and-sqlplus-on-osx/
#REQUIRED
# instantclient-basic-macosx-<version>.zip
# instantclient-sdk-macosx-<version>.zip
# instantclient-sqlplus-macosx-<version>.zip
# put this script in the same folder as these downloaded
'OLD_PWD=$(pwd)
echo "Installing Oracle.."
sudo rm -rf /opt/oracle/instantclient*
sudo mkdir -p /opt/oracle
sudo unzip instantclient-\*.zip -d /opt/oracle/
cd /opt/oracle
for FILE in /opt/oracle/instant*; do
if [[ -d $FILE ]]; then
ORACLE_INST_FOLDER=$FILE
fi
done
echo "Found instant client in $ORACLE_INST_FOLDER"
sudo ln -s $ORACLE_INST_FOLDER /opt/oracle/instantclient
sudo find /opt/oracle/ -name "liblntsh.dynlib.*" -exec ln -s '{}' libclntsh.dynlib \;
sudo find /opt/oracle/ -name "libocci.dylib.*" -exec ln -s '{}' libocci.dynlib \;
# oracle
export ORACLE_HOME=/opt/oracle/instantclient
export DYLD_LIBRARY_PATH=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME
echo "Done"
cd $OLD_PWD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment