Detailed steps of deploying. Net core environment under Linux

Time:2021-10-19

be careful:The environment for installing. Net core on Linux requires a 64 bit system

The installation deployment is as follows:

1. Add dotnet source to apt get

Ubuntu 14.04 / Linux Mint 17


sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update

Ubuntu 16.04


sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update

Ubuntu 16.10


sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ yakkety main" > /etc/apt/sources.list.d/dotnetdev.list'
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893
sudo apt-get update

2. Installing the. Net core SDK

The address of the latest version of SDK is as follows:

Official address:https://www.microsoft.com/net/download/linux

Local download:https://www.jb51.net/softs/472366.html


sudo apt-get install dotnet-dev-1.0.1

3. Generate sample code

After installing the SDK, a sample code is generated to check whether the installation is successful


dotnet new console -o hwapp
cd hwapp

4. Execute the sample code to view the results


dotnet restore
dotnet run

If you see the familiar “Hello world” after execution, it means that you have successfully installed it.

The above is the installation steps. The deployment and operation will be introduced in the subsequent blog.

summary

The above is the whole content of this article. I hope the content of this article can bring some help to you or using Java. If you have any questions, you can leave a message. Thank you for your support for developpaer.