How to run in linux server?
Take the Ubuntu 21.10 operating system as an example:
- Install Ubuntu 21.10 operating system, go to the website to download:https://ubuntu.com/download
Open the "Terminal" program.
Before installing .NET, run the following commands to add the Microsoft package signing key to the list of trusted keys and add the package repository. Enter the following command:
wget https://packages.microsoft.com/config/ubuntu/21.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb
Install the .NET Runtime runtime. Enter the following command:
sudo apt-get update; \ sudo apt-get install -y apt-transport-https && \ sudo apt-get update && \ sudo apt-get install -y aspnetcore-runtime-5.0
Verify that the .Net Core runtime environment is successfully installed
Enter "dotnet", and the following information is displayed, indicating that the installation is successful.
Copy the sample program to the system, and enter the following command to run the sample program.