Last active
December 29, 2020 00:25
-
-
Save frullah/acd474a085c93fe18e4d8782acf8bd50 to your computer and use it in GitHub Desktop.
Oracle instantclient installation script
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
#!/bin/bash | |
set -e | |
MAJOR_VERSION=21 | |
MINOR_VERSION=1 | |
INSTANTCLIENT_DIRNAME=instantclient_${MAJOR_VERSION}_${MINOR_VERSION} | |
INSTANTCLIENT_PATH=/opt/${INSTANTCLIENT_DIRNAME} | |
INSTANTCLIENT_DOWNLOAD_PATH=/tmp/${INSTANTCLIENT_DIRNAME} | |
mkdir -p $INSTANTCLIENT_DOWNLOAD_PATH | |
( | |
cd $INSTANTCLIENT_DOWNLOAD_PATH | |
wget \ | |
https://download.oracle.com/otn_software/linux/instantclient/${MAJOR_VERSION}${MINOR_VERSION}000/instantclient-basiclite-linux.x64-${MAJOR_VERSION}.${MINOR_VERSION}.0.0.0.zip \ | |
https://download.oracle.com/otn_software/linux/instantclient/${MAJOR_VERSION}${MINOR_VERSION}000/instantclient-sdk-linux.x64-${MAJOR_VERSION}.${MINOR_VERSION}.0.0.0.zip | |
unzip instantclient-basiclite-linux.x64-${MAJOR_VERSION}.${MINOR_VERSION}.0.0.0.zip | |
unzip instantclient-sdk-linux.x64-${MAJOR_VERSION}.${MINOR_VERSION}.0.0.0.zip | |
mv $INSTANTCLIENT_DIRNAME $INSTANTCLIENT_PATH | |
rm -rf $INSTANTCLIENT_DOWNLOAD_PATH | |
) | |
echo $INSTANTCLIENT_PATH > /etc/ld.so.conf.d/oracle-instantclient.conf | |
ldconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment