gated0

为centos与debian安装.NET Core
centos用ssh软件连接主机,以root用户登录。#导入源 rpm -Uvh https://packages...
扫描右侧二维码阅读全文
28
2019/08

为centos与debian安装.NET Core

centos

用ssh软件连接主机,以root用户登录。

#导入源
rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
#安装
yum update
yum install dotnet-sdk-2.1
#检测是否安装成功
dotnet --version

debian

用ssh软件连接主机,以root用户登录,或者使用sudo本文以root用户做演示。

#注册受信任的 Microsoft 产品密钥
apt -y install wget
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/

wget -q https://packages.microsoft.com/config/debian/8/prod.list    #debian8
wget -q https://packages.microsoft.com/config/debian/9/prod.list    #debian9

mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg
chown root:root /etc/apt/sources.list.d/microsoft-prod.list
#安装组件和.NET Core
apt-get install apt-transport-https
apt-get update
apt-get install dotnet-sdk-2.1
#查看是否安装成功
dotnet --version

宝塔服务器面板,一键全能部署及管理,送你3188元礼包,点我领取
Last modification:August 28th, 2019 at 07:31 pm
如果觉得我很可爱,请随意赞赏

Leave a Comment