0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS 8 で supervisord を使う

Last updated at Posted at 2019-11-06

インストール

インストール
yum install -y epel-release

yum install -y supervisor.noarch

supervisordの設定修正

docker上で利用する場合、以下修正が必要。

/etc/supervisord.conf
  [unix_http_server]
+ file=/var/tmp/supervisor.sock
  
+ [inet_http_server]
+ port=0.0.0.0:9001
+ username=user
+ password=123
  
  [supervisord]
  logfile=/var/log/supervisor/supervisord.log
  logfile_maxbytes=50MB
  logfile_backups=10
  loglevel=info
  pidfile=/run/supervisord.pid
+ nodaemon=true
  minfds=1024
  minprocs=200
  
  [rpcinterface:supervisor]
  supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
  
  [supervisorctl]
  serverurl=unix:///run/supervisor/supervisor.sock
  
  [include]
  files = supervisord.d/*.ini

起動

supervisord -c /etc/supervisord.conf

自動起動したいプログラムの記述

httpd
yum install -y httpd
/etc/supervisord.d/httpd.ini
[program:httpd]
command=/usr/sbin/httpd -D FOREGROUND

supervisord の ステータス画面

プロセスの落とし上げがこちらから可能。http://localhost:9001

スクリーンショット_2019-11-06_09-46-32.png

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?