|
|
Posted on 2021-9-21 15:11:19
|
|
|
|

Since the project was previously developed using ASP.NET Core 2.0, Microsoft is no longer maintaining and supporting the 2.0 version of .NET Core, and the project has been upgraded to version 3.1. Introduce:The hyperlink login is visible. Review:
How do I install the ASP.NET Core 3.1 runtime environment on CentOS 7?
Add a Microsoft source
Before you install .NET, run the following command to add the Microsoft package signing key to the trusted key list and add the Microsoft package repository. Open Terminal and run the following command:
Since I have already installed it before, I can see the microsoft-prod.repo file under the /etc/yum.repos.d/ directory, as follows:
name=packages-microsoft-com-prod baseurl=https://packages.microsoft.com/rhel/7/prod/ enabled=1 gpgcheck=1 gpgkey=https://packages.microsoft.com/keys/microsoft.asc
Install the SDK
The .NET SDK enables you to develop apps through .NET. If you install the .NET SDK, you don't need to install the corresponding runtime. To install the .NET SDK, run the following command:
dotnet-sdk-3.1 will include the following dependencies:
aspnetcore-runtime-3.1.x86_64 0:3.1.19-1 aspnetcore-targeting-pack-3.1.x86_64 0:3.1.10-1 dotnet-apphost-pack-3.1.x86_64 0:3.1.19-1 dotnet-hostfxr-3.1.x86_64 0:3.1.19-1 dotnet-runtime-3.1.x86_64 0:3.1.19-1 dotnet-runtime-deps-3.1.x86_64 0:3.1.19-1 dotnet-targeting-pack-3.1.x86_64 0:3.1.0-1 netstandard-targeting-pack-2.1.x86_64 0:2.1.0-1 In factIf the server only deploys ASP.NET Core applications, it does not need to install the SDK, but only the runtime, taking aspnetcore-runtime-3.1 as an example, the command is as follows:
Release and deployment
Package asp.net Core 3.1 as a release version, upload it to the server, and start it with the following command:
Using curl to access the interface test, since my default page is the input ok string, the test works, as shown in the figure below:
(End)
|
Previous:Windows uses cwRsync (Rsync) to synchronize two disk filesNext:Under CentOS 7, Kafka often hangs up solutions
|