supervisor
复制代码
1
2Centos 7 版本安装
安装
复制代码
1
2
3
4
5
6
7
8# 添加epel源 wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum clean all yum makecache # 安装 yum install supervisor -y
配置
复制代码
1
2
3
4
5
6# 默认配置文件 /etc/supervisord.conf # 打开后看最后行,指定自己要启动服务的配置文件路径 [include] files = supervisord.d/*.ini
添加自己的服务
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13# cat dotnet.ini [program:dotnet] command=/data/dotnet/dotnet ApiDoc.Server.dll directory=/usr/swagger autorestart=true stderr_logfile=/usr/swagger/DotNetCoreWeb.err.log stdout_logfile=/usr/swagger/DotNetCoreWeb.out.log environment=ASPNETCORE_ENVIRONMENT=Production user=root stopsignal=INT startsecs=1
参数解释:
program 服务名
command 调用的服务要写绝对路径。
报错处理:
can’t find command ‘dotnet’
command 里面写绝对路径即可。
最后
以上就是虚拟春天最近收集整理的关于supervisor 后台启动服务supervisor的全部内容,更多相关supervisor内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复