Created
August 27, 2014 15:48
-
-
Save dbehnke/9cf827dd8d32b329dfa4 to your computer and use it in GitHub Desktop.
Setup cx_Oracle with Instantclient 12.1 - download the instantclient and sdk from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html - extract and then place these scripts in the directory - run install-cx_Oracle.sh - you will need to source envoracle.sh to use cx_Oracle or source from your .bashrc
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 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
export ORACLE_HOME=${DIR} | |
export LD_LIBRARY_PATH=${DIR}:$LD_LIBRARY_PATH |
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 | |
VERSION=5.1.3 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cd ${DIR} | |
FILENAME=cx_Oracle-${VERSION}.tar.gz | |
URL=https://pypi.python.org/packages/source/c/cx_Oracle/${FILENAME} | |
if [ ! -f ${FILENAME} ]; then | |
curl ${URL} -o ${FILENAME} | |
fi | |
source envoracle.sh | |
ln -s libclntsh.so.12.1 libclntsh.so | |
ln -s libclntshcore.so.12.1 libclntshcore.so | |
ln -s libocci.so.12.1 libocci.so | |
rm -r -f cx_Oracle-${VERSION} | |
tar xvfz ${FILENAME} | |
cd cx_Oracle-${VERSION} | |
python setup.py build | |
python setup.py install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment