心酸

centos7 设置.net core开机自启动服务

电脑版发表于:2021/4/28 18:23

前言

欢迎使用tnblog注意使用模板的时候选择保留原有内容哦,不然会不小心替换你的已经写好的内容哦。


我希望有个如你一般的人

我希望有个如你一般的人,如山间清爽的风,如古城温暖的光,从清晨到夜晚,从山野到书房,只要最后是你,就好。我爱你(?′?‵?)I L???????

1、创建testApp.service,进行编辑

vim  /etc/systemd/system/testApp.service 

也可以直接通过工具WinSCP 直接暴力操作

2、写入如下内容
  WorkingDirectory 填写的文件地址
  ExecStart 找到你的dotnet 环境路径 跟上执行的.dll 文件就ok
   

      2、设置开机自动启动testApp.service服务

      
       systemctl enable testApp.service

3、开启服务,并查询状态

       systemctl start testApp.service

       systemctl status testApp.service

    

关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