什么是FreeTDS
简单的说FreeTDS是一个程序库,可以实现在Linux系统下访问微软的SQL数据库! FreeTDS 是一个开源(如果你喜欢可以称为自由)的程序库,是TDS(表列数据流 )协议的再次实现。它可以被用在Sybase的db-lib或者ct-lib库。它也包含一个ODBC的库。允许许多开源的应用软件比如Perl和PHP(或者你自己的c或C++程序)去连接到Sybase或 Microsoft SQL服务器。FreeTDS 以源码的形式被发布,几乎可以在任何操作系统上编译。意味着Unix和类Unix系统(包括著名的分支如Interix和QNX),还有Win32,VMS,和OSX。
FreeTDS的安装
Building FreeTDS from git
从git安装freetds
-
构建需要以下包
automake (GNU Automake, generates Makefile.in from Makefile.am)
autoconf (GNU Autoconf, generates configure from configure.ac)
libtool (GNU Libtool, library creation support scripts)
make (GNU or BSD Make.)
gcc (GNU Compiler Collection, for C code compilation)
perl (Perl, used to generate some files)yum install -y automake autoconf libtool make gcc perl git
通过以下命令查看高于以下版本
(autoconf --version; automake --version; libtool --version) |grep GNU
autoconf (GNU Autoconf) 2.60 automake (GNU automake) 1.9.6 ltmain.sh (GNU libtool) 1.5.18 (1.1220.2.245 2005/05/16 08:55:27)
2)下载freetds包
git clone https://github.com/FreeTDS/freetds.git
- execute autogen.sh to run automake, autoconf and configure,
./autogen.sh
Any switches provided to autogen.sh will be passed to the configure script.
- compile the source using make,
make
- switch to a user that can write to the target installation
directory, usually root,
su root
- install the package,
make install
参考 https://github.com/FreeTDS/freetds/blob/master/INSTALL.GIT