{"id":24,"date":"2011-05-30T19:07:15","date_gmt":"2011-05-30T10:07:15","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/wordpress\/?p=24"},"modified":"2011-05-30T19:07:15","modified_gmt":"2011-05-30T10:07:15","slug":"24","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=24","title":{"rendered":"Tomcat\u81ea\u52d5\u8d77\u52d5"},"content":{"rendered":"<p>\u25a0Tomcat6.0 \u81ea\u52d5\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8(\/etc\/rc.d\/init.d\/tomcat)<br \/>\n[code]<br \/>\n#!\/bin\/bash<br \/>\n#<br \/>\n# Startup script for the tomcat<br \/>\n#<br \/>\n# chkconfig: 345 80 15<br \/>\n# description: Tomcat is a Servlet+JSP Engine.&lt;\/code&gt;<\/p>\n<p># Source function library.<br \/>\n. \/etc\/rc.d\/init.d\/functions<br \/>\nsource \/etc\/profile.d\/tomcat.sh<\/p>\n<p>start(){<br \/>\nif [ ! -f \/var\/lock\/subsys\/tomcat ] ; then<br \/>\necho &quot;Starting tomcat&quot;<br \/>\n$CATALINA_HOME\/bin\/startup.sh<br \/>\ntouch \/var\/lock\/subsys\/tomcat<br \/>\nelse<br \/>\necho &quot;tomcat allready running&quot;<br \/>\nfi<br \/>\n}<\/p>\n<p>stop(){<br \/>\nif [ -f \/var\/lock\/subsys\/tomcat ] ; then<br \/>\necho &quot;Shutting down tomcat&quot;<br \/>\n$CATALINA_HOME\/bin\/shutdown.sh<br \/>\nrm -f \/var\/lock\/subsys\/tomcat<br \/>\nelse<br \/>\necho &quot;tomcat not running&quot;<br \/>\nfi<br \/>\n}<\/p>\n<p>case &quot;$1&quot; in<br \/>\nstart)<br \/>\nstart<br \/>\n;;<br \/>\nstop)<br \/>\nstop<br \/>\n;;<br \/>\nrestart)<br \/>\nstop<br \/>\nstart<br \/>\n;;<br \/>\nstatus)<br \/>\n$CATALINA_HOME\/bin\/catalina.sh version<br \/>\n;;<br \/>\n*)<br \/>\necho &quot;Usage: $0 {start|stop|restart|status}&quot;<br \/>\nesac<\/p>\n<p>exit 0<br \/>\n[\/code]<\/p>\n<p>\u25a0\u74b0\u5883\u5909\u6570\u8a2d\u5b9a(\/etc\/profile.d\/tomcat.sh)<br \/>\n[code]<br \/>\nexport JAVA_HOME=\/usr\/local\/jdk1.6<br \/>\nexport PATH=$PATH:$JAVA_HOME\/bin<br \/>\nexport CLASSPATH=.:$JAVA_HOME\/jre\/lib:$JAVA_HOME\/lib:$JAVA_HOME\/lib\/tools.jar<br \/>\nexport TOMCAT_HOME=\/usr\/local\/tomcat<br \/>\nexport CATALINA_HOME=\/usr\/local\/tomcat<br \/>\nexport CLASSPATH=$CLASSPATH:$CATALINA_HOME\/common\/lib<br \/>\n[\/code]<\/p>\n<p>\u25a0\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a(\u30e9\u30f3\u30ec\u30d9\u30eb)<br \/>\n[code]<br \/>\n$ chkconfig &#8211;add tomcat<br \/>\n$ chkconfig &#8211;list tomcat<br \/>\ntomcat          0:off   1:off   2:on    3:on    4:on    5:on    6:off<br \/>\n[\/code] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0Tomcat6.0 \u81ea\u52d5\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8(\/etc\/rc.d\/init.d\/tomcat) [code] #!\/bin\/bash # # Startup script for the tomcat # # chkconf [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[9,4],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-java","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":0,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}