centos 7 mounted netcore sdk

Yum install Microsoft's official website:

Open linux terminal program

 

netcore sdk address https://dotnet.microsoft.com/download/linux-package-manager/centos/sdk-current

 

Select Linux distributions

Before installing .NET, you need to register Microsoft key, register the product repository and install the required dependencies. Each machine only once. Open a terminal and run the following command:

 

Sudo rpm Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

 

After machining, and then install the .NET SDK. In the terminal, run the following command:

sudo yum update

sudo yum install dotnet-sdk-2.2

 

 

 

Install .NET Core Runtime on Linux CentOS / Oracle - x64

Add the dotnet product feed

Sudo rpm Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

 

Install the .NET Runtime

sudo yum update

sudo yum install aspnetcore-runtime-2.2

 

Verify that the installation was successful

dotnet --version

 

 

Installation Manual

 

3.2.1 Offline installation method for tar.gz

 

https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-2.2.203-linux-arm64-binaries

 

Create a directory: mkdir -p $ HOME / dotnet 

 

Upload file: dotnet-sdk-2.2.203-linux-x64.tar.gz file $ HOME / dotnet directory in

 

cd $HOME/dotnet

 

To extract the directory: tar zxf dotnet-sdk-2.2.203-linux-x64.tar.gz -C $ HOME / dotnet

 

export DOTNET_ROOT=$HOME/dotnet 

 

export PATH=$PATH:$HOME/dotnet

 

Note that the current environment variable settings affect only the current session terminal. So we need to create a soft link way to set environment variables. Methods as below:

 

1, su to root.

 

2, create a soft link execution: ln -s $ HOME / dotnet / dotnet / usr / local / bin

Guess you like

Origin www.cnblogs.com/liaokui/p/11277424.html