方法
意外と面倒臭かったためメモ
[root@ip-172-32-0-221 ec2-user]# easy_install supervisor
Searching for supervisor
Best match: supervisor 3.1.3
Processing supervisor-3.1.3-py2.6.egg
supervisor 3.1.3 is already the active version in easy-install.pth
Installing echo_supervisord_conf script to /usr/local/bin
Installing pidproxy script to /usr/local/bin
Installing supervisorctl script to /usr/local/bin
Installing supervisord script to /usr/local/bin
Using /usr/local/lib/python2.6/site-packages/supervisor-3.1.3-py2.6.egg
Processing dependencies for supervisor
Finished processing dependencies for supervisor
[root@ip-172-32-0-221 ec2-user]# /usr/local/bin/supervisord -v
3.1.3
[root@ip-172-32-0-221 ec2-user]# mkdir /etc/supervisor
[root@ip-172-32-0-221 ec2-user]# /usr/local/bin/echo_supervisord_conf > /etc/supervisor/supervisord.conf
[root@ip-172-32-0-221 ec2-user]# vi /etc/init.d/supervisord
#!/bin/sh
#
# /etc/rc.d/init.d/supervisord
#
# Supervisor is a client/server system that
# allows its users to monitor and control a
# number of processes on UNIX-like operating
# systems.
#
# chkconfig: - 64 36
# description: Supervisor Server
# processname: supervisord
# Source init functions
. /etc/init.d/functions
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
RETVAL=0
prog="supervisord"
pidfile="/tmp/supervisord.pid"
lockfile="/var/lock/subsys/supervisord"
configfile="/etc/supervisor/supervisord.conf"
start()
{
echo -n $"Starting $prog: "
daemon --pidfile $pidfile supervisord -c $configfile
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch ${lockfile}
}
stop()
{
echo -n $"Shutting down $prog: "
killproc -p ${pidfile} /usr/bin/supervisord
RETVAL=$?
echo
if [ $RETVAL -eq 0 ] ; then
rm -f ${lockfile} ${pidfile}
fi
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
;;
esac
[root@ip-172-32-0-221 ec2-user]# chmod +x /etc/init.d/supervisord
[root@ip-172-32-0-221 ec2-user]# /etc/init.d/supervisord start
supervisord を起動中: /usr/local/lib/python2.6/site-packages/supervisor-3.1.3-py2.6.egg/supervisor/options.py:383: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
return pkg_resources.EntryPoint.parse("x="+spec).load(False)
[ OK ]
[root@ip-172-32-0-221 ec2-user]# ps afx
...
26298 ? Ss 0:00 /usr/bin/python2.6 /usr/local/bin/supervisord -c /etc/supervisor/supervisord.conf
[root@ip-172-32-0-221 ec2-user]# chkconfig --add supervisord
[root@ip-172-32-0-221 ec2-user]# chkconfig --list supervisord
supervisord 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@ip-172-32-0-221 ec2-user]# chkconfig supervisord on
[root@ip-172-32-0-221 ec2-user]# chkconfig --list supervisord
supervisord 0:off 1:off 2:on 3:on 4:on 5:on 6:off
参考URL
Fluentd UI(公式サイト)
http://docs.fluentd.org/articles/fluentd-ui
INSTALLING SUPERVISOR ON AMAZON EC2
http://mysteryos.net/installing-supervisor-amazon-ec2/
Supervisord を Amazon Linux AMI にインストール
http://d.hatena.ne.jp/massat/20111013/1318484253