CentOS7 deploys .net core project

First of all, you need a CentOS server, either a cloud server or a virtual machine. Then download the .net core sdk. The specific version needs to be determined according to the project. Of course, multiple versions of the sdk can also be installed. The installation command is as follows.
First you need to add the Microsoft package signing key to the trusted keys list and add the Microsoft package repository

sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm

Then you can install the sdk.

sudo yum install dotnet-sdk-5.0

insert image description hereAfter downloading, you can use the following command to view the installed version.

dotnet --version

insert image description here
Then publish the local project and transfer the published file to the server, as shown in the figure below.
insert image description here
Then enter the current directory of the project and execute the command to start the dotnet core project.

dotnet  NewNet5APP.dll

insert image description here
It can be seen that the project has been started.
For other information, please refer to the official website of Microsoft: https://docs.microsoft.com/zh-cn/dotnet/core/install/linux-centos

Guess you like

Origin blog.csdn.net/u012869793/article/details/112005375