1.使用yum安装
yum install supervisor
2.开机自启动
systemctl enable supervisord.service
3.启动supervisor
systemctl start supervisord
4.导航至相应目录
cd /etc/supervisord.d/
5.新建进程文件
vi App.ini
6.修改进程文件配置如下:
[program:App]
command=dotnet App.dll #执行的命令
directory=/usr/hbs7/linux-x64 #项目存放的目录 HBS7.Web.dll 要放在这里
autostart = true
autorestart=true
user=root
stopsignal=INT
7.创建supervisor.sock 1
sudo touch /var/run/supervisor/supervisor.sock
8.创建supervisor.sock 2
sudo chmod 777 /var/run/supervisor/supervisor.sock
9.unlink /var/run/supervisor/supervisor.sock
10.sudo supervisord -c /etc/supervisord.conf