UbuntuServer21.04にSQLServer2019をインストールした

UbuntuServer16.04+SQLServer2017で構築していた環境のUbuntuServer16.04が2021年04月でサポート終了してしまうので、UbuntuServer21.04+SQLServer2019でリプレイスする

設定メモ

ダウンロード

Get Ubuntu Server

ダウンロード

UbuntuServer21.04をインストールする

GRUB
言語の選択
キーボードの選択
ネットワーク設定
Proxy設定
ミラーサイト設定
ディスク設定
パーティション設定
ディスク初期化の確認
初期ユーザー設定
OpenSSHのインストール
※ここではOpenSSHサーバーはインストールしない
GRUB
※snaps経由ではなにもインストールしない
インストール中
インストール終了
無事起動した

最低限必要なパッケージをインストールする

$ sudo apt install -y openssh-server avahi-daemon

SQLServer2019のリポジトリを追加してSQLServer2019をインストールする

コピペしやすいように別マシンからssh接続を行って作業を行う

Microsoftのパッケージ認証キーを追加する

administrator@ubuntu2104:~$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
[sudo] password for administrator:
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

SQLServer2019のリポジトリを追加する

administrator@ubuntu2104:~$ sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"
Repository: 'deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal main'
Description:
Archive for codename: focal components: main
More info: https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019
Adding repository.
Press [ENTER] to continue or Ctrl-c to cancel.
Adding deb entry to /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_ubuntu_20_04_mssql-server-2019-hirsute.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/archive_uri-https_packages_microsoft_com_ubuntu_20_04_mssql-server-2019-hirsute.list
Hit:1 https://download.docker.com/linux/ubuntu focal InRelease
Get:2 http://jp.archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
Get:4 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal InRelease [10.4 kB]
Get:5 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal/main armhf Packages [589 B]
Get:6 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal/main arm64 Packages [589 B]
Get:7 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal/main amd64 Packages [4129 B]
Hit:8 http://jp.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Get:9 http://jp.archive.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
Get:10 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages [15.0 kB]
Get:11 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/main Translation-en [4288 B]
Get:12 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 c-n-f Metadata [796 B]
Get:13 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 Packages [67.2 kB]
Get:14 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/restricted Translation-en [9920 B]
Get:15 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/restricted amd64 c-n-f Metadata [432 B]
Get:16 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 Packages [14.8 kB]
Get:17 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/universe Translation-en [4128 B]
Get:18 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/universe amd64 c-n-f Metadata [880 B]
Get:19 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/multiverse amd64 Packages [1700 B]
Get:20 http://jp.archive.ubuntu.com/ubuntu hirsute-updates/multiverse Translation-en [432 B]
Get:21 http://jp.archive.ubuntu.com/ubuntu hirsute-security/main amd64 Packages [4576 B]
Get:22 http://jp.archive.ubuntu.com/ubuntu hirsute-security/main Translation-en [968 B]
Get:23 http://jp.archive.ubuntu.com/ubuntu hirsute-security/main amd64 c-n-f Metadata [332 B]
Get:24 http://jp.archive.ubuntu.com/ubuntu hirsute-security/restricted amd64 Packages [67.2 kB]
Get:25 http://jp.archive.ubuntu.com/ubuntu hirsute-security/restricted Translation-en [9920 B]
Get:26 http://jp.archive.ubuntu.com/ubuntu hirsute-security/restricted amd64 c-n-f Metadata [436 B]
Get:27 http://jp.archive.ubuntu.com/ubuntu hirsute-security/universe amd64 Packages [9084 B]
Get:28 http://jp.archive.ubuntu.com/ubuntu hirsute-security/universe Translation-en [1416 B]
Get:29 http://jp.archive.ubuntu.com/ubuntu hirsute-security/universe amd64 c-n-f Metadata [488 B]
Get:30 http://jp.archive.ubuntu.com/ubuntu hirsute-security/multiverse amd64 Packages [1680 B]
Get:31 http://jp.archive.ubuntu.com/ubuntu hirsute-security/multiverse Translation-en [432 B]
Fetched 710 kB in 1s (592 kB/s)
Reading package lists... Done

SQLServer2019パッケージをインストールする

