# <div style="text-align:center">SQL Server安装记录</div>

## 操作环境 Ubuntu 22.04.2 LTS

## [安装帮助文档](https://learn.microsoft.com/zh-cn/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-ver15&preserve-view=true&tabs=ubuntu2004#install)

### 安装方法
1.导入公共存储库 GPG 密钥
```sh
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
```
2.注册 SQL Server Ubuntu 存储库：
```sh
    sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
```
3.运行以下命令以安装 SQL Server：
```sh
    sudo apt-get update
    sudo apt-get install -y mssql-server
``` 
4.启动配置
```sh
sudo /opt/mssql/bin/mssql-conf setup
```
4.停止sqlserver
```sh
sudo systemctl stop mssql-server
```