Eva*_*oll 4 sql-server linux ubuntu
尝试在 Ubuntu 18.04 上安装 SQL Server,我得到
# sudo apt-get install -y mssql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mssql-server : Depends: libcurl3 but it is not going to be installed
Depends: openssl (<= 1.1.0)
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
是否可以在 Ubuntu 18.04 上安装 SQL Server 并且是否受支持?
不,Microsoft 仅支持 16.04 LTS。两年前的版本。
无论是新的还是旧的,为了在 Ubuntu 上安装 SQL Server,我建议将其安装为chroot。为此,请先安装debchroot
,然后使用该实用程序设置 chroot。
sudo apt install debchroot
sudo debootstrap --arch=amd64 xenial /opt/mschroot http://archive.ubuntu.com/ubuntu/
Run Code Online (Sandbox Code Playgroud)
sudo mount --bind /proc /opt/mschroot/proc
Run Code Online (Sandbox Code Playgroud)
现在跳入你的 chroot
sudo chroot /opt/mschroot
Run Code Online (Sandbox Code Playgroud)
并着手配置它,
apt update
## Add the Universe Repository (needed https://dba.stackexchange.com/q/212868/2639)
apt install wget software-properties-common apt-transport-https
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
apt update
## Add Microsoft Repository
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"
apt update
## Configuration complete begin install
apt install -y mssql-server
Run Code Online (Sandbox Code Playgroud)
然后配置它,(使用2
开发人员选项)
/opt/mssql/bin/mssql-conf setup
Run Code Online (Sandbox Code Playgroud)
您必须选择一个密码,注意不明原因密码必须至少有 8 个字符长,并且包含以下四组中的三组字符:大写字母、小写字母、基数为 10 的数字和符号..我建议大家使用MICROSOFTsucksH4RD
,因为它满足。最后,不要忘记禁用间谍软件。
/opt/mssql/bin/mssql-conf set telemetry.customerfeedback false
Run Code Online (Sandbox Code Playgroud)