{"id":6504,"date":"2021-06-10T16:05:26","date_gmt":"2021-06-10T16:05:26","guid":{"rendered":"http:\/\/43.153.210.228\/\/?p=6504"},"modified":"2021-06-10T16:05:26","modified_gmt":"2021-06-10T16:05:26","slug":"%e4%bd%bf%e7%94%a8ubuntu-20-04%e5%90%af%e5%8a%a8%e6%af%94%e7%89%b9%e5%b8%81%e5%ae%88%e6%8a%a4%e7%a8%8b%e5%ba%8f%e5%a4%b1%e8%b4%a5","status":"publish","type":"post","link":"http:\/\/43.153.210.228\/?p=6504","title":{"rendered":"\u4f7f\u7528Ubuntu 20.04\u542f\u52a8\u6bd4\u7279\u5e01\u5b88\u62a4\u7a0b\u5e8f\u5931\u8d25"},"content":{"rendered":"<p>\u563f\uff0c\u6211\u6bcf\u6b21\u8fd0\u884csudo systemctl enable\u65f6\u90fd\u4f1a\u9047\u5230\u8fd9\u4e2a\u9519\u8bef\u2014\u2014\u73b0\u5728\u662fbitconid<br \/>bitcoind.service\u7684\u4f5c\u4e1a\u5931\u8d25\uff0c\u56e0\u4e3a\u63a7\u5236\u8fdb\u7a0b\u5df2\u9000\u51fa\uff0c\u5e76\u8fd4\u56de\u9519\u8bef\u4ee3\u7801\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u201csystemctl status bitcoind.service\u201d\u548c\u201cjournalctl-xe\u201d\u3002<br \/>\u5f53\u6211\u8f93\u5165sudojournalctl-xe\u2014\u2014\u5355\u4f4d\u6bd4\u7279\u5e01\u65f6\uff0c\u6211\u5f97\u5230\u8fd9\u4e2a\u3002bitcoind.service-\u52a0\u8f7d\u7684Bitcoin\u5b88\u62a4\u8fdb\u7a0b\uff1a\u5df2\u52a0\u8f7d\uff08\/etc\/systemd\/system\/bitcoind.service\uff1b\u542f\u7528\uff1b\u4f9b\u5e94\u5546\u538b\u529b&gt;\u6fc0\u6d3b\uff1a\u81ea2020-12-30\u5468\u4e0915:12:05 UTC\u8d77\u5931\u8d25\uff08\u7ed3\u679c\uff1a\u9000\u51fa\u4ee3\u7801\uff09\uff1b23s&gt;\u8fdb\u7a0b\uff1a2411 ExecStartPre=\/bin\/chgrp admin\/etc\/bitcoin\uff08code=exited\uff0cstat&gt;<br \/>\u8fd9\u662f\u6211\u7684\u6bd4\u7279\u5e01\u670d\u52a1\u7684\u6837\u5b50\u3002\u6211\u628a\u7528\u6237\u548c\u7ec4\u4ece\u6bd4\u7279\u5e01\u6539\u6210\u4e86\u7ba1\u7406\u5458[Unit]Description=\u6bd4\u7279\u5e01\u5b88\u62a4\u8fdb\u7a0bAfter=network.target<br \/>[\u670d\u52a1]ExecStart=\/usr\/bin\/bitcoind-daemon<br \/>-pid=\/run\/bitcond\/bitcond.pid<br \/>-conf=\/etc\/bitcoin\/bitcoin.conf<br \/>-datadir=\/var\/lib\/bitcond<br \/>\u786e\u4fdd\u670d\u52a1\u7528\u6237\u53ef\u4ee5\u8bfb\u53d6\u914d\u7f6e\u76ee\u5f55<br \/>PermissionsStartOnly=true ExecStartPre=\/bin\/chgrp admin\/etc\/\u6bd4\u7279\u5e01<br \/>\u8fc7\u7a0b\u7ba1\u7406<br \/>####################<br \/>Type=forking PIDFile=\/run\/bitcoind\/bitcoind.pid Restart=on failure TimeoutStopSec=600<br \/>\u8fd0\u884c\u65b9\u5f0fadmin:admin<br \/>\u7528\u6237=\u7ba1\u7406\u5458\u7ec4=\u7ba1\u7406\u5458<br \/>\/\u8fd0\u884c\/\u6bd4\u7279\u5e01<br \/>RuntimeDirectory=bitcond RuntimeDirectoryMode=0710<br \/>\/etc\/\u6bd4\u7279\u5e01<br \/>\u914d\u7f6e\u76ee\u5f55=\u6bd4\u7279\u5e01\u914d\u7f6e\u76ee\u5f55\u6a21\u5f0f=0710<br \/>\/var\/lib\/\u6bd4\u7279\u5e01<br \/>StateDirectory=bitcond StateDirectoryMode=0710<br \/>\u786c\u5316\u63aa\u65bd<br \/>####################<br \/>\u63d0\u4f9b\u79c1\u6709\/tmp\u548c\/var\/tmp\u3002<br \/>PrivateTmp=\u771f<br \/>\u62d2\u7edd\u8bbf\u95ee\/home\u3001\/root\u548c\/run\/user<br \/>ProtectHome=\u771f<br \/>\u8fdb\u7a0b\u7684Mount\/usr\u3001\/boot\/\u548c\/etc\u4e3a\u53ea\u8bfb\u3002<br \/>ProtectSystem=\u5df2\u6ee1<br \/>\u4e0d\u5141\u8bb8\u8fdb\u7a0b\u53ca\u5176\u6240\u6709\u5b50\u8fdb\u7a0b\u83b7\u5f97<br \/>\u901a\u8fc7execve\uff08\uff09\u83b7\u5f97\u65b0\u6743\u9650\u3002<br \/>NoNewPrivileges=\u771f<br \/>\u4f7f\u7528\u4ec5\u586b\u5145\u4e86API\u4f2a\u8bbe\u5907\u7684\u65b0\/dev\u547d\u540d\u7a7a\u95f4<br \/>\u4f8b\u5982\/dev\/null\u3001\/dev\/zero\u548c\/dev\/random\u3002<br \/>PrivateDevices=\u771f<br \/>\u62d2\u7edd\u521b\u5efa\u53ef\u5199\u548c\u53ef\u6267\u884c\u5185\u5b58\u6620\u5c04\u3002<br \/>memoryDNyWriteExecute=\u771f<br \/>[\u5b89\u88c5]WantedBy=\u591a\u7528\u6237.target<br \/>\u4e0b\u9762\u662f\u6211\u4e4b\u524d\u505a\u7684\u6b65\u9aa4\uff1a~$cd src~\/src$git clone&#8211;depth 1&#8211;branch v0.20.1https:\/\/github.com\/bitcoin\/bitcoin.git ~\/src$cd bitcoin~\/src\/bitcoin$\u3002\/contrib\/install\\u db4.sh pwd~\/src\/bitcoin$\u3002\/autogen.sh~\/src\/bitcoin$export BDB\\u PREFIX=&#8217;\/home\/ubuntu\/src\/bitcoin\/db4&#8217;~\/src\/bitcoin$\u3002\/configure BDB\\u LIBS=\u201c-L${BDB\\u PREFIX}\/lib-ldb\\u cxx-4.8\u201cBDB\\u CFLAGS=\u201d-I${BDB\\u PREFIX}\/include\u201c~\/src\/bitcoin$make~\/src\/bitcoin$sudo make install~\/src\/bitcoin$bitcoind-version vi bitcoin.conf server=1<br \/>rpcbind=127.0.0.1<br \/>\u767d\u540d\u5355=127.0.0.1<br \/>rpcallowip=127.0.0.1\/32<br \/>ZMQ\u5b50\u5757=tcp:\/\/127.0.0.1:28332<br \/>ZMQubrawtx\u516c\u53f8=tcp:\/\/127.0.0.1:28333<br \/>~$sudo mkdir-p\/etc\/bitcoin~$sudo cp bitcoin.conf\/etc\/bitcoin~$sudo chmod 644\/etc\/bitcoin\/bitcoin.conf<br \/>\u6700\u540e\u6211\u5f97\u5230\u4e86ubuntusystemd[1]\uff1a\u542f\u52a8\u6bd4\u7279\u5e01\u5b88\u62a4\u8fdb\u7a0b\u5931\u8d25\u3002<br \/>\u6bd4\u7279\u5e01<br \/>\u5206\u4eab<br \/>\u6539\u8fdb\u8fd9\u4e2a\u95ee\u9898<br \/>\u8ddf\u968f<br \/>12\u670831\u65e515:27\u95ee<br \/>\u5e03\u83b1\u6069B4<br \/>111\u9752\u94dc\u5fbd\u7ae0<br \/>\u6211\u8ba4\u4e3a\u6700\u597d\u5728\u6bd4\u7279\u5e01\u6838\u5fc3\u95ee\u9898\u8ffd\u8e2a\u7cfb\u7edf\u4e2d\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u770b\u5230\u4f60\u5df2\u7ecf\u6253\u5f00\u4e86\u4e00\u4e2a\u95ee\u9898\u3002\u56e0\u6b64\uff0c\u6700\u597d\u5728github.com\/bitcoin\/bitcoin\/issues\/20818\u2013Michael Folkson 12\u670831\u65e516:35\u7ed3\u675f\u8fd9\u4e2aStackExchange\u95ee\u9898<br \/>\u6dfb\u52a0\u8bc4\u8bba<br \/>1\u4e2a\u7b54\u6848<br \/>0<br \/>\u5982\u679c\u60a8\u4f7f\u7528PPA\u5b89\u88c5Bitcoin core\uff0c\u5219\u610f\u5473\u7740\u60a8\u7684\u811a\u672c\u5728\u9519\u8bef\u7684\u4f4d\u7f6e\u67e5\u627eBitcoin\u3002<br \/>\u8981\u786e\u8ba4bitcoind\u7684\u5b89\u88c5\u4f4d\u7f6e\uff0c\u8bf7\u4f7f\u7528whereis bitcoind<br \/>\u8fd9\u53ef\u80fd\u4f1a\u8fd4\u56de\/usr\/local\/bin\/bitcoind\uff0c\u73b0\u5728\u60a8\u7684\u811a\u672c\u6b63\u5728\/usr\/bin\/bitcoind\u4e2d\u67e5\u627e\u5b83\uff0c\u56e0\u6b64\u60a8\u53ef\u4ee5\u5c06\u5b83\u590d\u5236\u5230\u8be5\u76ee\u5f55\u4e2d<br \/>sudo cp\/usr\/local\/bin\/bitcoind\/usr\/bin\/bitcoind<br \/>\u6216\u8005\u66f4\u6539\u811a\u672c\u4ee5\u5728\/usr\/local\/bin\/bitcoind\u4e2d\u67e5\u627e\u5b83<br \/>\u5206\u4eab<br \/>\u6539\u8fdb\u8fd9\u4e2a\u7b54\u6848<br \/>\u8ddf\u968f<\/p>\n<p><a href=\"http:\/\/43.153.210.228\/\/wp-content\/uploads\/2021\/06\/319blockchainBTCwww.qkl91.com_.jpg\"><img loading=\"lazy\" decoding=\"async\" title=\"\u65f6\u5149\u7d20\u6750-\u9999\u8f66\u7f8e\u5973  (319)blockchainBTC\u6bd4\u7279\u5e01\u533a\u5757\u94fewww.qkl91.com\" style=\"border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline\" border=\"0\" alt=\"\u65f6\u5149\u7d20\u6750-\u9999\u8f66\u7f8e\u5973  (319)blockchainBTC\u6bd4\u7279\u5e01\u533a\u5757\u94fewww.qkl91.com\" src=\"http:\/\/43.153.210.228\/\/wp-content\/uploads\/2021\/06\/319blockchainBTCwww.qkl91.com_thumb.jpg\" width=\"459\" height=\"687\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u563f\uff0c\u6211\u6bcf\u6b21\u8fd0\u884csudo systemctl enable\u65f6\u90fd\u4f1a\u9047\u5230\u8fd9\u4e2a\u9519\u8bef\u2014\u2014\u73b0\u5728\u662fbitconidbitco [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6504","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts\/6504"}],"collection":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6504"}],"version-history":[{"count":1,"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts\/6504\/revisions"}],"predecessor-version":[{"id":6505,"href":"http:\/\/43.153.210.228\/index.php?rest_route=\/wp\/v2\/posts\/6504\/revisions\/6505"}],"wp:attachment":[{"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6504"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/43.153.210.228\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}