{"id":1010,"date":"2018-08-30T23:53:40","date_gmt":"2018-08-30T15:53:40","guid":{"rendered":"https:\/\/blog.jsjs.org\/?p=1010"},"modified":"2018-08-30T23:53:40","modified_gmt":"2018-08-30T15:53:40","slug":"%e5%8d%95%e6%9c%ba%e5%a4%9a%e5%ae%9e%e4%be%8b%e7%9a%84tomcatsupervisor%e9%85%8d%e7%bd%ae%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/blog.jsjs.org\/?p=1010","title":{"rendered":"\u5355\u673a\u591a\u5b9e\u4f8b\u7684tomcat+supervisor\u914d\u7f6e\u65b9\u6cd5"},"content":{"rendered":"\n<p><span style=\"font-family: Microsoft YaHei;\"><span>\u65b0\u516c\u53f8\uff0c\u5f00\u53d1\u7528java\uff0c\u8dd1\u5728tomcat\u91cc\uff0c\u4e00\u53f0\u673a\u5668\u4f1a\u8dd1\u591a\u4e2atomcat\uff0c\u539f\u6765\u7684\u8fd0\u7ef4\u4eba\u5458\u662f\u590d\u5236\u4e86\u591a\u4efdtomcat\u653e\u5230\u76ee\u5f55\u4e0b\u3002\u8fd9\u6837\u505a\u6211\u89c9\u5f97\u7ba1\u7406\u4e0d\u65b9\u4fbf\uff0c\u9042\u6539\u4e3asuperviosr\u6765\u63a7\u5236\uff0c\u540c\u65f6\u5c06tomcat\u672c\u8eab\u4e0e\u5de5\u7a0b\u6587\u4ef6\u5206\u5f00\u653e\u7f6e\u3002\u5373\u4e00\u53f0\u4e3b\u673a\u53ea\u6709\u4e00\u4efdtomcat\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8fd9\u6837\u4e5f\u65b9\u4fbf\u4ee5\u540e\u5347\u7ea7tomcat\uff0c\u4e0b\u8fb9\u7b80\u8981\u6d41\u6c34\u8d26\u4e00\u4e0b\uff0c\u4e0d\u89e3\u91ca\u7ec6\u8282\uff0c\u90fd\u80fd\u770b\u61c2\u3002<\/span>\u53e6\u5916\uff0c\u6211\u628a\u5b89\u88c5\u8fc7\u7a0b\u5199\u6210\u4e86ansible playbook\uff0c\u9700\u8981\u7684\u53ef\u4ee5\u53bb\u6211\u7684github\u4e0a\u4e0b\u8f7d\uff0chttps:\/\/github.com\/polygun2000<\/span><\/p>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">1.\u5b89\u88c5Server JRE<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# mkdir\u00a0<wbr \/>\/usr\/local\/java\/<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# tar xvzf server-jre-8u121-linux-x64.tar.gz\u00a0<wbr \/>&#8211;strip-components=1 -C \/usr\/local\/java<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">2.\u5b89\u88c5supervisor<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u53ef\u4ee5\u7528yum\u76f4\u63a5\u5b89\u88c5\uff0cepel\u6e90\u4e2d\u6709\uff0c\u4e0d\u8fc7\u7248\u672c\u6bd4\u8f83\u4f4e\u3002<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u63a8\u8350\u7684\u65b9\u5f0f\u662f\u4f7f\u7528pip\u5b89\u88c5\uff0c\u9700\u8981\u673a\u5668\u80fd\u8bbf\u95eeinternet\u3002<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u5982\u679c\u4e0d\u80fd\u8bbf\u95eeinternet\uff0c\u53ef\u4ee5\u5728\u80fd\u8bbf\u95ee\u7684\u673a\u5668\u4e0a\u76f4\u63a5\u4e0b\u8f7d\u6e90\u7801\uff0c\u590d\u5236\u8fc7\u6765\u540e\u89e3\u538b\uff0c\u7528python setup.py install\u65b9\u5f0f\u5b89\u88c5\u3002<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u6ce8\u610f\uff1asupervisor\u4f9d\u8d56meld3,\u4f46\u662fpip\u5b89\u88c5\u7684meld3\u6709\u53ef\u80fd\u7248\u672c\u592a\u4f4e\uff0c\u542f\u52a8supervisor\u4f1a\u62a5\u9519\uff0c\u53ef\u4ee5\u4e0b\u8f7dmeld3-1.0.2.tar.gz,\u91c7\u7528python setup.py install\u65b9\u5f0f\u624b\u5de5\u5b89\u88c5\u3002<\/span><\/div>\n<\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# pip install supervisor<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">supervisor\u67e5\u627e\u914d\u7f6e\u6587\u4ef6\u7684\u987a\u5e8f\u5982\u4e0b\uff0c\u5176\u4e2d $CWD \u4ee3\u8868\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55 \uff1a<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">$CWD\/supervisord.conf<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">$CWD\/etc\/supervisord.conf<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\/etc\/supervisord.conf<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\/etc\/supervisor\/supervisord.conf (Supervisor 3.3.0\u4ee5\u540e\u5f15\u5165)<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">..\/etc\/supervisord.conf (\u76f8\u5bf9\u4e8esupervisor\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84)<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">..\/supervisord.conf (\u76f8\u5bf9\u4e8esupervisor\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84)<\/span><\/div>\n<\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u901a\u5e38\u4f7f\u7528\/etc\/supervisord.conf<\/span><\/div>\n<\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u521b\u5efasupervisord\u7684\u542f\u52a8\u811a\u672c\uff0c\u5982\u679c\u662f\u7528yum\u88c5\u7684\u5c31\u4e0d\u5fc5\u4e86\uff0c\u7cfb\u7edf\u81ea\u5e26\u4e86\u3002<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# vi \/usr\/lib\/systemd\/system\/supervisord.service \u00a0<wbr \/><\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">[Unit]<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">Description=Process Monitoring and Control Daemon<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">After=rc-local.service<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">[Service]<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">Type=forking<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">ExecStart=\/usr\/bin\/supervisord -c \/etc\/supervisord.conf<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">[Install]<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">WantedBy=multi-user.target<\/span><\/div>\n<\/div>\n<\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">3.\u5b89\u88c5tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# mkdir \/usr\/local\/tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# groupadd tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# useradd -s \/bin\/nologin -d \/usr\/local\/tomcat -M tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\"><span>]# tar xvzf \u00a0<wbr \/>apache-tomcat-8.0.43.tar.gz\u00a0<wbr \/>&#8211;strip-components=1\u00a0<wbr \/><\/span>-C \/usr\/local\/tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# cd \/usr\/local\/tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# rm -rf \u00a0<wbr \/>webapps logs temp work<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">4.\u51c6\u5907\u5404\u72ec\u7acb\u7684tomcat\u5b9e\u4f8b\u76ee\u5f55\uff0c\u8fd9\u91cc\u53ea\u4e3e\u4e00\u4e2awebsite1\u7684\u4f8b\u5b50\uff0c\u66f4\u591a\u53ea\u9700\u8981\u91cd\u590d\u8fd9\u6b65\u5373\u53ef\u3002<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# mkdir -p \/data\/apps\/website1\/{bin,webapps,lib,logs,temp,work}<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# cp -r \/usr\/local\/tomcat\/conf \/data\/apps\/website1\/<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# cp \/usr\/local\/tomcat\/bin\/*.sh \u00a0<wbr \/>\/data\/apps\/website1\/bin<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# cd \/data\/apps\/website1<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# chmod g+w temp logs work<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# vi \/data\/apps\/website1\/bin\/setenv.sh<\/span><\/div>\n<blockquote>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">#!\/bin\/sh<\/span><\/div>\n<\/div>\n<\/blockquote>\n<blockquote>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">CATALINA_HOME=\/usr\/local\/tomcat \u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0\u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">CATALINA_BASE=\/data\/apps\/website1\/<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">CATALINA_PID=\/data\/apps\/website1\/temp\/tomcat.pid<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">JAVA_HOME=\/usr\/local\/java<\/span><\/div>\n<\/div>\n<\/blockquote>\n<div><span style=\"font-family: Microsoft YaHei;\">]# chmod 755 \/data\/apps\/website1\/bin\/setenv.sh<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# vi \/data\/apps\/website1\/bin\/supervisord-wrapper.sh<\/span><\/div>\n<blockquote>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">#!\/bin\/bash<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\"># Source: http:\/\/serverfault.com\/questions\/425132\/controlling-tomcat-with-supervisor<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">function shutdown()<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">{<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0date<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0echo &#8220;Shutting down Tomcat&#8221;<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0unset CATALINA_PID # Necessary in some cases<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0\/data\/apps\/website1\/bin\/catalina.sh stop<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">}<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">date<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">echo &#8220;Starting Tomcat&#8221;<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">. \/data\/apps\/website1\/bin\/catalina.sh start -security<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\"># Allow any signal which would kill a process to stop Tomcat<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">trap shutdown HUP INT QUIT ABRT KILL ALRM TERM TSTP<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">echo &#8220;Waiting for `cat $CATALINA_PID`&#8221;<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">wait `cat $CATALINA_PID`<\/span><\/div>\n<\/div>\n<\/blockquote>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# chmod 755 \/data\/apps\/website1\/bin\/supervisord-wrapper.sh<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# chown -R tomcat.tomcat \/data\/apps\/website1<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u914d\u7f6ecatalina.out\u65e5\u5fd7\u6587\u4ef6\u7684\u8f6e\u8f6c\uff0c\u4ee5\u514d\u786c\u76d8\u88ab\u5199\u6ee1<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# vi \/etc\/logrotate.d\/tomcat-website1<\/span><\/div>\n<blockquote>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\/data\/apps\/website1\/logs\/catalina.out { \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0copytruncate \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0daily \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0rotate 7 \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0compress \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0missingok \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0size 10M<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<wbr \/>\u00a0dateext<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">} \u00a0<wbr \/><\/span><\/div>\n<\/div>\n<\/blockquote>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">5.\u914d\u7f6esupervisor\u7684program<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\"><span>]# vi \/etc\/<\/span>supervisord.d\/website1.ini<\/span><\/div>\n<blockquote>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">[program:website1]<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">directory = \/data\/apps\/website1<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">command = \/data\/apps\/website1\/bin\/supervisord-wrapper.sh<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">environment=HOME=&#8221;\/usr\/local\/tomcat&#8221;,USER=&#8221;tomcat&#8221;<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">stdout_logfile = \/data\/apps\/website1\/logs\/catalina.out<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">autostart = true<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">startsecs = 10<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">stopsignal = QUIT<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">stopasgroup = true<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">user = tomcat<\/span><\/div>\n<\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">redirectstderr = true<\/span><\/div>\n<\/div>\n<\/blockquote>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">6.\u914d\u7f6esupervisor\uff0c\u6253\u5f00\u5185\u7f6e\u7684http server\uff0c\u4ee5\u4fbf\u7528web\u65b9\u5f0f\u542f\u52a8\uff0c\u505c\u6b62tomcat<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# vi\u00a0<wbr \/>\/etc\/supervisord.conf,\u53d6\u6d88\u5982\u4e0b\u4e24\u884c\u7684\u6ce8\u91ca\uff1a<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">;[inet_http_server]<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">;port=*:9001 \u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0\u00a0<wbr \/>\u00a0\u00a0<wbr \/>; (ip_address:port specifier, *:port for all iface)<\/span><\/div>\n<\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">7.\u542f\u52a8supervisor\uff0c\u4f1a\u81ea\u52a8\u542f\u52a8website1\u7684tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# systemctl start supervisord<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">]# systemctl enable supervisord<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u53ef\u4ee5\u7528pstree\u547d\u4ee4\u770b\u5230tomcat\u662f\u88absupervisor\u542f\u52a8\u7684\u3002<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u00a0<\/span><\/div>\n<\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">\u53c2\u8003\u6587\u6863\uff1a<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">https:\/\/blog.tankywoo.com\/2014\/12\/05\/supervisor-run-program-as-nonroot.html<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">https:\/\/tomcat.apache.org\/tomcat-7.0-doc\/RUNNING.txt<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">http:\/\/blog.e-zest.com\/how-to-run-multiple-tomcat-instances-on-single-linux-server\/<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">https:\/\/dzone.com\/articles\/running-multiple-tomcat<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">http:\/\/www.ramkitech.com\/2011\/07\/running-multiple-tomcat-instances-on.html<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">https:\/\/www.mulesoft.com\/tcat\/tomcat-webapp<\/span><\/div>\n<div>\n<div><span style=\"font-family: Microsoft YaHei;\">http:\/\/mikenaberezny.com\/talks\/oscon08\/supervisor_as_a_platform.pdf<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">https:\/\/github.com\/jasoncorbett\/ordered-startup-supervisord\/blob\/master\/ordered_startup_supervisord.py<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">https:\/\/code.tutsplus.com\/tutorials\/monitor-and-control-applications-using-supervisor-part-2&#8211;cms-24236<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">http:\/\/qiita.com\/harukasan\/items\/cfbd75561a1ebf3779c4<\/span><\/div>\n<div><span style=\"font-family: Microsoft YaHei;\">http:\/\/qiita.com\/imunew\/items\/465521e30fae238cf7d0<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u516c\u53f8\uff0c\u5f00\u53d1\u7528java\uff0c\u8dd1\u5728tomcat\u91cc\uff0c\u4e00\u53f0\u673a\u5668\u4f1a\u8dd1\u591a\u4e2atomcat\uff0c\u539f\u6765\u7684\u8fd0\u7ef4\u4eba\u5458\u662f\u590d\u5236\u4e86\u591a\u4efdtomcat\u653e\u5230\u76ee\u5f55\u4e0b\u3002\u8fd9\u6837\u505a\u6211\u89c9\u5f97\u7ba1\u7406\u4e0d\u65b9\u4fbf\uff0c\u9042\u6539\u4e3asuperviosr\u6765\u63a7\u5236\uff0c\u540c\u65f6\u5c06tomcat\u672c\u8eab\u4e0e\u5de5\u7a0b\u6587\u4ef6\u5206\u5f00\u653e\u7f6e\u3002\u5373\u4e00\u53f0\u4e3b\u673a\u53ea\u6709\u4e00\u4efdtomcat\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8fd9\u6837\u4e5f\u65b9\u4fbf\u4ee5\u540e\u5347\u7ea7tomcat\uff0c\u4e0b\u8fb9\u7b80\u8981\u6d41\u6c34\u8d26\u4e00\u4e0b\uff0c\u4e0d\u89e3\u91ca\u7ec6\u8282\uff0c\u90fd\u80fd\u770b\u61c2\u3002\u53e6\u5916\uff0c\u6211\u628a\u5b89\u88c5\u8fc7\u7a0b\u5199\u6210\u4e86ansible playbook\uff0c\u9700\u8981\u7684\u53ef\u4ee5\u53bb\u6211\u7684github\u4e0a\u4e0b\u8f7d\uff0chttps:\/\/github.com\/polygun2000 \u00a0 1.\u5b89\u88c5Server JRE ]# mkdir\u00a0\/usr\/local\/java\/ ]# tar xvzf server-jre-8u121-linux-x64.tar.gz\u00a0&#8211;strip-components=1 -C \/usr\/local\/java \u00a0 2.\u5b89\u88c5supervisor \u53ef\u4ee5\u7528yum\u76f4\u63a5\u5b89\u88c5\uff0cepel\u6e90\u4e2d\u6709\uff0c\u4e0d\u8fc7\u7248\u672c\u6bd4\u8f83\u4f4e\u3002 \u63a8\u8350\u7684\u65b9\u5f0f\u662f\u4f7f\u7528pip\u5b89\u88c5\uff0c\u9700\u8981\u673a\u5668\u80fd\u8bbf\u95eeinternet\u3002 \u5982\u679c\u4e0d\u80fd\u8bbf\u95eeinternet\uff0c\u53ef\u4ee5\u5728\u80fd\u8bbf\u95ee\u7684\u673a\u5668\u4e0a\u76f4\u63a5\u4e0b\u8f7d\u6e90\u7801\uff0c\u590d\u5236\u8fc7\u6765\u540e\u89e3\u538b\uff0c\u7528python setup.py install\u65b9\u5f0f\u5b89\u88c5\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1010","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/1010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1010"}],"version-history":[{"count":0,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=\/wp\/v2\/posts\/1010\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jsjs.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}