Join Nate Barbettini for an in-depth discussion in this video Install .NET Core on Linux, part of Deploying ASP.NET Core Applications.
- [Male Narrator] Unlike previous versions of ASP.NET, you can run ASP.NET Core applications directly on Linux. This is a great option for applications that need to run on Linux-heavy infrastructures, like Amazon web services. To get started, you'll need to install the .NET Core runtime packages on your Linux machine. The official .NET Core website, at dot.net/core, includes instructions for many Linux distros. The instructions will vary a little bit by distribution. For this example I'm using Ubuntu 16.04 server.
On Ubuntu, you need to run a couple of commands to add the package sources to apt package list, and then use apt-get to install the package itself. I have the first two commands already loaded, here. The second command adds the keys that you need for apt to connect to the package source correctly. After that's done, you'll need to run apt-get update to make sure apt has all of the latest information from the package sources. And, finally, to install the packages themselves, you can run sudo apt-get install dotnet-dev.
The latest version right now is preview2-003131. Say "yes" to the prompt, and it'll install all the necessary packages and dependencies. Once the install process is complete, we can run dotnet --info to see the installed version. If you see the version output, everything is working fine. Your Linux machine is now ready to host and run an ASP.NET Core application.
- Setting up your ASP.NET project
- Setting up IIS
- Creating an IIS site and app pool
- Publishing your app with Visual Studio or the command line
- Deploying to Azure
- Deploying to Linux
- Deploying with Docker