Ubuntu-server-20.04安装SQLSERVER2019


0, 导入微软公钥

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


1, 添加SQLSERVER 2019源

1
2
sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"


2, 安装mssql2019

1
2
sudo apt update
sudo apt install mssql-server

3, 初始化mssql

1
2
3
4
5
sudo /opt/mssql/bin/mssql-conf setup
输入3 ----> 回车
输入yes --> 回车
输入密码 -> 回车 # 无回显信息
再次输入 -> 回车 # 同上

4, 至此你的sqlserver就运行起来了,开放安全组即可.

1
sudo systemctl status mssql-server.service

picture