Skip to content

Instantly share code, notes, and snippets.

@konarkmodi
Created September 26, 2013 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save konarkmodi/6720521 to your computer and use it in GitHub Desktop.
Save konarkmodi/6720521 to your computer and use it in GitHub Desktop.
Installing TDS
PYTHON=/usr/bin/python2.6 # set this to whichever python version you want to install for.
mkdir -p $HOME/bin $HOME/lib $HOME/src $HOME/tmp
export TMPDIR=$HOME/tmp
export PATH="$HOME/bin:$PATH"
export C_INCLUDE_PATH="$HOME/include:$C_INCLUDE_PATH"
export LIBRARY_PATH="$HOME/lib:$LIBRARY_PATH"
export LD_LIBRARY_PATH="$HOME/lib:$LD_LIBRARY_PATH"
###########################################################
# FreeTDS 0.9.1
# original: http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-0.91.tar.gz
###########################################################
cd $HOME/src
wget 'http://mirror.ryansanden.com/pyodbc-7555f7da/freetds-0.91.tar.gz'
tar -xzf freetds-0.91.tar.gz
cd freetds-0.91
./configure --prefix=$HOME
make # 25 sec
make install
###########################################################
# unixODBC 2.3.1
# original: ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.1.tar.gz
###########################################################
cd $HOME/src
wget 'http://mirror.ryansanden.com/pyodbc-7555f7da/unixODBC-2.3.1.tar.gz'
tar -xzf unixODBC-2.3.1.tar.gz
cd unixODBC-2.3.1
./configure --prefix=$HOME
make # 30 sec
make install
###########################################################
# pyodbc @ 7555f7da7d11b1dbe98895a8ce88df20d20a1006
# original: https://code.google.com/p/pyodbc/
###########################################################
cd $HOME/src
wget 'http://mirror.ryansanden.com/pyodbc-7555f7da/pyodbc-7555f7da.tar.gz'
tar -xzf pyodbc-7555f7da.tar.gz
cd pyodbc-7555f7da
CFLAGS="-I$HOME/include $CLFAGS" LDFLAGS="-L$HOME/lib $LDFLAGS" $PYTHON setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment