Created
February 9, 2021 18:34
-
-
Save viniciusgati/71e624149a2698c8926bbdc84c3dc04f to your computer and use it in GitHub Desktop.
This file contains 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/sh | |
echo 'Installing Oracle Instant Client...' | |
export DEBIAN_FRONTEND=noninteractive | |
apt-get -y install libaio1 unzip | |
# See: http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst | |
client_version='21_1' | |
devel_pkg='instantclient-sdk-linux.x64-21.1.0.0.0.zip' | |
basic_pkg='instantclient-basic-linux.x64-21.1.0.0.0.zip' | |
src_dir='/opt/oracle' | |
mkdir -p "$src_dir" && chmod 755 "$src_dir" | |
unzip -o "./$devel_pkg" -d "$src_dir" | |
unzip -o "./$basic_pkg" -d "$src_dir" | |
cd "$src_dir/instantclient_$client_version" | |
# ln -sf libclntsh.so.21.1 libclntsh.so | |
# ln -sf libocci.so.21.1 libocci.so | |
# Required to make this value available persistently. | |
echo "export LD_LIBRARY_PATH=\"$src_dir/instantclient_$client_version\"" >> ~/.bashrc | |
echo "export ORACLE_HOME=\"$src_dir/instantclient_$client_version\"" >> ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment