1. ssh 连接

2. 安装相关依赖

apt-get update
apt-get install curl libunwind8 gettext apt-transport-https

3. 注册受信任的 Microsoft 产品密钥

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

4. 注册产品源

Debian 9 (Stretch):

sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/dotnetdev.list'

Debian 8 (Jessie):

sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-jessie-prod jessie main" > /etc/apt/sources.list.d/dotnetdev.list'

5. 安装 .NET Core

apt-get update
apt-get install dotnet-sdk-2.1

6. 检查是否安装成功

dotnet --version

发表评论