Agregar  Microsoft package repository

Ubuntu 18.04

wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

sudo dpkg -i packages-microsoft-prod.deb

sudo apt-get update

sudo apt-get install -y dotnet-sdk-7.0

 

sudo nano /etc/systemd/system/kestrel-helloapp.service

/////////

[Unit]
Description=Example .NET Web API App running on Linux

[Service]
WorkingDirectory=/root/publish
ExecStart=/usr/bin/dotnet /root/publish/AppOwnsData.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
User=root #cambiar al usuario propietario de la carpeta de instalacion
#Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target

/////

systemctl daemon-reload #Reiniciar systemctl

sudo systemctl start kestrel-helloapp.service

 

 

Errores comunes:

CHDIR

ICU