安装 SQL Server 数据库

安装验证文件

sudo wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

安装 libcurl3

sudo apt install -y libcurl3

添加 SQL Server for Linux 下载仓库

安装 SQL Server for Linux

sudo apt-get install -y mssql-server

系统初始化配置

sudo /opt/mssql/bin/mssql-conf setup

出现如下选项

  1. Evaluation (free, no production use rights, 180-day limit)
  2. Developer (free, no production use rights)
  3. Express (free)
  4. Web (PAID)
  5. Standard (PAID)
  6. Enterprise (PAID) - CPU Core utilization restricted to 20 physical/40 hyperthreaded
  7. Enterprise Core (PAID) - CPU Core utilization up to Operating System Maximum
  8. I bought a license through a retail sales channel and have a product key to enter.

选择5,标准版

提示 Enter the SQL Server system administrator password 时要注意输入的密码要不低于8位,且要包含字母大小写和数字

安装成功,查看mssql-server 运行状态

systemctl status mssql-server --no-pager

安装命令行工具和 unixodbc-dev

添加仓库地址

要使 sqlcmd/bcp 能从登陆会话的 bash shell 进行访问,请使用下列命令修改 ~/.bash_profile 文件中的 PATH :

echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile

All Rights Reserved. 曹旭升 版权所有

E-mail: cao.silhouette@msn.com

QQ: 279060597

@南京

关于我 我的产品 我的开源项目

ICP证:皖ICP备14020687号-1

公安备案:34110202000256