administrator@ubuntu2104:~$ sudo apt-get install -y mssql-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gdb libatomic1 libbabeltrace1 libboost-regex1.74.0 libc++1 libc++1-12 libc++abi1-12 libc6-dbg
  libdebuginfod-common libdebuginfod1 libipt2 libsasl2-modules-gssapi-mit
  libsource-highlight-common libsource-highlight4v5 libsss-nss-idmap0
Suggested packages:
  gdb-doc gdbserver clang
The following NEW packages will be installed:
  gdb libatomic1 libbabeltrace1 libboost-regex1.74.0 libc++1 libc++1-12 libc++abi1-12 libc6-dbg
  libdebuginfod-common libdebuginfod1 libipt2 libsasl2-modules-gssapi-mit
  libsource-highlight-common libsource-highlight4v5 libsss-nss-idmap0 mssql-server
0 upgraded, 16 newly installed, 0 to remove and 2 not upgraded.
Need to get 260 MB of archives.
After this operation, 1210 MB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libdebuginfod-common all 0.183-8 [6252 B]
Get:2 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libbabeltrace1 amd64 1.5.8-1build3 [157 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libdebuginfod1 amd64 0.183-8 [10.5 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libipt2 amd64 2.0.3-1 [43.8 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libsource-highlight-common all 3.1.9-3build1 [61.3 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libboost-regex1.74.0 amd64 1.74.0-8ubuntu2 [490 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libsource-highlight4v5 amd64 3.1.9-3build1 [239 kB]
Get:8 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 gdb amd64 10.1-2ubuntu2 [3333 kB]
Get:9 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal/main amd64 mssql-server amd64 15.0.4123.1-5 [247 MB]
Get:10 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libatomic1 amd64 11-20210417-1ubuntu1 [9236 B]
Get:11 http://jp.archive.ubuntu.com/ubuntu hirsute/universe amd64 libc++abi1-12 amd64 1:12.0.0-1ubuntu1 [60.2 kB]
Get:12 http://jp.archive.ubuntu.com/ubuntu hirsute/universe amd64 libc++1-12 amd64 1:12.0.0-1ubuntu1 [202 kB]
Get:13 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libsasl2-modules-gssapi-mit amd64 2.1.27+dfsg-2ubuntu1 [36.4 kB]
Get:14 http://jp.archive.ubuntu.com/ubuntu hirsute/universe amd64 libc++1 amd64 1:12.0-52~exp1 [3060 B]
Get:15 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libc6-dbg amd64 2.33-0ubuntu5 [8714 kB]
Get:16 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libsss-nss-idmap0 amd64 2.4.0-1ubuntu6 [20.3 kB]
Fetched 260 MB in 48s (5458 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libdebuginfod-common.
(Reading database ... 75050 files and directories currently installed.)
Preparing to unpack .../00-libdebuginfod-common_0.183-8_all.deb ...
Unpacking libdebuginfod-common (0.183-8) ...
Selecting previously unselected package libbabeltrace1:amd64.
Preparing to unpack .../01-libbabeltrace1_1.5.8-1build3_amd64.deb ...
Unpacking libbabeltrace1:amd64 (1.5.8-1build3) ...
Selecting previously unselected package libdebuginfod1:amd64.
Preparing to unpack .../02-libdebuginfod1_0.183-8_amd64.deb ...
Unpacking libdebuginfod1:amd64 (0.183-8) ...
Selecting previously unselected package libipt2.
Preparing to unpack .../03-libipt2_2.0.3-1_amd64.deb ...
Unpacking libipt2 (2.0.3-1) ...
Selecting previously unselected package libsource-highlight-common.
Preparing to unpack .../04-libsource-highlight-common_3.1.9-3build1_all.deb ...
Unpacking libsource-highlight-common (3.1.9-3build1) ...
Selecting previously unselected package libboost-regex1.74.0:amd64.
Preparing to unpack .../05-libboost-regex1.74.0_1.74.0-8ubuntu2_amd64.deb ...
Unpacking libboost-regex1.74.0:amd64 (1.74.0-8ubuntu2) ...
Selecting previously unselected package libsource-highlight4v5.
Preparing to unpack .../06-libsource-highlight4v5_3.1.9-3build1_amd64.deb ...
Unpacking libsource-highlight4v5 (3.1.9-3build1) ...
Selecting previously unselected package gdb.
Preparing to unpack .../07-gdb_10.1-2ubuntu2_amd64.deb ...
Unpacking gdb (10.1-2ubuntu2) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../08-libatomic1_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libatomic1:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libc++abi1-12:amd64.
Preparing to unpack .../09-libc++abi1-12_1%3a12.0.0-1ubuntu1_amd64.deb ...
Unpacking libc++abi1-12:amd64 (1:12.0.0-1ubuntu1) ...
Selecting previously unselected package libc++1-12:amd64.
Preparing to unpack .../10-libc++1-12_1%3a12.0.0-1ubuntu1_amd64.deb ...
Unpacking libc++1-12:amd64 (1:12.0.0-1ubuntu1) ...
Selecting previously unselected package libsasl2-modules-gssapi-mit:amd64.
Preparing to unpack .../11-libsasl2-modules-gssapi-mit_2.1.27+dfsg-2ubuntu1_amd64.deb ...
Unpacking libsasl2-modules-gssapi-mit:amd64 (2.1.27+dfsg-2ubuntu1) ...
Selecting previously unselected package libc++1:amd64.
Preparing to unpack .../12-libc++1_1%3a12.0-52~exp1_amd64.deb ...
Unpacking libc++1:amd64 (1:12.0-52~exp1) ...
Selecting previously unselected package libc6-dbg:amd64.
Preparing to unpack .../13-libc6-dbg_2.33-0ubuntu5_amd64.deb ...
Unpacking libc6-dbg:amd64 (2.33-0ubuntu5) ...
Selecting previously unselected package libsss-nss-idmap0.
Preparing to unpack .../14-libsss-nss-idmap0_2.4.0-1ubuntu6_amd64.deb ...
Unpacking libsss-nss-idmap0 (2.4.0-1ubuntu6) ...
Selecting previously unselected package mssql-server.
Preparing to unpack .../15-mssql-server_15.0.4123.1-5_amd64.deb ...
Unpacking mssql-server (15.0.4123.1-5) ...
Setting up libdebuginfod-common (0.183-8) ...

Creating config file /etc/profile.d/debuginfod.sh with new version

Creating config file /etc/profile.d/debuginfod.csh with new version
Setting up libdebuginfod1:amd64 (0.183-8) ...
Setting up libsource-highlight-common (3.1.9-3build1) ...
Setting up libc6-dbg:amd64 (2.33-0ubuntu5) ...
Setting up libboost-regex1.74.0:amd64 (1.74.0-8ubuntu2) ...
Setting up libatomic1:amd64 (11-20210417-1ubuntu1) ...
Setting up libipt2 (2.0.3-1) ...
Setting up libbabeltrace1:amd64 (1.5.8-1build3) ...
Setting up libc++abi1-12:amd64 (1:12.0.0-1ubuntu1) ...
Setting up libsss-nss-idmap0 (2.4.0-1ubuntu6) ...
Setting up libsasl2-modules-gssapi-mit:amd64 (2.1.27+dfsg-2ubuntu1) ...
Setting up libsource-highlight4v5 (3.1.9-3build1) ...
Setting up libc++1-12:amd64 (1:12.0.0-1ubuntu1) ...
Setting up gdb (10.1-2ubuntu2) ...
Setting up libc++1:amd64 (1:12.0-52~exp1) ...
Setting up mssql-server (15.0.4123.1-5) ...

+--------------------------------------------------------------+
Please run 'sudo /opt/mssql/bin/mssql-conf setup'
to complete the setup of Microsoft SQL Server
+--------------------------------------------------------------+

Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

SQLServer2019をセットアップする

administrator@ubuntu2104:~$ sudo /opt/mssql/bin/mssql-conf setup
usermod: no changes
Choose an edition of SQL Server:
  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.

Details about editions can be found at
https://go.microsoft.com/fwlink/?LinkId=2109348&clcid=0x409

Use of PAID editions of this software requires separate licensing through a
Microsoft Volume Licensing program.
By choosing a PAID edition, you are verifying that you have the appropriate
number of licenses in place to install and run this software.

Enter your edition(1-8): 3
The license terms for this product can be found in
/usr/share/doc/mssql-server or downloaded from:
https://go.microsoft.com/fwlink/?LinkId=2104294&clcid=0x409

The privacy statement can be viewed at:
https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409

Do you accept the license terms? [Yes/No]:y

Enter the SQL Server system administrator password:
Confirm the SQL Server system administrator password:
Configuring SQL Server...

The licensing PID was successfully processed. The new edition is [Express Edition].
ForceFlush is enabled for this instance.
ForceFlush feature is enabled for log durability.
Created symlink /etc/systemd/system/multi-user.target.wants/mssql-server.service → /lib/systemd/system/mssql-server.service.
Setup has completed successfully. SQL Server is now starting.

※いつもどおりExpress版としてインストールした

mssql-toolsのためのリポジトリを追加する

administrator@ubuntu2104:~$ curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    89  100    89    0     0    272      0 --:--:-- --:--:-- --:--:--   273
deb [arch=amd64,armhf,arm64] https://packages.microsoft.com/ubuntu/20.04/prod focal main
administrator@ubuntu2104:~$ sudo apt-get update
Get:1 http://jp.archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Hit:2 http://jp.archive.ubuntu.com/ubuntu hirsute-updates InRelease
Hit:3 http://jp.archive.ubuntu.com/ubuntu hirsute-backports InRelease
Hit:4 https://download.docker.com/linux/ubuntu focal InRelease
Hit:5 http://jp.archive.ubuntu.com/ubuntu hirsute-security InRelease
Hit:6 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal InRelease
Get:7 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease [10.5 kB]
Get:8 https://packages.microsoft.com/ubuntu/20.04/prod focal/main arm64 Packages [9560 B]
Get:9 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 Packages [67.8 kB]
Get:10 https://packages.microsoft.com/ubuntu/20.04/prod focal/main armhf Packages [9549 B]
Fetched 367 kB in 1s (400 kB/s)
Reading package lists... Done

mssql-toolsをインストールする

administrator@ubuntu2104:~$ sudo apt-get install -y mssql-tools unixodbc-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  autoconf automake autotools-dev cpp cpp-10 fontconfig-config fonts-dejavu-core gcc gcc-10
  gcc-10-base libasan6 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0
  libfontconfig1 libgcc-10-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8
  liblsan0 libltdl-dev libmpc3 libnsl-dev libodbc1 libquadmath0 libtiff5 libtirpc-dev libtool
  libtsan0 libubsan1 libwebp6 libxpm4 linux-libc-dev m4 manpages-dev msodbcsql17 odbcinst
  odbcinst1debian2 rpcsvc-proto unixodbc
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc gettext cpp-doc gcc-10-locales gcc-multilib make flex
  bison gcc-doc gcc-10-multilib gcc-10-doc glibc-doc libgd-tools libtool-doc unixodbc-bin gfortran
  | fortran95-compiler gcj-jdk m4-doc
The following NEW packages will be installed:
  autoconf automake autotools-dev cpp cpp-10 fontconfig-config fonts-dejavu-core gcc gcc-10
  gcc-10-base libasan6 libc-dev-bin libc-devtools libc6-dev libcc1-0 libcrypt-dev libdeflate0
  libfontconfig1 libgcc-10-dev libgd3 libgomp1 libisl23 libitm1 libjbig0 libjpeg-turbo8 libjpeg8
  liblsan0 libltdl-dev libmpc3 libnsl-dev libodbc1 libquadmath0 libtiff5 libtirpc-dev libtool
  libtsan0 libubsan1 libwebp6 libxpm4 linux-libc-dev m4 manpages-dev msodbcsql17 mssql-tools
  odbcinst odbcinst1debian2 rpcsvc-proto unixodbc unixodbc-dev
0 upgraded, 49 newly installed, 0 to remove and 2 not upgraded.
Need to get 46.6 MB of archives.
After this operation, 166 MB of additional disk space will be used.
Get:1 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 m4 amd64 1.4.18-5 [200 kB]
Get:2 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 autoconf all 2.69-14 [293 kB]
Get:3 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 autotools-dev all 20180224.1+nmu1 [39.4 kB]
Get:4 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 automake all 1:1.16.3-2ubuntu1 [552 kB]
Get:5 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 gcc-10-base amd64 10.3.0-1ubuntu1 [20.1 kB]
Get:6 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libisl23 amd64 0.23-1build1 [661 kB]
Get:7 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libmpc3 amd64 1.2.0-1build1 [44.1 kB]
Get:8 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 cpp-10 amd64 10.3.0-1ubuntu1 [8612 kB]
Get:9 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 libodbc1 amd64 2.3.7 [511 kB]
Get:10 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 odbcinst1debian2 amd64 2.3.7 [135 kB]
Get:11 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 odbcinst amd64 2.3.7 [12.0 kB]
Get:12 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 unixodbc amd64 2.3.7 [19.6 kB]
Get:13 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 msodbcsql17 amd64 17.7.2.1-1 [745 kB]
Get:14 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 mssql-tools amd64 17.7.1.1-1 [212 kB]
Get:15 https://packages.microsoft.com/ubuntu/20.04/prod focal/main amd64 unixodbc-dev amd64 2.3.7 [37.1 kB]
Get:16 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 cpp amd64 4:10.3.0-1ubuntu1 [27.7 kB]
Get:17 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 fonts-dejavu-core all 2.37-2build1 [1041 kB]
Get:18 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 fontconfig-config all 2.13.1-4.2ubuntu3 [28.2 kB]
Get:19 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libcc1-0 amd64 11-20210417-1ubuntu1 [48.7 kB]
Get:20 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libgomp1 amd64 11-20210417-1ubuntu1 [107 kB]
Get:21 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libitm1 amd64 11-20210417-1ubuntu1 [26.4 kB]
Get:22 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libasan6 amd64 11-20210417-1ubuntu1 [2140 kB]
Get:23 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 liblsan0 amd64 11-20210417-1ubuntu1 [893 kB]
Get:24 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libtsan0 amd64 11-20210417-1ubuntu1 [2090 kB]
Get:25 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libubsan1 amd64 11-20210417-1ubuntu1 [845 kB]
Get:26 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libquadmath0 amd64 11-20210417-1ubuntu1 [146 kB]
Get:27 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libgcc-10-dev amd64 10.3.0-1ubuntu1 [2337 kB]
Get:28 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 gcc-10 amd64 10.3.0-1ubuntu1 [17.5 MB]
Get:29 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 gcc amd64 4:10.3.0-1ubuntu1 [5212 B]
Get:30 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libc-dev-bin amd64 2.33-0ubuntu5 [19.3 kB]
Get:31 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libfontconfig1 amd64 2.13.1-4.2ubuntu3 [116 kB]
Get:32 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libjpeg-turbo8 amd64 2.0.6-0ubuntu2 [117 kB]
Get:33 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libjpeg8 amd64 8c-2ubuntu8 [2194 B]
Get:34 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libdeflate0 amd64 1.7-1ubuntu1 [52.6 kB]
Get:35 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libjbig0 amd64 2.1-3.1build1 [26.7 kB]
Get:36 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libwebp6 amd64 0.6.1-2 [185 kB]
Get:37 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libtiff5 amd64 4.2.0-1build1 [168 kB]
Get:38 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libxpm4 amd64 1:3.5.12-1 [34.0 kB]
Get:39 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libgd3 amd64 2.3.0-2 [118 kB]
Get:40 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libc-devtools amd64 2.33-0ubuntu5 [27.2 kB]
Get:41 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 linux-libc-dev amd64 5.11.0-16.17 [1202 kB]
Get:42 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libcrypt-dev amd64 1:4.4.17-1ubuntu3 [104 kB]
Get:43 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 rpcsvc-proto amd64 1.4.2-0ubuntu4 [62.8 kB]
Get:44 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libtirpc-dev amd64 1.3.1-1build1 [183 kB]
Get:45 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libnsl-dev amd64 1.3.0-0ubuntu3 [66.4 kB]
Get:46 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libc6-dev amd64 2.33-0ubuntu5 [2143 kB]
Get:47 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libltdl-dev amd64 2.4.6-15 [162 kB]
Get:48 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 libtool all 2.4.6-15 [161 kB]
Get:49 http://jp.archive.ubuntu.com/ubuntu hirsute/main amd64 manpages-dev all 5.10-1 [2309 kB]
Fetched 46.6 MB in 8s (6136 kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package m4.
(Reading database ... 75920 files and directories currently installed.)
Preparing to unpack .../00-m4_1.4.18-5_amd64.deb ...
Unpacking m4 (1.4.18-5) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../01-autoconf_2.69-14_all.deb ...
Unpacking autoconf (2.69-14) ...
Selecting previously unselected package autotools-dev.
Preparing to unpack .../02-autotools-dev_20180224.1+nmu1_all.deb ...
Unpacking autotools-dev (20180224.1+nmu1) ...
Selecting previously unselected package automake.
Preparing to unpack .../03-automake_1%3a1.16.3-2ubuntu1_all.deb ...
Unpacking automake (1:1.16.3-2ubuntu1) ...
Selecting previously unselected package gcc-10-base:amd64.
Preparing to unpack .../04-gcc-10-base_10.3.0-1ubuntu1_amd64.deb ...
Unpacking gcc-10-base:amd64 (10.3.0-1ubuntu1) ...
Selecting previously unselected package libisl23:amd64.
Preparing to unpack .../05-libisl23_0.23-1build1_amd64.deb ...
Unpacking libisl23:amd64 (0.23-1build1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../06-libmpc3_1.2.0-1build1_amd64.deb ...
Unpacking libmpc3:amd64 (1.2.0-1build1) ...
Selecting previously unselected package cpp-10.
Preparing to unpack .../07-cpp-10_10.3.0-1ubuntu1_amd64.deb ...
Unpacking cpp-10 (10.3.0-1ubuntu1) ...
Selecting previously unselected package cpp.
Preparing to unpack .../08-cpp_4%3a10.3.0-1ubuntu1_amd64.deb ...
Unpacking cpp (4:10.3.0-1ubuntu1) ...
Selecting previously unselected package fonts-dejavu-core.
Preparing to unpack .../09-fonts-dejavu-core_2.37-2build1_all.deb ...
Unpacking fonts-dejavu-core (2.37-2build1) ...
Selecting previously unselected package fontconfig-config.
Preparing to unpack .../10-fontconfig-config_2.13.1-4.2ubuntu3_all.deb ...
Unpacking fontconfig-config (2.13.1-4.2ubuntu3) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../11-libcc1-0_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libcc1-0:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../12-libgomp1_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libgomp1:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../13-libitm1_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libitm1:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libasan6:amd64.
Preparing to unpack .../14-libasan6_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libasan6:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../15-liblsan0_11-20210417-1ubuntu1_amd64.deb ...
Unpacking liblsan0:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../16-libtsan0_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libtsan0:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../17-libubsan1_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libubsan1:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../18-libquadmath0_11-20210417-1ubuntu1_amd64.deb ...
Unpacking libquadmath0:amd64 (11-20210417-1ubuntu1) ...
Selecting previously unselected package libgcc-10-dev:amd64.
Preparing to unpack .../19-libgcc-10-dev_10.3.0-1ubuntu1_amd64.deb ...
Unpacking libgcc-10-dev:amd64 (10.3.0-1ubuntu1) ...
Selecting previously unselected package gcc-10.
Preparing to unpack .../20-gcc-10_10.3.0-1ubuntu1_amd64.deb ...
Unpacking gcc-10 (10.3.0-1ubuntu1) ...
Selecting previously unselected package gcc.
Preparing to unpack .../21-gcc_4%3a10.3.0-1ubuntu1_amd64.deb ...
Unpacking gcc (4:10.3.0-1ubuntu1) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../22-libc-dev-bin_2.33-0ubuntu5_amd64.deb ...
Unpacking libc-dev-bin (2.33-0ubuntu5) ...
Selecting previously unselected package libfontconfig1:amd64.
Preparing to unpack .../23-libfontconfig1_2.13.1-4.2ubuntu3_amd64.deb ...
Unpacking libfontconfig1:amd64 (2.13.1-4.2ubuntu3) ...
Selecting previously unselected package libjpeg-turbo8:amd64.
Preparing to unpack .../24-libjpeg-turbo8_2.0.6-0ubuntu2_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (2.0.6-0ubuntu2) ...
Selecting previously unselected package libjpeg8:amd64.
Preparing to unpack .../25-libjpeg8_8c-2ubuntu8_amd64.deb ...
Unpacking libjpeg8:amd64 (8c-2ubuntu8) ...
Selecting previously unselected package libdeflate0:amd64.
Preparing to unpack .../26-libdeflate0_1.7-1ubuntu1_amd64.deb ...
Unpacking libdeflate0:amd64 (1.7-1ubuntu1) ...
Selecting previously unselected package libjbig0:amd64.
Preparing to unpack .../27-libjbig0_2.1-3.1build1_amd64.deb ...
Unpacking libjbig0:amd64 (2.1-3.1build1) ...
Selecting previously unselected package libwebp6:amd64.
Preparing to unpack .../28-libwebp6_0.6.1-2_amd64.deb ...
Unpacking libwebp6:amd64 (0.6.1-2) ...
Selecting previously unselected package libtiff5:amd64.
Preparing to unpack .../29-libtiff5_4.2.0-1build1_amd64.deb ...
Unpacking libtiff5:amd64 (4.2.0-1build1) ...
Selecting previously unselected package libxpm4:amd64.
Preparing to unpack .../30-libxpm4_1%3a3.5.12-1_amd64.deb ...
Unpacking libxpm4:amd64 (1:3.5.12-1) ...
Selecting previously unselected package libgd3:amd64.
Preparing to unpack .../31-libgd3_2.3.0-2_amd64.deb ...
Unpacking libgd3:amd64 (2.3.0-2) ...
Selecting previously unselected package libc-devtools.
Preparing to unpack .../32-libc-devtools_2.33-0ubuntu5_amd64.deb ...
Unpacking libc-devtools (2.33-0ubuntu5) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../33-linux-libc-dev_5.11.0-16.17_amd64.deb ...
Unpacking linux-libc-dev:amd64 (5.11.0-16.17) ...
Selecting previously unselected package libcrypt-dev:amd64.
Preparing to unpack .../34-libcrypt-dev_1%3a4.4.17-1ubuntu3_amd64.deb ...
Unpacking libcrypt-dev:amd64 (1:4.4.17-1ubuntu3) ...
Selecting previously unselected package rpcsvc-proto.
Preparing to unpack .../35-rpcsvc-proto_1.4.2-0ubuntu4_amd64.deb ...
Unpacking rpcsvc-proto (1.4.2-0ubuntu4) ...
Selecting previously unselected package libtirpc-dev:amd64.
Preparing to unpack .../36-libtirpc-dev_1.3.1-1build1_amd64.deb ...
Unpacking libtirpc-dev:amd64 (1.3.1-1build1) ...
Selecting previously unselected package libnsl-dev:amd64.
Preparing to unpack .../37-libnsl-dev_1.3.0-0ubuntu3_amd64.deb ...
Unpacking libnsl-dev:amd64 (1.3.0-0ubuntu3) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../38-libc6-dev_2.33-0ubuntu5_amd64.deb ...
Unpacking libc6-dev:amd64 (2.33-0ubuntu5) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../39-libltdl-dev_2.4.6-15_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-15) ...
Selecting previously unselected package libodbc1:amd64.
Preparing to unpack .../40-libodbc1_2.3.7_amd64.deb ...
Unpacking libodbc1:amd64 (2.3.7) ...
Selecting previously unselected package libtool.
Preparing to unpack .../41-libtool_2.4.6-15_all.deb ...
Unpacking libtool (2.4.6-15) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../42-manpages-dev_5.10-1_all.deb ...
Unpacking manpages-dev (5.10-1) ...
Selecting previously unselected package odbcinst1debian2:amd64.
Preparing to unpack .../43-odbcinst1debian2_2.3.7_amd64.deb ...
Unpacking odbcinst1debian2:amd64 (2.3.7) ...
Selecting previously unselected package odbcinst.
Preparing to unpack .../44-odbcinst_2.3.7_amd64.deb ...
Unpacking odbcinst (2.3.7) ...
Selecting previously unselected package unixodbc.
Preparing to unpack .../45-unixodbc_2.3.7_amd64.deb ...
Unpacking unixodbc (2.3.7) ...
Selecting previously unselected package msodbcsql17.
Preparing to unpack .../46-msodbcsql17_17.7.2.1-1_amd64.deb ...
Unpacking msodbcsql17 (17.7.2.1-1) ...
Selecting previously unselected package mssql-tools.
Preparing to unpack .../47-mssql-tools_17.7.1.1-1_amd64.deb ...
Unpacking mssql-tools (17.7.1.1-1) ...
Selecting previously unselected package unixodbc-dev.
Preparing to unpack .../48-unixodbc-dev_2.3.7_amd64.deb ...
Unpacking unixodbc-dev (2.3.7) ...
Setting up manpages-dev (5.10-1) ...
Setting up libxpm4:amd64 (1:3.5.12-1) ...
Setting up libdeflate0:amd64 (1.7-1ubuntu1) ...
Setting up linux-libc-dev:amd64 (5.11.0-16.17) ...
Setting up m4 (1.4.18-5) ...
Setting up libgomp1:amd64 (11-20210417-1ubuntu1) ...
Setting up libjbig0:amd64 (2.1-3.1build1) ...
Setting up libasan6:amd64 (11-20210417-1ubuntu1) ...
Setting up gcc-10-base:amd64 (10.3.0-1ubuntu1) ...
Setting up autotools-dev (20180224.1+nmu1) ...
Setting up libtirpc-dev:amd64 (1.3.1-1build1) ...
Setting up rpcsvc-proto (1.4.2-0ubuntu4) ...
Setting up libquadmath0:amd64 (11-20210417-1ubuntu1) ...
Setting up libmpc3:amd64 (1.2.0-1build1) ...
Setting up libwebp6:amd64 (0.6.1-2) ...
Setting up fonts-dejavu-core (2.37-2build1) ...
Setting up libodbc1:amd64 (2.3.7) ...
Setting up libjpeg-turbo8:amd64 (2.0.6-0ubuntu2) ...
Setting up autoconf (2.69-14) ...
Setting up libubsan1:amd64 (11-20210417-1ubuntu1) ...
Setting up libnsl-dev:amd64 (1.3.0-0ubuntu3) ...
Setting up libcrypt-dev:amd64 (1:4.4.17-1ubuntu3) ...
Setting up libisl23:amd64 (0.23-1build1) ...
Setting up libc-dev-bin (2.33-0ubuntu5) ...
Setting up libcc1-0:amd64 (11-20210417-1ubuntu1) ...
Setting up liblsan0:amd64 (11-20210417-1ubuntu1) ...
Setting up cpp-10 (10.3.0-1ubuntu1) ...
Setting up libitm1:amd64 (11-20210417-1ubuntu1) ...
Setting up libtsan0:amd64 (11-20210417-1ubuntu1) ...
Setting up libjpeg8:amd64 (8c-2ubuntu8) ...
Setting up automake (1:1.16.3-2ubuntu1) ...
update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode
Setting up fontconfig-config (2.13.1-4.2ubuntu3) ...
Setting up libgcc-10-dev:amd64 (10.3.0-1ubuntu1) ...
Setting up libltdl-dev:amd64 (2.4.6-15) ...
Setting up gcc-10 (10.3.0-1ubuntu1) ...
Setting up cpp (4:10.3.0-1ubuntu1) ...
Setting up libc6-dev:amd64 (2.33-0ubuntu5) ...
Setting up libtiff5:amd64 (4.2.0-1build1) ...
Setting up libfontconfig1:amd64 (2.13.1-4.2ubuntu3) ...
Setting up libtool (2.4.6-15) ...
Setting up gcc (4:10.3.0-1ubuntu1) ...
Setting up libgd3:amd64 (2.3.0-2) ...
Setting up libc-devtools (2.33-0ubuntu5) ...
Setting up odbcinst1debian2:amd64 (2.3.7) ...
Setting up odbcinst (2.3.7) ...
Setting up unixodbc (2.3.7) ...
Setting up msodbcsql17 (17.7.2.1-1) ...
Setting up unixodbc-dev (2.3.7) ...
Setting up mssql-tools (17.7.1.1-1) ...
Processing triggers for install-info (6.7.0.dfsg.2-6) ...
Processing triggers for libc-bin (2.33-0ubuntu5) ...
Processing triggers for man-db (2.9.4-2) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

パスを通しておく

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

さっと動作確認する

administrator@ubuntu2104:~$ sudo systemctl status mssql-server
● mssql-server.service - Microsoft SQL Server Database Engine
     Loaded: loaded (/lib/systemd/system/mssql-server.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-04-24 03:58:33 UTC; 27s ago
       Docs: https://docs.microsoft.com/en-us/sql/linux
   Main PID: 3409 (sqlservr)
      Tasks: 128
     Memory: 575.2M
     CGroup: /system.slice/mssql-server.service
             ├─3409 /opt/mssql/bin/sqlservr
             └─3447 /opt/mssql/bin/sqlservr

Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [155B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [84B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [145B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [61B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [96B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [66B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [96B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [100B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [71B blob data]
Apr 23 03:58:38 ubuntu2104 sqlservr[3447]: [124B blob data]
administrator@ubuntu2104:~$ sqlcmd -S localhost -U SA -P Passw0rd1!
1> SELECT Name from sys.Databases
2> go
Name                                                                                                 
--------------------------------------------------------------------------------------------------------------------------------
master                                                                                               
tempdb                                                                                               
model                                                                                                
msdb                                                                                                 

(4 rows affected)