Last active
February 29, 2016 16:38
-
-
Save nycynik/8a96db26650b9761d401 to your computer and use it in GitHub Desktop.
A (destructive) method of installing oracle on a mac. This installs oracle to /opt/oracle/instantclient, and destroys any existing /opt/oracle/instantclient* folders. It also sets up the enviornment to use the newly installed oracle, however it does not set your .bash_profile up for the next time you need it. This script needs to be run from the…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# oracle | |
export ORACLE_HOME=/opt/oracle/instantclient | |
export DYLD_LIBRARY_PATH=$ORACLE_HOME | |
export LD_LIBRARY_PATH=$ORACLE_HOME | |
export NLS_LANG=AMERICAN_AMERICA.UTF8 | |
export TNS_ADMIN=$HOME/etc | |
export PATH=$PATH:$ORACLE_HOME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment