1, registration keys Microsoft
sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm
2, yum update update packages
yum update
3, run-time download aspnetcore
yum install aspnetcore-runtime-2.1 (2.1是版本号)
4, download aspnetcore sdk
yum install dotnet-sdk-2.1
5, upload files via FTP site
6, cd to the directory entry .dll execution site run by dotnet start site, or dotnet dll absolute path as shown below
This time you thought ok it? It does not work, because the default can only be accessed inside the unit, through external IP is not open, can be achieved by configuring Nginx. You can also modify the Program.cs.
FIG Program.cs modified as follows