supervisor

2023-08-03  本文已影响0人  jojo1313

centos7.x

yum install epel-release
yum install supervisor -y

vim /etc/supervisord.d/lvs-metrics.ini
[program:lvs-metrics]
command=/home/go/src/lvs-metrics-master/lvs-metrics -c /home/go/src/lvs-metrics-master/cfg.json 
directory=/home/go/src/lvs-metrics-master
user=anzhuu 
autostart=true
autorestart=true
stderr_logfile=/var/log/lvs-metrics.err.log 
stdout_logfile=/var/log/lvs-metrics.out.log

Unit not found ...

systemctl list-unit-files --type=service 看服务列表有没有这个服务
systemctl enable supervisord #改disable为enable

systemctl stop/start supervisord.service

systemctl status supervisord

centos6

/usr/local/python3/bin/pip install supervisor
mkdir -p /etc/supervisord.d
mkdir -p /etc/supervisor
vim /etc/supervisord.d/lvs-metrics.ini
/usr/local/python3/bin/echo_supervisord_conf > /etc/supervisor/supervisord.conf
ln -s /usr/local/python3/bin/supervisord /usr/bin/supervisord
ln -s /usr/local/python3/bin/supervisorctl /usr/bin/supervisorctl
supervisord -c /etc/supervisor/supervisord.conf && supervisorctl -c /etc/supervisor/supervisord.conf
上一篇下一篇

猜你喜欢

热点阅读