Install. NET Core in CentOS 7
1. Install. Net Core SDK
Before starting, remove all previous. net core versions from the system.
To install. Net Core in CentOS or Oracle Linux:
First, prepare the prerequisites.
sudo yum install libunwind libicu
Download the. net Core SDK binary file
curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?LinkID=809131
Decompress these files to the system.
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
Add dotnet to PATH environment variable.
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
2. Initialization code
InitializeHello WorldApplication example!
mkdir hwappcd hwappdotnet new
3. Run the program
The first line of command will be based onproject.jsonRestore the specified package file. The second line of command actually starts the program:
dotnet restoredotnet run
Ready!
You have used. NET core to run on your machine! You can create an ASP. NET Core website or visit. NET Core on GitHub to obtain more examples. Browse the. NET document to learn