This installation uses Ubuntu 16.04 LTS

SQL Server Installation

Ref: https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu

wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

sudo apt-get update
sudo apt-get install -y mssql-server

sudo /opt/mssql/bin/mssql-conf setup

systemctl status mssql-server

.NET Core Installation

Ref: https://www.microsoft.com/net/learn/get-started/linux/ubuntu16-04

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'

sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install dotnet-sdk-2.1.101

dotnet --version

ASP.NET Core Application

Ref: https://docs.microsoft.com/en-gb/aspnet/core/tutorials/first-mvc-app-xplat/start-mvc

Ref: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/hosting?tabs=aspnetcore2x

mkdir MvcExample
cd MvcExample

dotnet new mvc --auth Individual
dotnet ef database update

vim Program.cs

WebHost.CreateDefaultBuilder(args)
    .UseUrls("http://0.0.0.0:5000")
    .UseStartup<Startup>()
    .Build();

dotnet run

You can now acces your application from server_ip:5000.

This is only a dev setup. Don’t use this as-is in production.