CentOS 7下安装 sqlsrv 2017


第一步
备份

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

下载新的CentOS-Base.repo 到/etc/yum.repos.d/

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

生成缓存

yum makecache

第二步安装

curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo







三. 安装 SQL Server 命令行工具

1、下载 Microsoft Red Hat 存储库配置文件

curl -o /etc/yum.repos.d/msprod.repo https://packages.microsoft.com/config/rhel/7/prod.repo
  1. 运行以下命令以安装mssql 工具与 unixODBC 开发人员包

    yum install -y mssql-tools unixODBC-devel

  1. 添加/opt/mssql-tools/bin/路径到环境变量

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

5、安装SQLSERVER代理

1.2017CU4及更高版本,启用代理方法

sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
sudo systemctl restart mssql-server

2.2017CU3及更低版本,需安装代理

sudo yum install mssql-server-agent
sudo systemctl restart mssql-server

已安装,需要更新

sudo yum check-update
sudo yum update mssql-server-agent
sudo systemctl restart mssql-server

转自:https://blog.csdn.net/m0_37876935/article/details/105626329

声明:我的幸运年|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - CentOS 7下安装 sqlsrv 2017


Carpe Diem and Do what I like