【简单开始】Linux(以ubuntu为例)下使用supervisor

下载安装

>sudo apt install supervisor

配置文件

>cat /etc/supervisor/superviord.conf

以下为配置文件一部分内容:
在这里插入图片描述
inet_http_server:通过http接口查看supervisorctl管理的项目的详情
在这里插入图片描述

在conf.d/目录下创建项目配置文件

>sudo vim /etc/supervisor/conf.d/myconf.conf

[program:myProject]
command=/home/user/location/binfile

更新配置文件

>sudo supervisorctl update

启动项目

#方法一:重新启动配置中的某个程序
>supervisorctl reload
#方法二:启动某个项目
>supervisorctl start myProjetc
#方法三:重启项目
>supervisorctl restart myProjetc

猜你喜欢

转载自blog.csdn.net/dai815904261/article/details/87932448