Install .NET Core on CentOS7
Official reference
Official installation guidelinesInstallation key list
Before installing .NET, run the following command to add the Microsoft package signing key to the list of trusted keys and add the Microsoft package repository.
rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
Install SDK
The .NET SDK enables you to develop applications through .NET. If you install the .NET SDK, you do not need to install the corresponding runtime. To install the .NET SDK, run the following command:
yum install dotnet-sdk-5.0
Install runtime
With the ASP.NET Core runtime, you can run applications developed using .NET without a runtime. The following command will install the ASP.NET Core runtime, which is the most compatible runtime with .NET. In the terminal, run the following command:
sudo yum install aspnetcore-runtime-5.0
As an alternative to the ASP.NET Core runtime, you can install the .NET runtime that does not include ASP.NET Core support. Replace aspnetcore-runtime-5.0 in the previous command with dotnet-runtime-5.0.
yum install dotnet-runtime-5.0