{"id":285913,"date":"2021-01-15T01:18:46","date_gmt":"2021-01-14T17:18:46","guid":{"rendered":"http:\/\/4563.org\/?p=285913"},"modified":"2021-01-15T01:18:46","modified_gmt":"2021-01-14T17:18:46","slug":"unix-%e5%9f%9f%e5%a5%97%e6%8e%a5%e5%ad%97%e7%9a%84%e4%b8%bb%e8%a6%81%e5%ba%94%e7%94%a8%e5%9c%ba%e6%99%af%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=285913","title":{"rendered":"UNIX \u57df\u5957\u63a5\u5b57\u7684\u4e3b\u8981\u5e94\u7528\u573a\u666f\u662f\u4ec0\u4e48\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  UNIX \u57df\u5957\u63a5\u5b57\u7684\u4e3b\u8981\u5e94\u7528\u573a\u666f\u662f\u4ec0\u4e48\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zhoudaiyu <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6bd4\u5982\u6709\u4e2a go \u7684\u8fdb\u7a0b\uff08\u4f5c\u4e3a\u5ba2\u6237\u7aef\uff09\u8c03\u7528\u672c\u673a\u7684\u4e00\u4e2a python \u7684\u8fdb\u7a0b\uff08\u4f5c\u4e3a\u670d\u52a1\u7aef\uff09\u6267\u884c\u67d0\u4e2a\u51fd\u6570\uff0c\u662f\u4e0d\u662f\u53ef\u4ee5\u7528 UNIX Domain Socket \u8fdb\u884c\u901a\u4fe1\uff1f\u90a3\u4e48\u901a\u5e38\u8fd9\u79cd\u8c03\u7528\u65b9\u5f0f\u662f\u4f7f\u7528\u4ec0\u4e48\u65b9\u5f0f\u5b8c\u6210\u8c03\u7528\u5462\uff1f\u6211\u60f3\u5230\u4e86\u4e00\u4e2a\u7c7b\u4f3c\u4e8e JsonRpc \u7684\u65b9\u5f0f\uff0c\u5373\u5c06\u5ba2\u6237\u7aef\u8c03\u7528\u7684\u65b9\u6cd5\u540d\uff0c\u53c2\u6570\u7b49\u5e8f\u5217\u5316\u4e3a\u4e00\u4e2a json \u5b57\u8282\u6d41\uff0c\u670d\u52a1\u7aef\u53cd\u5e8f\u5217\u5316\uff0c\u7136\u540e\u6267\u884c\u76f8\u5e94\u7684\u65b9\u6cd5\uff0c\u518d\u5c06\u7ed3\u679c\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002\u8bf7\u95ee\u662f\u5426\u53ef\u884c\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4957069\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ysc3839 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e3b\u8981\u5e94\u7528\u573a\u666f\u662f\u8de8\u8fdb\u7a0b\u901a\u4fe1                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4957070\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : agagega <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Nginx \u548c PHP-FPM \u5c31\u53ef\u4ee5\u8fd9\u4e48\u5e72                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4957071\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : aheadlead <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             android \u5e94\u7528\u6253 log \u65f6\uff0c\u662f\u901a\u8fc7 unix domain socket \u5199\u5230 logd \u8fdb\u7a0b\u91cc\u7684\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4957072\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : MeteorCat <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5355\u673a\u6548\u7387 \/dev\/shm \u521b\u5efa server.sock\uff0c\u4e0d\u8d70 lo \u73af\u6d41                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4957073\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ETiV <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6b63\u6587\u5185\u5bb9\u548c\u6807\u9898\u5728\u95ee\u7684\u6709\u51fa\u5165\uff0c\u6211\u56de\u7b54\u4e0b\u6807\u9898\u7684\u5185\u5bb9\u5427<\/p>\n<p>\u4e00\u3001\u6743\u9650\u9694\u79bb<br \/>unix socket \u56e0\u4e3a\u5efa\u7acb\u5728\u672c\u5730\u8def\u5f84\uff0c\u6240\u4ee5\u53ef\u4ee5\u914d\u7f6e owner \u3001group \u3001other \u7684\u6743\u9650\uff08 chmod 0755 \u90a3\u4e9b\uff09\uff0c\u6765\u9650\u5236\u5176\u4ed6\u8d26\u6237\u7684\u8bbf\u95ee\u3002\u5178\u578b\u7684\u5c31\u662f docker daemon\uff0c\u76d1\u542c\u5728\u4e86\u672c\u5730 socket \u4e0a\uff0c\u5e76\u4e14\u53ea\u7ed9 docker \u7ec4\u8bbf\u95ee\uff0c\u8fd9\u6837\u53ea\u6709\u5728 docker \u7528\u6237\u7ec4\u91cc\u7684\u8d26\u53f7\u624d\u6709\u6743\u9650\u53bb\u8c03 docker API \u3002<br \/>\u6240\u4ee5\u4e5f\u4ece\u6765\u4e0d\u8981\u5c06 docker daemon \u660e\u6587\u5730\u76d1\u542c\u5728 TCP \u7aef\u53e3\u4e0a\u3002<\/p>\n<p>\u4e8c\u3001\u9ad8\u5e76\u53d1\u7684\u53cd\u5411\u4ee3\u7406<br \/>TCP \u8bbf\u95ee\u67d0\u4e2a\u7aef\u53e3\uff0c\u9700\u8981\u5728\u672c\u673a\u9ad8\u4f4d\u7aef\u53e3\u968f\u673a\u5f00\u4e00\u4e2a\u518d\u5efa\u7acb\u8fde\u63a5\uff0c\u800c\u7aef\u53e3\u53f7\u7684\u4e2a\u6570\u662f\u6709\u9650\u5236\u7684\uff08\u5373\u4fbf\u53ef\u4ee5\u590d\u7528\uff09\u3002\u53cd\u5411\u4ee3\u7406\u5230\u672c\u673a\u8def\u5f84\u4e0b\u7684 unix socket \u53ef\u4ee5\u907f\u514d\u6b64\u7c7b\u95ee\u9898\uff0c\u53ea\u8981\u5c06\u53ef\u6253\u5f00\u7684\u6587\u4ef6\u63cf\u8ff0\u7b26\u5f00\u591f\u5373\u53ef\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4957074\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : msg7086 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7b80\u5355\u6765\u89e3\u91ca\u5c31\u662f\u4e00\u4e2a\u6548\u7387\u66f4\u9ad8\u3001\u66f4\u5b89\u5168\u7684 TCP\/UDP \u7aef\u53e3\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>UNIX \u57df\u5957\u63a5\u5b57\u7684\u4e3b\u8981\u5e94\u7528\u573a\u666f\u662f&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/285913"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285913"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/285913\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285913"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285913"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285913"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}