Skip to content

ASP .NET Core 发布到linux系统

L edited this page Apr 12, 2021 · 2 revisions

安装.net环境

1.使用Snap安装

使用snap install命令安装.NET SDK程序包
使用--channel参数指示要安装的版本。 如果省略此参数,则使用latest/stable。

sudo snap install dotnet-sdk --classic --channel=5.0

使用snap alias命令为系统注册dotnet命令

sudo snap alias dotnet-sdk.dotnet dotnet

Install the .NET SDK or the .NET Runtime with Snap

2.手动安装

Install the .NET SDK or the .NET Runtime manually

上传并发布站点

VS发布站点,目标为Linux平台
压缩文件linux-x64.zip
xshell上传压缩文件
解压

unzip linux-x64.zip

前往下级目录
cd目录相关资料

cd linux-x64   

运行站点

sudo dotnet DotNet5Website.dll
Clone this wiki locally