This article is a mirror article of machine translation, please click here to jump to the original article.

View: 46534|Reply: 13

[.NET Core] Centos 7 installation. NET Core SDK tutorial

[Copy link]
Posted on 6/26/2018 11:06:18 PM | | | |
System: Centos 7 64-bit
Official website link:https://www.microsoft.com/net/download/linux
https://www.microsoft.com/net/learn/get-started/linux/centos



Install the .NET Core 2 environment



.NET Core includes. .NET Core Runtime and .NET Core SDK:

.NET Core = The .NET Core Runtime that your app runs dependencies
.NET Core SDK = using . NET Core development application .NET Core Runtime and SDK+CLI (Software Development Kit/Command Line Interface) tools




Test if the installation is successful



.NET Core SDK (reflecting any global.json):
Version:   2.1.301
Commit:    59524873d6

Runtime Environment:
OS Name:     centos
OS Version:  7
OS Platform: Linux
RID:         centos.7-x64
Base Path:   /usr/share/dotnet/sdk/2.1.301/

Host (useful for support):
  Version: 2.1.1
  Commit:  6985b9f684

.NET Core SDKs installed:
  2.1.301 [/usr/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
At this point, the installation is complete!




Previous:vsftpd:500 OOPS: vsftpd: refusing to run with writable root inside chroot (...
Next:New route 3 (newifi) digging digital gold tutorial
Posted on 1/24/2019 10:41:56 AM |
Xiao Zhao posted on 2019-1-24 10:03
Hmm run curl http://127.0.0.1:5000 on the server and try to return the html of the page

The server executes curl on itThe hyperlink login is visible.
Tip Connection refused
Start the investigation
Open port 5000 first Because the system itself has been released now, you need to close the thread running in the background now (after executing the following two commands, the system that has been online will not be accessible), if it is the first release, you do not need to perform this step, the command is as follows, as shown in the figure:
(1):ps -ef | grep core.dll  
(2):kill -9 PID

Perform dotnet core.dll
If the run is successful and accessible, it means that the release is successful, but there is a disadvantage of this, that is, Xshell cannot be closed after publishing, and if it is closed, the default program will be launched, so we can use the following command to directly set it to run in the background
The command is as follows:
nohup dotnet ProgrammersLiveShow.dll &

Finally execute curlhttp://127.0.0.1:5000Successful appearance of helloworld
 Landlord| Posted on 10/30/2022 12:28:43 PM |
CentOS 7 installs the .NET SDK 6 or .NET Runtime

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:


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:


Install the runtime

With the ASP.NET Core runtime, you can run apps that are developed with .NET and don't provide a runtime. The following command will install the ASP.NET Core runtime, which is the most compatible runtime for .NET. In the terminal, run the following command:


The validation command is as follows:



 Landlord| Posted on 9/3/2024 3:29:17 PM |
Install the .NET 8 SDK manually

Posted on 1/23/2019 3:37:46 PM |
I installed it but looked at the "/opt directory does not have /dotnet" directory
When running dotnet xx.dll prompts The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found
I searched for a solution
https://www.cnblogs.com/hobinly/p/6169165.html
Could it be that the installation failed
 Landlord| Posted on 1/23/2019 3:44:02 PM |
Summer Posted on 2019-1-23 15:37
I installed it but looked at the "/opt directory does not have /dotnet" directory
When running dotnet xx.dll prompts The specified framework 'Mic...

execute



Check the installed version, it should be your program version is too low
Posted on 1/23/2019 3:48:05 PM |

After running, the above error is still reported
 Landlord| Posted on 1/23/2019 4:10:52 PM |
Summer Posted on 2019-1-23 15:48
After running, the above error is still reported

Running simply lets you see a list of SDKs installed on your server.

You see if the version your program is running on is in the list.
Posted on 1/23/2019 4:20:27 PM |
Xiao Zhazha Posted on 2019-1-23 16:10
Running simply lets you see a list of SDKs installed on your server.

You see if the version your program is running on is in the list. ...

Run done
Is there a problem with the opt directory?
 Landlord| Posted on 1/23/2019 4:24:06 PM |
Summer Posted on 2019-1-23 16:20
Run done
Is there a problem with the opt directory?

You see what version your dll is, you try to modify it to version 2.1.x, this should be a version incompatibility problem

Your dll version is too low
Posted on 1/24/2019 9:56:23 AM |
Little slag Posted on 2019-1-23 16:24
You see what version your dll is, you try to modify it to version 2.1.x, this should be a version incompatibility problem

Your dll version is too low...

I update all my versions to the latest and is it a success on Linux? It seems to be a version issue
 Landlord| Posted on 1/24/2019 10:03:12 AM |
Summer Posted on 2019-1-24 09:56
I update all my versions to the latest and is it a success on Linux? It seems to be a version issue
...

Hmm execute curl on top of the serverhttp://127.0.0.1:5000  Try to return the html of the page
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com