Linux deployment .NetCore site

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
0777af1daf056bd91e58654b8625b594.png

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
c67a03aebf3b50bf74960cff953f7a0a.png

Guess you like

Origin www.cnblogs.com/hunanzp/p/12275293.html