{"id":409,"date":"2007-08-26T17:35:30","date_gmt":"2007-08-26T08:35:30","guid":{"rendered":"http:\/\/ecpplus.net\/weblog\/?p=409"},"modified":"2020-05-24T23:22:57","modified_gmt":"2020-05-24T14:22:57","slug":"%e8%b5%b7%e5%8b%95%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%81%ae%e6%9b%b8%e3%81%8d%e6%96%b9","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/%e8%b5%b7%e5%8b%95%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88%e3%81%ae%e6%9b%b8%e3%81%8d%e6%96%b9\/","title":{"rendered":"\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u66f8\u304d\u65b9"},"content":{"rendered":"<p>\u3000Linux\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u81ea\u52d5\u8d77\u52d5\u3057\u305f\u3044\u3068\u304d\u306f\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3044\u3066 chkconfig -add \u3057\u3066\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3059\u308b\u3002<\/p>\n<p>\u3000\u3069\u3093\u306a\u30c7\u30a3\u30b9\u30c8\u30ed\u3067\u3082\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u66f8\u304d\u65b9\u306f\u540c\u3058\u306a\u3093\u3060\u308d\u3046\u304b(\u00b4\uff65\u03c9\uff65`)  Redhat, Suse, Debian, CentOS\u306a\u3089\u884c\u3051\u308b\u3068\u601d\u3046\u3002\u4f8b\u3048\u3070Pound\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306f\u52dd\u624b\u306b\u51fa\u6765\u306a\u3044\u306e\u3067\u66f8\u304f\u3002<\/p>\n<h4>\u666e\u901a\u306a\u5834\u5408<\/h4>\n<pre># chkconfig [\u8d77\u52d5\u30ec\u30d9\u30eb] [\u8d77\u52d5\u6642\u306e\u512a\u5148\u5ea6] [\u505c\u6b62\u6642\u306e\u512a\u5148\u5ea6]<\/pre>\n<p>\u81ea\u5206\u3067\u3044\u308c\u305f\u3082\u306e\u3060\u3063\u305f\u3089\u3001\u8d77\u52d5\u30ec\u30d9\u30eb\u306f345,45\u3042\u305f\u308a\u3067\u304ak\u3002\u6b63\u76f4\u3069\u306e\u30ec\u30d9\u30eb\u306b\u4f55\u3092\u7f6e\u3044\u305f\u3089\u3044\u3044\u306e\u304b\u826f\u304f\u5206\u304b\u3063\u3066\u306a\u3044\u3002\u8d77\u52d5\u6642\u306e\u512a\u5148\u5ea6\u306f\u3001\u4f4e\u3081\u3067\u3044\u3044\u3068\u601d\u3046\u3002\u9006\u306b\u505c\u6b62\u6642\u306f\u4e00\u756a\u6700\u521d\u306b\u6b62\u3081\u305f\u3044\u306e\u3067\u9ad8\u3081\u3067\u3002<\/p>\n<p>\u4e0b\u306e\uff12\u3064\u306f\u3044\u3064\u3082\u30c6\u30ad\u30c8\u30fc\u306b\u66f8\u3044\u3066\u307e\u3059(&#8216;A`)<\/p>\n<pre lang=\"bash\"># description: [\u8aac\u660e]\n# processname: [\u30d7\u30ed\u30bb\u30b9\u540d]<\/pre>\n<p>\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u7de8\u96c6\u3057\u307e\u3059\u3002<\/p>\n<pre lang=\"bash\">$ sudo vi \/etc\/init.d\/pound<\/pre>\n<p>\u5185\u5bb9\u3002<\/p>\n<pre lang=\"bash\">#!\/bin\/sh\n# chkconfig: 345 99 1\n# description: Pound\n# processname: pound\nstart(){\n  echo -n \"starting pound:\"\n  \/usr\/local\/sbin\/pound\n  return 0\n}\nstop(){\n  killall pound\n  return 0\n}\ncase $1 in\n  start)\n    start\n      ;;\n  stop)\n     stop\n      ;;\nesac<\/pre>\n<p>\u4e0a\u8a18\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002\u6700\u521d\u306b\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3001\u3042\u3068\u304b\u3089\u5f15\u6570\u306b\u3088\u3063\u3066\u3057\u3087\u308a\u3092\u5206\u3051\u308b\u611f\u3058\u3067\u3059\u3002$1,$2,&#8230; \u30671,2,&#8230;\u756a\u76ee\u306e\u5f15\u6570\u304c\u53d6\u308c\u307e\u3059\u3002\u3053\u306e\u4f8b\u3060\u3068\u3001 <code>$ sudo \/etc\/init.d\/pound start<\/code> \u3063\u3066\u3084\u308b\u3068 $1 \u306b &#8216;start&#8217; \u304c\u306f\u3044\u3063\u3066 start() \u304c\u547c\u3070\u308c\u307e\u3059\u3002<\/p>\n<p>\u6b21\u306b\u5b9f\u884c\u6a29\u9650\u3092\u4e0e\u3048\u307e\u3059\u3002\u305d\u306e\u5f8c\u3001chkconfig \u304c\u4f7f\u3048\u308b\u30c7\u30a3\u30b9\u30c8\u30ed\u306e\u5834\u5408\u3068\u4eee\u5b9a\u3057\u3066\u8ffd\u52a0\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre lang=\"bash\">$ sudo chmod +x \/etc\/init.d\/pound\n$ sudo \/sbin\/chkconfig --add pound<\/pre>\n<p>\u8ffd\u52a0\u3055\u308c\u3066\u308b\u304b\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3059\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/p>\n<pre lang=\"bash\">$ sudo \/sbin\/chkconfig --list|grep pound\npound           0:off   1:off   2:off   3:on    4:on    5:on    6:off<\/pre>\n<h4>\u8d77\u52d5\u6642\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3092\u6c42\u3081\u3089\u308c\u308b\u6642<\/h4>\n<p>\u3000\u4f8b\u3048\u3070\u3001Pound\u3067SSL\u3092\u30e9\u30c3\u30d4\u30f3\u30b0\u3057\u3066\u308b\u3068\u8d77\u52d5\u6642\u306b\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u50d5\u306fExpect\u4f7f\u3063\u3066\u308b\u3093\u3067\u3059\u304c\u3001\u3082\u3063\u3068\u30b9\u30de\u30fc\u30c8\u306a\u65b9\u6cd5\u304c\u3042\u3063\u305f\u3089\u6559\u3048\u3066\u307b\u3057\u3044\u3067\u3059(\u00b4\u2200`)<\/p>\n<p>\u3000\u307e\u305a\u3001Expect \u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u304d\u307e\u3059\u3002<a href=\"\/weblog\/?page=399\">Expect<\/a> \u306b\u3061\u3087\u3053\u3063\u3068\u66f8\u3044\u3066\u3042\u308b\u306e\u3067\u8a73\u7d30\u306f\u7701\u7565\u3002<\/p>\n<pre lang=\"bash\">$ sudo vi \/usr\/local\/etc\/pound<\/pre>\n<p>\u5185\u5bb9\u3002<\/p>\n<pre lang=\"bash\">#! \/usr\/bin\/expect --\nset timeout -1\nlog_file commit_log\nspawn sudo \/usr\/local\/sbin\/pound\nexpect \"Enter PEM pass phrase:\"\nsend \"pempassword\\r\"\ninteract<\/pre>\n<p><code>Enter PEM pass phrase:<\/code> \u306e\u90e8\u5206\u306f\u4e88\u3081\u6a19\u6e96\u51fa\u529b\u3055\u308c\u308b\u6587\u5b57\u5217\u3092\u899a\u3048\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308b\u3002\u305d\u3057\u3066\u3001\u5b9f\u884c\u6a29\u9650\u3092\u4e0e\u3048\u308b\u3002<\/p>\n<pre lang=\"bash\">$ sudo chmod +x \/usr\/local\/etc\/pound<\/pre>\n<p>\u3042\u3068\u306f\u3001\u3055\u3063\u304d\u3068\u307b\u3068\u3093\u3069\u4e00\u7dd2\u3067\u3059\u3002 <code>\/usr\/local\/etc\/pound<\/code> \u3092\u5b9f\u884c\u3059\u308c\u3070Pound\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u66f8\u304f\u3060\u3051\u3067\u3059\u3002restart \u3063\u3066\u306e\u3082\u66f8\u3044\u3066\u307f\u305f\u3002<\/p>\n<pre lang=\"bash\">#!\/bin\/sh\n# chkconfig: 345 99 1\n# description: software proxy Pound\n# processname: Pound\n# created by arai@a-it.jp 070826\nstart(){\n  echo \"starting pound...\"\n  \/usr\/local\/etc\/pound.sh\n  return 0\n}\nstop(){\n  echo \"stopping pound...\"\n  killall pound\n  return 0\n}\nrestart(){\n  echo \"restarting pound...\"\n  killall pound\n  \/usr\/local\/etc\/pound.sh\n  return 0\n}\ncase $1 in\n  start)\n    start\n  ;;\n  stop)\n    stop\n  ;;\n  restart)\n    restart\n  ;;\nesac<\/pre>\n<p>\u3042\u3068\u306f\u3055\u3063\u304d\u3068\u540c\u3058\u69d8\u306b\u5b9f\u884c\u6a29\u9650\u3042\u305f\u3048\u3066chkconfig -add \u3057\u3066\u7d42\u4e86\u3002<\/p>\n<p>Rails\u30a2\u30d7\u30ea\u3092\u3084\u308b\u5834\u5408\u306f\u30dd\u30fc\u30c8\u3054\u3068\u306b stop \u3092\u5de5\u592b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3051\u3069 lsof \u3068\u304b\u4f7f\u3063\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u66f8\u3051\u3070\u304ak<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000Linux\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u81ea\u52d5\u8d77\u52d5\u3057\u305f\u3044\u3068\u304d\u306f\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u304b\u3044\u3066 chkconfig -add \u3057\u3066\u307f\u305f\u3044\u306a\u3053\u3068\u3092\u3059\u308b\u3002 \u3000\u3069\u3093\u306a\u30c7\u30a3\u30b9\u30c8\u30ed\u3067\u3082\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u66f8\u304d\u65b9\u306f\u540c\u3058\u306a\u3093\u3060\u308d\u3046\u304b(\u00b4\uff65\u03c9\uff65`) Redhat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[7],"class_list":["post-409","post","type-post","status-publish","format-standard","hentry","category-development","tag-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=409"}],"version-history":[{"count":1,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/409\/revisions"}],"predecessor-version":[{"id":2249,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/409\/revisions\/2249"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}