Created
April 29, 2016 20:01
-
-
Save fredericobenevides/f73ef7eb7619e104402d9650281ba8ed to your computer and use it in GitHub Desktop.
Setup for go-oci8
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
prefix=/opt/oracle | |
includedir=${prefix}/instantclient_12_1/sdk/include | |
libdir=${prefix}/instantclient_12_1 | |
Name: oci8 | |
Description: Oracle Instant Client | |
Version: 12.1 | |
Cflags: -I${includedir} | |
Libs: -L${libdir} -lclntsh |
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 | |
sudo apt-get install -y pkg-config | |
sudo apt-get install -y libaio1 | |
rm -rf instantclient_12_1 | |
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip | |
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip | |
sudo rm -rf /opt/oracle | |
sudo mkdir -p /opt/oracle | |
sudo mv instantclient_12_1 /opt/oracle | |
sudo chown -R `whoami`:`whoami` /opt/oracle | |
ln -s /opt/oracle/instantclient_12_1/libclntsh.so.12.1 /opt/oracle/instantclient_12_1/libclntsh.so | |
sudo cp oci8.pc /usr/lib/pkgconfig | |
grep -q "/opt/oracle/instantclient_12_1" /etc/environment | |
if [ $? -ne 0 ]; then | |
echo 'export LD_LIBRARY_PATH="/opt/oracle/instantclient_12_1"' | sudo tee --append /etc/environment | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment