{"id":507453,"date":"2021-06-20T14:19:23","date_gmt":"2021-06-20T06:19:23","guid":{"rendered":"http:\/\/4563.org\/?p=507453"},"modified":"2021-06-20T14:19:23","modified_gmt":"2021-06-20T06:19:23","slug":"%e8%85%be%e8%ae%af%e4%ba%91%e8%bd%bb%e9%87%8f%e6%9c%8d%e5%8a%a1%e5%99%a8%e6%90%ad%e5%bb%baipfs%e8%8a%82%e7%82%b9","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=507453","title":{"rendered":"\u817e\u8baf\u4e91\u8f7b\u91cf\u670d\u52a1\u5668\u642d\u5efaipfs\u8282\u70b9"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>fule<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u817e\u8baf\u4e91\u8f7b\u91cf\u670d\u52a1\u5668\u642d\u5efaipfs\u8282\u70b9<\/h3>\n<p>  \t\t\u6700\u8fd1\u5728\u8bba\u575b\u770b\u5230\u4e86\u642d\u5efaipfs\u56fe\u5e8a\u7684\u5e94\u7528,\u8bb0\u5f55\u4e00\u4e0b\u81ea\u5df1\u642d\u5efaipfs\u8282\u70b9\u7684\u8fc7\u7a0b\u5206\u4eab\u7ed9\u5927\u5bb6<\/p>\n<p>  go-ipfs\u4e0b\u8f7d\u5b89\u88c5<\/p>\n<p>  \u672c\u6587\u4f7f\u7528\u7684\u662f\u817e\u8baf\u4e91\u8f7b\u91cf\u670d\u52a1\u5668,\u7cfb\u7edf\u4e3acentos7. go\u7248\u672c\u7684\u4e0b\u8f7d\u6765\u76f4\u63a5\u8fd0\u884c\u5373\u53ef<\/p>\n<p>  &nbsp; &nbsp; # \u4e0b\u8f7d<br \/>  &nbsp; &nbsp; wget https:\/\/github.com\/ipfs\/go-ipfs\/releases\/download\/v0.9.0-rc2\/go-ipfs_v0.9.0-rc2_linux-amd64.tar.gz<br \/>  &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; # \u89e3\u538b<br \/>  &nbsp; &nbsp; tar -xvzf go-ipfs_v0.9.0-rc2_linux-amd64.tar.gz<\/p>\n<p>  \u522b\u7684\u7cfb\u7edf\u7684\u5728\u6b64\u5904\u4e0b\u8f7dhttps:\/\/github.com\/ipfs\/go-ipfs\/releases<\/p>\n<p>  \u4e0b\u8f7d\u5b8c\u6210\u540e,\u8fdb\u5165\u76ee\u5f55\u8fd0\u884cinstall.sh\u8fdb\u884c\u5b89\u88c5<\/p>\n<p>  &nbsp; &nbsp; cd go-ipfs<br \/>  &nbsp; &nbsp; .\/install.sh<\/p>\n<p>  \u9a8c\u8bc1\u4e00\u4e0b<\/p>\n<p>  &nbsp; &nbsp; ipfs version<\/p>\n<p>  \u521d\u59cb\u5316\u8282\u70b9<\/p>\n<p>  &nbsp; &nbsp; ipfs init<\/p>\n<p>  \u521d\u59cb\u5316\u540e\u4f1a\u663e\u793a\u4e00\u4e2apeer identity,\u7136\u540e\u4e0b\u9762\u6709\u4e00\u6761\u547d\u4ee4<\/p>\n<p>  \u7c7b\u4f3cipfs cat \/ipfs\/\u4f60\u7684peer identity\/readme<\/p>\n<p>  \u542f\u52a8\u524d\u5148\u4fee\u6539api\u548c\u7f51\u5173\u4f7f\u5176\u80fd\u591f\u516c\u7f51\u8fdb\u884c\u8bbf\u95ee<\/p>\n<p>  &nbsp; &nbsp; ipfs config Addresses.API \/ip4\/0.0.0.0\/tcp\/5001<br \/>  &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; ipfs config Addresses.Gateway \/ip4\/0.0.0.0\/tcp\/8080<\/p>\n<p>  \u7136\u540e\u4fee\u6539\u4e00\u4e0b\u8de8\u57df\u8bbe\u7f6e<\/p>\n<p>  &nbsp; &nbsp; ipfs config &#8211;json API.HTTPHeaders.Access-Control-Allow-Origin &#8216;[&quot;*&quot;]&#8217;<br \/>  &nbsp; &nbsp; ipfs config &#8211;json API.HTTPHeaders.Access-Control-Allow-Methods &#8216;[&quot;GET&quot;, &quot;POST&quot;]&#8217;<br \/>  &nbsp; &nbsp; ipfs config &#8211;json API.HTTPHeaders.Access-Control-Allow-Headers &#8216;[&quot;Authorization&quot;]&#8217;<br \/>  &nbsp; &nbsp; ipfs config &#8211;json API.HTTPHeaders.Access-Control-Expose-Headers &#8216;[&quot;Location&quot;]&#8217;<br \/>  &nbsp; &nbsp; ipfs config &#8211;json API.HTTPHeaders.Access-Control-Allow-Credentials &#8216;[&quot;true&quot;]&#8217;<\/p>\n<p>  \u4e4b\u540e\u6211\u4eec\u5c31\u53ef\u4ee5\u8f93\u5165ipfs daemon\u542f\u52a8\u4e86<\/p>\n<p>  \u542f\u52a8\u4e4b\u540e\u4f1a\u663e\u793a\u4e00\u4e2awebui\u7684\u5730\u5740,\u6211\u4eec\u5728\u6d4f\u89c8\u5668\u4e2d\u8bbf\u95ee\u5c31\u53ef\u4ee5\u4e86<\/p>\n<p>  \u5c0ftips<\/p>\n<p>  \u914d\u7f6e\u540e\u53f0\u542f\u52a8<\/p>\n<p>  \u6211\u4eec\u4f7f\u7528nohup\u5c31\u53ef\u4ee5\u5566<\/p>\n<p>  &nbsp; &nbsp; nohup ipfs daemon &amp;<\/p>\n<p>  \u5728\u4f7f\u7528\u4e2d,\u6211\u53d1\u73b0\u8fd9\u73a9\u610f\u5bf9cpu\u7684\u5360\u7528\u6709\u70b9\u9ad8,\u52a8\u4e0d\u52a8\u5c31cpu80%\u5f80\u4e0a\u4e86<\/p>\n<p>  \u6211\u4eec\u4f7f\u7528cpulimit\u6765\u9650\u5236\u4e00\u4e0b<\/p>\n<p>  &nbsp; &nbsp; # \u5b89\u88c5cpulimit<br \/>  &nbsp; &nbsp; yum install cpulimit<br \/>  &nbsp; &nbsp; <br \/>  &nbsp; &nbsp; # \u67e5\u770bipfs\u7684\u8fdb\u7a0bid<br \/>  &nbsp; &nbsp; jobs -l<\/p>\n<p>  &nbsp; &nbsp; # \u9650\u5236cpu\u4f7f\u7528\u4e3a30\u5e76\u540e\u53f0\u542f\u52a8<br \/>  &nbsp; &nbsp; cpulimit -l 30 -p \u8fdb\u7a0bid &amp;<\/p>\n<p>  &nbsp; &nbsp; # \u518d\u6b21\u67e5\u770b\u8fdb\u7a0b\u662f\u5426\u90fd\u5728running<br \/>  &nbsp; &nbsp; jobs -l<\/p>\n<p>  \u6700\u540e,yc012t \u817e\u8baf\u4e91\u8f7b\u91cf\u5e94\u7528\u670d\u52a1\u5668\u8d2d\u4e70\u94fe\u63a5:\u65e0aff https:\/\/cloud.tencent.com\/act\/pro\/lighthouse2021<\/p>\n<p>  \u6709aff https:\/\/curl.qcloud.com\/oweLHGUr  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ansheng<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6709docker\u7248\u5417\uff1f:(\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>fule<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\tansheng \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2021-6-20 14:05<br \/>  \u6709docker\u7248\u5417\uff1f<\/p>\n<p> yc007tgo\u7248\u672c\u6211\u89c9\u5f97\u591f\u7b80\u5355\u4e86,\u8d70\u4e0b\u6765\u4e5f\u5c31\u4e94\u5206\u949f\u591a\u70b9\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>fule \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u817e\u8baf\u4e91\u8f7b&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\/507453"}],"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=507453"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/507453\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=507453"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=507453"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=507453"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}