sql server能装在linux上吗,sql-server – 如何在Linux中安装freetds?

我已经创建了一个Vagrant盒子,其中有一个完整的安装示例:

https://github.com/FlipperPA/django-python3-vagrant/

……但这是基本步骤.

# Install pre-requesite packages

sudo apt-get install unixodbc unixodbc-dev freetds-dev freetds-bin tdsodbc

将odbcinst.ini指向/etc/odbcinst.ini中的驱动程序:

[FreeTDS]

Description = v0.91 with protocol v7.2

Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so

在odbc.ini中创建您的DSN:

[dbserverdsn]

Driver = FreeTDS

Server = dbserver.domain.com

Port = 1433

TDS_Version = 7.2

…以及你在freetds.conf中的DSN:

[global]

# TDS protocol version,use:

# 7.3 for sql Server 2008 or greater (tested through 2014)

# 7.2 for sql Server 2005

# 7.1 for sql Server 2000

# 7.0 for sql Server 7

tds version = 7.2

port = 1433

# Whether to write a TDSDUMP file for diagnostic purposes

# (setting this to /tmp is insecure on a multi-user system)

; dump file = /tmp/freetds.log

; debug flags = 0xffff

# Command and connection timeouts

; timeout = 10

; connect timeout = 10

# If you get out-of-memory errors,it may mean that your client

# is trying to allocate a huge buffer for a TEXT field.

# Try setting 'text size' to a more reasonable limit

text size = 64512

# A typical Microsoft server

[dbserverdsn]

host = dbserver.domain.com

port = 1433

tds version = 7.2

完成此操作后,您可以尝试连接tsql(以测试FreeTDS层)和isql(通过FreeTDS堆栈的unixODBC)来测试连接.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值