Supervisor

阅读更多
Supervisor

Long time ago, I tried to install and run supervisor on my MAC.

> git clone https://github.com/Supervisor/supervisor

> python -V
Python 2.7.10


> cd supervisor
> sudo python ./setup.py install

> sudo mkdir -p /var/log/supervisord

Set Up the Configuration
> cat /etc/supervisord.conf
[unix_http_server]
file = /var/run/supervisord.sock
chmod = 0777
#chown= root:root
[inet_http_server]
# Web管理界面设定
port=9001
username=admin
password=admin
[supervisorctl]
; 必须和'unix_http_server'里面的设定匹配 serverurl=unix:///var/run/supervisord.sock
;serverurl=http://127.0.0.1:9001
;username=admin
;password=admin
[supervisord]
logfile=/var/log/supervisord/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB       ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10          ; (num of main logfile rotation backups;default 10)
loglevel=info               ; (log level;default info; others: debug,warn,trace)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true              ; (start in foreground if true;default false)
minfds=1024                 ; (min. avail startup file descriptors;default 1024)
minprocs=200                ; (min. avail process descriptors;default 200)
user=root                 ; (default is current user, required if root)
childlogdir=/var/log/supervisord/            ; ('AUTO' child log dir, default $TEMP)

Start the server
> sudo supervisord
/Library/Python/2.7/site-packages/supervisor-4.0.0.dev0-py2.7.egg/supervisor/options.py:471: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2018-11-29 17:25:39,460 INFO Set uid to user 0 succeeded
2018-11-29 17:25:39,460 INFO Increased RLIMIT_NOFILE limit to 1024
2018-11-29 17:25:39,520 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2018-11-29 17:25:39,521 INFO supervisord started with pid 88164

Then we can visit the page
http://localhost:9001/

References:
http://supervisord.org/
http://sillycat.iteye.com/blog/2070161





你可能感兴趣的:(Supervisor)