Install freetds in Ubuntu to access sysbase and Microsoft SQL Server databases.
To access sqlserver in Linux, use freetds!
: Http://www.freetds.org
CD: Enter the directory where freetds is located. (For example, CD/root/usr/local/freetds) there is a space after CD.
For example, my directory is as follows:
$ Tar zxvf freetds-stable.tgz (unzipping)
Enter the decompressed directory CD freetds-0.82/
$. /Configure -- prefix =/usr/local/freetds -- With-tdsver = 8.0 -- enable-msdblib -- enable-dbmfix -- With-GNU-LD -- enable-shared -- enable-static
After the password is entered, the configuration takes less than 1 minute.
$ Make
$ Make install
These two processes are also very fast, just a few minutes. Note: because our configuration and installation address is under/usr/local, the administrator privilege is required. You can use the sudo command.
The following shows how to configure the corresponding library file:
Freetds is installed in the/usr/local/freetds directory by default, and the library file is in the corresponding lib directory.
Edit/etc/lD. So. conf,
Insert a row:
/Usr/local/freetds/lib
Run the following command to make the change take effect:
Ldconfig
After the entire process is completed, we can set the environment under codeblocks:
/Usr/local/freetds/lib/libct. So
/Usr/local/freetds/lib/libsybdb. So
Searchdirections:
/Usr/local/freetds/include