First Pit Daddy! Because the configuration Zabbix use this, online data a meal search, a meal error, tune various parameters, still can't connect, I was speechless;
This is only a small part of the project, only to provide a successful case, did not do in-depth research, you can let the encounter of the brothers less detours;
First to download the ODBC installation package on the official website; my version unixODBC-2.3.4
http://www.unixodbc.org FreeTDS SQL Server, Sybase driver-these two are born from the same root
My version: freetds-0.91
http://www.freetds.org
Here we go.
Install under Root
1. Install UnixODBC # tar Vxzf unixodbc-2.3.4.tar.gz
# CD unixODBC-2.3.4
#./configure--prefix=/usr/local/unixodbc--enable-gui=no
# make
# make Install
2. Install FreeTDS # tar Vxzf freetds-0.91.tar.gz
# CD freetds-freetds-0.91 #./configure--prefix=/usr/local/freetds--with-unixodbc=/usr/local/unixodbc--with-tdsver =8.0
# make
# make Install
3, Configuration freetds.conf
# vi/usr/local/freetds/etc/freetds.conf
TDS version =8.0 This is sometimes to try,
Forum has a brother reported this mistake, I also reported this error, I tried is not successful, but he succeeded, there must be a reason; So the version I was using everybody popular 8.0
Add SQL Server Driver # VI/USR/LOCAL/UNIXODBC/ETC Odbcinst.ini to ODBC
# Vi/usr/local/unixodbc/etc/odbc.ini
Netstat-na | Find "LISTENING" Lookup port command is turned on
General error, first look at the log, and then do not fall on the simple problem, such as Ping does not pass Ah, do not underestimate these small problems yo, once encountered a case, a ping B can ping, b ping A can ping, then lazy, less gestures once, the result I re-installed half of the system;
Also used: Tsql–c See FreeTDS version
After no error:
[Email protected] ~]#/usr/local/freetds/bin/tsql-s sqlserver2014-p 1433-u zabbix_server
Enter the SQL Server user password later
Here's the success:
Query result case:
Welcome you to shoot bricks;
Linux ODBC Connection SQL server2014