手机app开发网站模板下载,百度seo公司电话,网站建设文献文档,大型美容网站建设文章目录 创建服务启用服务启动 重启服务查看服务状态问题排查 创建服务
将服务文件上传到 /home/mes/api-mes-dev, 其他服务修改对应的目录在 /usr/lib/systemd/system/ 创建 mesapi-dev.service, 其他服务修改对应文件名
[Unit]
Descriptionmesapi-dev service[Servi… 文章目录 创建服务启用服务启动 重启服务查看服务状态问题排查 创建服务
将服务文件上传到 /home/mes/api-mes-dev, 其他服务修改对应的目录在 /usr/lib/systemd/system/ 创建 mesapi-dev.service, 其他服务修改对应文件名
[Unit]
Descriptionmesapi-dev service[Service]
WorkingDirectory/home/mes/api-mes-dev
ExecStart/usr/bin/dotnet /home/mes/api-mes-dev/WebApi.dll --urls http://*:10300
Restartalways
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec10
KillSignalSIGINT
SyslogIdentifiermesapi-dev
Userroot
# Development开发环境Production生产环境
EnvironmentASPNETCORE_ENVIRONMENTProduction
EnvironmentDOTNET_PRINT_TELEMETRY_MESSAGEfalse[Install]
WantedBymulti-user.target
启用服务
systemctl enable mesapi.service启动 重启服务
systemctl start mesapi.service
systemctl restart mesapi.service查看服务状态
// 查看服务状态
systemctl status mesapi.service// 查看端口占用
netstat -tnpl|grep 10300
问题排查
// 直接使用命令启动/usr/bin/dotnet /home/mes/api-mes-dev/JZ.IMS.WebApi.dll --urls http://*:10300访问: http://xxxxxx:10300 查看swagger