[comment]: # ({6fa4a853-6fa4a853})
# 4 适用于 MSSQL 的推荐 UnixODBC 设置

[comment]: # ({/6fa4a853-6fa4a853})

[comment]: # ({2549efaf-29c905c8})
#### 安装

-   **Red Hat Enterprise Linux** ([EPEL](https://docs.fedoraproject.org/en-US/epel/) 软件包):

```bash
dnf install epel-release
dnf install freetds
```
-   **Debian/Ubuntu**:

请参考 [FreeTDS user guide](http://www.freetds.org/userguide/)
下载对应平台所需的数据库驱动.

更多信息请参考: [installing
unixODBC](/manual/config/items/itemtypes/odbc_checks/).

[comment]: # ({/2549efaf-29c905c8})

[comment]: # ({a1ae5791-aa4d8324})
#### 配置

ODBC配置通过编辑**odbcinst.ini**和
**odbc.ini**文件完成。这些配置文件位于*/etc*
目录下。file **odbcinst.ini**文件可能缺失，此时需要create
手动创建。

请参考以下示例:

**odbcinst.ini**

    vi /etc/odbcinst.ini
    [FreeTDS]
    Driver = /usr/lib64/libtdsodbc.so.0

**odbc.ini**

    
vi /etc/odbc.ini
    [sql1]
    Driver = FreeTDS
    Server = <SQL server 1 IP>
    PORT = 1433
    TDS_Version = 8.0

[comment]: # ({/a1ae5791-aa4d8324})
