-
netcore 2.2 sdk 安装
-
注意事项:鉴于服务器不能连接外网,只能通过现将安装包下载到本地电脑,再通过xftp 工具上传
-
官方下载页面:Download .NET Core 2.2 (Linux, macOS, and Windows) (microsoft.com)
-
通过xftp工具传到 /home/data/backup 目录下
-
创建加压目录: mkdir /usr/local/dotnet(如果该目录不存在,或者没安装过其它sdk)
-
解压sdk包:tar -zxvf dotnet-sdk-2.2.401-linux-x64.tar.gz -C /usr/local/dotnet
-
设置环境变量 vim /etc/profile
-
export DOTNET_ROOT=/usr/local/dotnet
export PATH=$DOTNET_ROOT:$PATH -
输入dotnet --info 如果出现一下内容说明已安装完成了
.NET Core SDK (reflecting any global.json):
Version: 2.2.401
Commit: 729b316c13
Runtime Environment:
OS Name: openEuler
OS Version: 22.03
OS Platform: Linux
RID: linux-x64
Base Path: /usr/local/dotnet/sdk/2.2.401/
Host (useful for support):
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
2.2.401 [/usr/local/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [/usr/local/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [/usr/local/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [/usr/local/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download