Skip to content

Instantly share code, notes, and snippets.

@attacco
Created July 18, 2017 13:49
Show Gist options
  • Save attacco/ab8187c8172ec49b0ac7f9e5e4707427 to your computer and use it in GitHub Desktop.
Save attacco/ab8187c8172ec49b0ac7f9e5e4707427 to your computer and use it in GitHub Desktop.
Oracle Instant Client installation script
#!/bin/bash
export VERSION=11.2.0.4.0
export ORACLE_CLIENT=/usr/local/lib/share/oracle/$VERSION
mkdir -p $ORACLE_CLIENT
tar -xzf instantclient-basic-macos.x64-$VERSION.zip --strip-components=1 -C $ORACLE_CLIENT
tar -xzf instantclient-sqlplus-macos.x64-$VERSION.zip --strip-components=1 -C $ORACLE_CLIENT
cd $ORACLE_CLIENT
ln -snf libclntsh.dylib.* libclntsh.dylib
ln -snf libocci.dylib.* libocci.dylib
export DYLD_LIBRARY_PATH=$ORACLE_CLIENT
export LD_LIBRARY_PATH=$ORACLE_CLIENT
echo
echo Add these lines to ~/.bash_profile:
echo "export ORACLE_CLIENT=\"$ORACLE_CLIENT\""
echo "export DYLD_LIBRARY_PATH=\"$ORACLE_CLIENT\""
echo "export LD_LIBRARY_PATH=\"$ORACLE_CLIENT\""
echo 'export PATH="$ORACLE_CLIENT:$PATH"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment