CentOS7 installation of a simple way to dotnet sdk 2.1.401

1. Download linux version of tar package

Path:

https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-2.1.401-linux-x64-binaries

Note I installed it rhel 8.0 has been found with the dotnet sdk. . But not the same need to uninstall version

rpm -qa | grep dotnet | xargs rpm -e

 

2. Use a tool like xftp uploaded to a path.

Such as uploading this to the next / dotnetsdk directory

3. Unzip in the current directory

tar -zxvf dotnet-sdk-2.1.401-linux-x64.tar.gz

 

 4. Then create an environment variable

. vim /etc/profile.d/dotnetsdk SH 

additional line of text 

Export the PATH = $ the PATH: / dotnetsdk / 

the environment variables to take effect 

Source /etc/profile.d/dotnetsdk. SH

5. Use the test command

dotnet --version

The results are:

[root@RHEL8 dotnetsdk]# dotnet --version
2.1.401
[root@RHEL8 dotnetsdk]#

 

Guess you like

Origin www.cnblogs.com/jiangjian123/p/11416740.html