{"id":1931,"date":"2015-07-04T15:44:21","date_gmt":"2015-07-04T06:44:21","guid":{"rendered":"http:\/\/tech.akat.info\/?p=1931"},"modified":"2015-07-04T15:53:32","modified_gmt":"2015-07-04T06:53:32","slug":"supervisord-amazon-linux","status":"publish","type":"post","link":"https:\/\/tech.akat.info\/?p=1931","title":{"rendered":"Supervisord + Amazon Linux"},"content":{"rendered":"<h1>\u65b9\u6cd5<\/h1>\n<p>\u610f\u5916\u3068\u9762\u5012\u81ed\u304b\u3063\u305f\u305f\u3081\u30e1\u30e2<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# easy_install supervisor\r\nSearching for supervisor\r\nBest match: supervisor 3.1.3\r\nProcessing supervisor-3.1.3-py2.6.egg\r\nsupervisor 3.1.3 is already the active version in easy-install.pth\r\nInstalling echo_supervisord_conf script to \/usr\/local\/bin\r\nInstalling pidproxy script to \/usr\/local\/bin\r\nInstalling supervisorctl script to \/usr\/local\/bin\r\nInstalling supervisord script to \/usr\/local\/bin\r\n\r\nUsing \/usr\/local\/lib\/python2.6\/site-packages\/supervisor-3.1.3-py2.6.egg\r\nProcessing dependencies for supervisor\r\nFinished processing dependencies for supervisor\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# \/usr\/local\/bin\/supervisord -v\r\n3.1.3\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# mkdir \/etc\/supervisor\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# \/usr\/local\/bin\/echo_supervisord_conf &gt; \/etc\/supervisor\/supervisord.conf\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# vi \/etc\/init.d\/supervisord\r\n#!\/bin\/sh\r\n#\r\n# \/etc\/rc.d\/init.d\/supervisord\r\n#\r\n# Supervisor is a client\/server system that\r\n# allows its users to monitor and control a\r\n# number of processes on UNIX-like operating\r\n# systems.\r\n#\r\n# chkconfig: - 64 36\r\n# description: Supervisor Server\r\n# processname: supervisord\r\n\r\n# Source init functions\r\n. \/etc\/init.d\/functions\r\n\r\nPATH=\/usr\/local\/sbin:\/usr\/local\/bin:\/sbin:\/bin:\/usr\/sbin:\/usr\/bin\r\nRETVAL=0\r\nprog=&quot;supervisord&quot;\r\npidfile=&quot;\/tmp\/supervisord.pid&quot;\r\nlockfile=&quot;\/var\/lock\/subsys\/supervisord&quot;\r\nconfigfile=&quot;\/etc\/supervisor\/supervisord.conf&quot;\r\n\r\nstart()\r\n{\r\n        echo -n $&quot;Starting $prog: &quot;\r\n        daemon --pidfile $pidfile supervisord -c $configfile\r\n        RETVAL=$?\r\n        echo\r\n        &#x5B; $RETVAL -eq 0 ] &amp;&amp; touch ${lockfile}\r\n}\r\n\r\nstop()\r\n{\r\n        echo -n $&quot;Shutting down $prog: &quot;\r\n        killproc -p ${pidfile} \/usr\/bin\/supervisord\r\n        RETVAL=$?\r\n        echo\r\n        if &#x5B; $RETVAL -eq 0 ] ; then\r\n                rm -f ${lockfile} ${pidfile}\r\n        fi\r\n}\r\n\r\ncase &quot;$1&quot; in\r\n\r\n  start)\r\n    start\r\n  ;;\r\n\r\n  stop)\r\n    stop\r\n  ;;\r\n\r\n  status)\r\n        status $prog\r\n  ;;\r\n\r\n  restart)\r\n    stop\r\n    start\r\n  ;;\r\n\r\n  *)\r\n    echo &quot;Usage: $0 {start|stop|restart|status}&quot;\r\n  ;;\r\n\r\nesac\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# chmod +x \/etc\/init.d\/supervisord\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# \/etc\/init.d\/supervisord start\r\nsupervisord \u3092\u8d77\u52d5\u4e2d: \/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.\r\n  return pkg_resources.EntryPoint.parse(&quot;x=&quot;+spec).load(False)\r\n                                                           &#x5B;  OK  ]\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# ps afx\r\n...\r\n26298 ?        Ss     0:00 \/usr\/bin\/python2.6 \/usr\/local\/bin\/supervisord -c \/etc\/supervisor\/supervisord.conf\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# chkconfig --add supervisord\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# chkconfig --list supervisord\r\nsupervisord     0:off   1:off   2:off   3:off   4:off   5:off   6:off\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# chkconfig supervisord on\r\n\r\n&#x5B;root@ip-172-32-0-221 ec2-user]# chkconfig --list supervisord\r\nsupervisord     0:off   1:off   2:on    3:on    4:on    5:on    6:off\r\n\r\n<\/pre>\n<h1>\u53c2\u8003URL<\/h1>\n<p>Fluentd UI(\u516c\u5f0f\u30b5\u30a4\u30c8)<br \/>\nhttp:\/\/docs.fluentd.org\/articles\/fluentd-ui<br \/>\nINSTALLING SUPERVISOR ON AMAZON EC2<br \/>\nhttp:\/\/mysteryos.net\/installing-supervisor-amazon-ec2\/<br \/>\nSupervisord \u3092 Amazon Linux AMI \u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\nhttp:\/\/d.hatena.ne.jp\/massat\/20111013\/1318484253<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b9\u6cd5 \u610f\u5916\u3068\u9762\u5012\u81ed\u304b\u3063\u305f\u305f\u3081\u30e1\u30e2 &#x5B;root@ip-172-32-0-221 ec2-user]# easy_install supervisor Searching for supervisor Best m [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[27,73],"tags":[],"_links":{"self":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1931"}],"collection":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1931"}],"version-history":[{"count":3,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1931\/revisions"}],"predecessor-version":[{"id":1934,"href":"https:\/\/tech.akat.info\/index.php?rest_route=\/wp\/v2\/posts\/1931\/revisions\/1934"}],"wp:attachment":[{"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.akat.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}