Centos+Nginx+NetCore3.1部署
1 先將vs2019升級到,16.4.0版本
2.新建一.netcore3.1的web程序
3.編譯后將項目上傳到centos服務器
4.配置nginx文件
修改完后重新加載ngxin. service nginx restart
5.安裝守護進程確保程序異常中斷后能正常重啟
在 etc/systemd/system下新建 netcore.service,內容如下
保存文件后執行
systemctl enable netcore.service
systemctl start netcore.service
查看狀態:systemctl status netcore.service
此時如果kill掉netcore進程,過幾秒后可以看到應用又自動重啟了