https://www.microsoft.com/net/core#linuxcentos
Install for CentOS 7.1 (64 bit) & Oracle Linux 7.1 (64 bit)
-
1
Install .NET Core SDK
Before you start,please remove any prevIoUs versions of .NET Core from your system.
In order to install .NET Core 1.1 on CentOS or Oracle Linux,first you need to get the prerequisites and then you download the .NET Core SDK binaries,extract them onto your system and put
dotnet
onto your PATH.For other releases you can check theLinux downloadssection.
- sudo yum install libunwind libicu
- curl -sSL -o dotnet.tar.gz https://go.microsoft.com/fwlink/?linkid=848821
- sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet.tar.gz -C /opt/dotnet
- sudo ln -s /opt/dotnet/dotnet /usr/local/bin
-
2
Initialize some code
Let's initialize a sample Hello World application!
- dotnet new console -o hwapp
- cd hwapp
-
3
Run the app
The first command will restore the packages specified in the project file,and the second command will run the actual sample:
- dotnet restore
- dotnet run