发布.netcore项目到linux
安装 .NET SDK 或 .NET 运行
根据微软官方文档,安装对应系统对应.net版本的运行时https://docs.microsoft.com/zh-cn/dotnet/core/install/linux-centos
部署文件到对应目录,使用命令启用服务
1 | dotnet XXXXXX.Admin.dll --urls "http://localhost:5000" |
Nginx设置反代
- 方式一:宝塔中设置反向代理,目标URL填写http://localhost:5000即可,发送域名www.****.com
- 方式二:直接修改配置文件
使用 Supervisor 守护进程
用户建议选择www,不要使用root。 其他程序的话,可以选择对应新建的用户
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment