安装
yum install supervisor
设置开机启动
systemctl enable supervisord
启动supervisord
systemctl start supervisord
配置java进程
[program:monitorapi]
command=java -jar monitorapi.jar --spring.profiles.active=pro
directory=/www/wwwroot/monitorapi
user=root
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
redirect_stderr=true
startsecs=0
stdout_logfile_maxbytes=200MB
stdout_logfile_backups=10
stdout_logfile =/var/log/supervisor/monitorapi-supervisor.log
java要写全路径,不然报命令找不到的错
更新配置
supervisorctl update
标签:supervisor,supervisord,stdout,monitorapi,进程,java,true
From: https://www.cnblogs.com/wujf/p/16889201.html