asp.net core 部署在ubuntu

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/csharp25/article/details/81089744

检查 ubuntu版本:

lsb_release -a

安装 .Net Core SDK

注册 Microsoft key and feed:

wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

安装 .net sdk on ubuntu:

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

安装 运行时

sudo apt-get install dotnet-hosting-2.0.9


部署项目工程到 ubuntu. 

dotnet publish yourWeb.csprj -o hello
cd hello
dotnet yourWeb.dll

完成:
http://localhost:5000/

猜你喜欢

转载自blog.csdn.net/csharp25/article/details/81089744