ASP.NET 5 Hosting on Linux

To use .NET 5 on Linux you should have VPS or Dedicated server and to install ASP.NET 5.

Of course we will recommend to use Windows if you want to host ASP.NET 5 applications. There are few options to use ASP.NET 5 hosting on Linux.

Install the .NET Version Manager

Use the .NET Version Manager (DNVM) to install different versions of the .NET Execution Environment (DNX) on Linux. You can use the following commands:
1. “sudo yum install unzip” – to install unzip
2. curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.sh | DNX_BRANCH=dev sh && source ~/.dnx/dnvm/dnvm.sh – to download and install DNVM.

Install the .NET Execution Environment

To install DNX for Mono:
1. Install Mono via the mono-complete package.
2. “dnvm upgrade -r mono” – use DNVM to install DNX for Mono.
By default DNVM will install DNX for Mono if no runtime is specified.

Use Libuv to host ASP.NET 5 applications

Libuv is a multi-platform asynchronous IO library that is used by Kestrel, a cross-platform HTTP server for hosting ASP.NET 5 web applications.
To build it you can use the following commands:
1. sudo yum install automake libtool wget
2. wget http://dist.libuv.org/dist/v1.8.0/libuv-v1.8.0.tar.gz
3. tar -zxf libuv-v1.8.0.tar.gz
4. cd libuv-v1.8.0
5. sudo sh autogen.sh
6. sudo ./configure
7. sudo make
8. sudo make check
9. sudo make install
10. ln -s /usr/lib64/libdl.so.2 /usr/lib64/libdl
11. ln -s /usr/local/lib/libuv.so.1.0.0 /usr/lib64/libuv.so

Now you can use Linux for ASP.NET 5 hosting services.