為 Debian 8 或 Debian 9(64 位元)安裝 .NET Core

來源:互聯網
上載者:User

為 Debian 8 或 Debian 9(64 位元)安裝 .NET Core

在 Debian 8 或 Debian 9(64 位元)上安裝 .NET Core 的具體步驟:

備忘:必須有使用者控制目錄,才能通過 tar.gz 在 Linux 系統上進行安裝。

1.準備一台剛安裝的Debian 9系統,在遠程用戶端上安裝XShell,進行遠端連線Debian

輸入:ssh Debian的外網ip地址,輸入使用者名稱和密碼登入

2.安裝系統組件。

$sudo apt-get update

$sudo apt-get install curl libunwind8 gettext apt-transport-https

3.註冊受信任的 Microsoft 產品金鑰

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg

$sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

4.註冊 Microsoft 產品源。

Debian 9 (Stretch):

$sudo 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):

$sudo 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 SDK。

$sudo apt-get update

$sudo apt-get install dotnet-sdk-2.0.0

6.將 dotnet 添加到 PATH。

export PATH=$PATH:$HOME/dotnet

7.檢查是否安裝成功。

dotnet --version

本文永久更新連結地址:https://www.bkjia.com/Linux/2018-03/151468.htm

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.