1、导入rpm源
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
2、更新软件包
sudo yum -y update
3、安装SDK
安装命令
sudo yum -y install dotnet-sdk-{version}
示例:
sudo yum -y install dotnet-sdk-2.1
sudo yum -y install dotnet-sdk-3.0
sudo yum -y install dotnet-sdk-3.1
4、校验是否安装成功
dotnet --version
dotnet --list-sdks