{"id":370,"date":"2021-12-18T12:33:32","date_gmt":"2021-12-18T04:33:32","guid":{"rendered":"http:\/\/itony.ml\/?p=370"},"modified":"2021-12-18T12:33:32","modified_gmt":"2021-12-18T04:33:32","slug":"%e4%bd%bf%e7%94%a8docker%e6%90%ad%e5%bb%baaria2ariang%ef%bc%8c%e6%89%93%e9%80%a0%e8%87%aa%e5%b7%b1%e7%9a%84%e7%a6%bb%e7%ba%bf%e4%b8%8b%e8%bd%bd%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/itony.cc\/?p=370","title":{"rendered":"\u4f7f\u7528Docker\u642d\u5efaaria2+AriaNg\uff0c\u6253\u9020\u81ea\u5df1\u7684\u79bb\u7ebf\u4e0b\u8f7d\u670d\u52a1\u5668"},"content":{"rendered":"<h1 id=\"\u4e00docker\u5b89\u88c5aria2dokcer\u81ea\u8eab\u7684\u5b89\u88c5\u8bf7\u81ea\u884c\u767e\u5ea6\">\u4e00\u3001Docker\u5b89\u88c5aria2\uff08Dokcer\u81ea\u8eab\u7684\u5b89\u88c5\u8bf7\u81ea\u884c\u767e\u5ea6\uff09<\/h1>\n<h2>0.\u5b89\u88c5docker\uff1acurl -sSL https:\/\/get.docker.com\/ | sh<\/h2>\n<p>\u542f\u52a8docker\uff1asystemctl start docker\u3002\u5f00\u673a\u542f\u52a8\uff1asystemctl enable docker<\/p>\n<h2 id=\"1\u4f7f\u7528\u62c9\u53d6aria2\u955c\u50cf\">1\u3001\u4f7f\u7528\u62c9\u53d6aria2\u955c\u50cf<\/h2>\n<pre><code class=\"hljs apache\"><span class=\"hljs-attribute\">docker<\/span> pull p<span class=\"hljs-number\">3<\/span>terx\/aria<span class=\"hljs-number\">2<\/span>-pro\r\n<\/code><\/pre>\n<h2 id=\"2\u542f\u52a8\u5bb9\u5668\">2\u3001\u542f\u52a8\u5bb9\u5668<\/h2>\n<pre><code class=\"hljs properties\"><span class=\"hljs-attr\">docker<\/span> <span class=\"hljs-string\">run -d \\\r\n--name aria2 \\\r\n--restart unless-stopped \\\r\n--log-opt max-size=1m \\\r\n-e PUID=$UID \\\r\n-e PGID=$GID \\\r\n-e UMASK_SET=022 \\\r\n-e RPC_SECRET=\u5bc6\u7801 \\\r\n-e RPC_PORT=6800 \\\r\n-e LISTEN_PORT=6888 \\\r\n-p 16800:6800 \\\r\n-p 16888:6888 \\\r\n-p 16888:6888\/udp \\\r\n-v \/root\/aria2\/config:\/config \\\r\n-v \/root\/aria2\/downloads:\/downloads \\\r\np3terx\/aria2-pro<\/span>\r\n<\/code><\/pre>\n<h3 id=\"\u542f\u52a8\u5bb9\u5668\u547d\u4ee4\u53c2\u6570\u8be6\u89e3\">\u542f\u52a8\u5bb9\u5668\u547d\u4ee4\u53c2\u6570\u8be6\u89e3<\/h3>\n<ul>\n<li>\u7528\u6237\u548c\u7ec4\u8bbe\u5b9a\uff1a<br \/>\nPUID=$UID\u3001PGID=$GID\u8fd92\u4e2a\u5b9a\u4e49\u7528\u6237\u548c\u7528\u6237\u7ec4\u7684\u73af\u5883\u53d8\u91cf\uff0c\u9650\u5b9a\u4e86aria2\u4ee5\u4ec0\u4e48\u7528\u6237\u548c\u7528\u6237\u7ec4\u8fd0\u884c\uff0c\u4e0d\u6307\u5b9a\u5219\u9ed8\u8ba4\u4f7f\u7528nobady\u7528\u6237\u548cnogroup\u7528\u6237\u7ec4\uff0c\u4f46\u5728\u4f7f\u7528FileRun\u7f51\u76d8\u65f6\uff0c\u4f1a\u56e0\u6743\u9650\u95ee\u9898\u65e0\u6cd5\u5220\u9664\u6216\u6539\u540daria2\u4e0b\u8f7d\u597d\u7684\u6587\u4ef6\uff0c\u6240\u4ee5PUID\u548cGUID\u8981\u6307\u5b9a\u4e3a\u548cWEB\u73af\u5883\u7684\u8fd0\u884c\u7528\u6237\u548c\u7528\u6237\u7ec4\u4e00\u81f4\uff0c\u6bd4\u5982WEB\u73af\u5883\u8fd0\u884c\u7684\u7528\u6237\u53ca\u5bf9\u5e94\u7684\u7528\u6237\u7ec4\u90fd\u662fWWW\uff0c\u5bf9\u5e94\u7684uid\u548cgid\u90fd\u662f1001\uff0c\u90a3\u5c31\u8981\u6307\u5b9aPUID=1001\u3001PGID=1001\uff0c\u8fd9\u6837\u5728FileRun\u7f51\u76d8\u4e2d\u5c31\u53ef\u4ee5\u6b63\u5e38\u7684\u8fdb\u884c\u5220\u9664\u548c\u4fee\u6539\u64cd\u4f5c\u4e86\uff1b<\/li>\n<li>\u51e0\u4e2a\u73af\u5883\u53d8\u91cf:<br \/>\n-e UMASK_SET=022 \uff0c\u8bbe\u7f6eumask\uff0c\u9ed8\u8ba4\u503c022\uff1b<br \/>\n-e RPC_SECRET=\uff0c\u8bbe\u7f6eRPC\u5bc6\u94a5\uff0c\u7528\u4e8eAriaNg\u4e0eAria2\u7684\u901a\u8baf\u9a8c\u8bc1\u4f7f\u7528\uff1b<br \/>\n-e RPC_PORT=6800\uff0c\u8bbe\u7f6ePRC\u901a\u8baf\u7aef\u53e3\uff08\u4e0e\u5bbf\u4e3b\u4e3b\u673a\u7684\u7aef\u53e3\u6620\u5c04\u4e00\u81f4\uff09\uff1b<br \/>\n-e LISTEN_PORT=6888\uff0cBT \u76d1\u542c\u7aef\u53e3\uff08TCP\uff09\u3001DHT \u76d1\u542c\u7aef\u53e3\uff08UDP\uff09\u8bbe\u7f6e\uff0c\u5373 Aria2 \u914d\u7f6e\u4e2dlisten-port\u4e0edht-listen-port\u9009\u9879\u5b9a\u4e49\u7684\u7aef\u53e3\u3002\u5982\u679c\u6ca1\u6709\u8bbe\u7f6e\uff0c\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u9ed8\u8ba4\u503c\u4e3a6888\u3002<\/li>\n<li>\u5bb9\u5668\u76ee\u5f55\u6302\u8f7d\uff0c\u5c06\/downloads\u6302\u8f7d\u5230\u5bbf\u4e3b\u4e3b\u673a\u7684\/root\/aria2\/downloads:\/downloads\u76ee\u5f55\uff0c\u5373FileRun\u7684\u6570\u636e\u76ee\u5f55\u4e2d\uff0c\u65b9\u4fbf\u4e0b\u8f7d\u5b8c\u6210\u76f4\u63a5\u5728\u7f51\u76d8\u4e2d\u67e5\u770b\uff1b\u914d\u7f6e\u6587\u4ef6\u6302\u8f7d\u5230\u6307\u5b9a\u7684\u5bbf\u4e3b\u4e3b\u673a\u76ee\u5f55\/root\/aria2\/config\u4e2d\uff0c\u5bbf\u4e3b\u4e3b\u673a\u7684\u76ee\u5f55\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u81ea\u884c\u4fee\u6539\uff1b<\/li>\n<li>3\u4e2a\u7aef\u53e3\u6620\u5c04\uff1a<br \/>\n-p 16800:6800\uff0c\u4e3aRPC \u901a\u8baf\u7aef\u53e3\u6620\u5c04\uff1b<br \/>\n-p 16888:6888\uff0c\u4e3aBT \u76d1\u542c\u7aef\u53e3\uff08TCP\uff09\u6620\u5c04\uff0c\u5373 Aria2 \u914d\u7f6e\u4e2dlisten-port\u9009\u9879\u5b9a\u4e49\u7684\u7aef\u53e3\uff1b<br \/>\n-p 16888:6888\/udp\uff0c\u4e3aDHT \u76d1\u542c\u7aef\u53e3\uff08UDP\uff09\u6620\u5c04\uff0c\u5373 Aria2 \u914d\u7f6e\u4e2ddht-listen-port\u9009\u9879\u5b9a\u4e49\u7684\u7aef\u53e3\u3002<\/li>\n<\/ul>\n<h1 id=\"\u4e8cdocker\u5b89\u88c5ariang\">\u4e8c\u3001Docker\u5b89\u88c5AriaNg<\/h1>\n<h2 id=\"1\u62c9\u53d6ariang\u955c\u50cf\">1\u3001\u62c9\u53d6AriaNg\u955c\u50cf<\/h2>\n<pre><code class=\"hljs apache\"><span class=\"hljs-attribute\">docker<\/span> pull p<span class=\"hljs-number\">3<\/span>terx\/ariang\r\n<\/code><\/pre>\n<h2 id=\"2\u542f\u52a8\u5bb9\u5668-1\">2\u3001\u542f\u52a8\u5bb9\u5668<\/h2>\n<pre><code class=\"hljs properties\"><span class=\"hljs-attr\">docker<\/span> <span class=\"hljs-string\">run -d \\\r\n--name ariang \\\r\n--log-opt max-size=1m \\\r\n--restart unless-stopped \\\r\n-p 16880:6880 \\\r\np3terx\/ariang<\/span>\r\n<\/code><\/pre>\n<h2 id=\"3\u8bbf\u95ee-http\u4f60\u7684\u670d\u52a1\u5668ip16880-\u8bbf\u95eeariang\u7684web\u7ba1\u7406\u754c\u9762\u70b9\u51fbariang-\u8bbe\u7f6e\u83dc\u5355\u518d\u70b9\u51fb\u5168\u5c40\u53f3\u8fb9\u7684\u6807\u7b7e\">3\u3001\u8bbf\u95ee\u00a0<a href=\"http:\/\/xn--ip-0p3cl7jf7fo83a16x:16880\/\" target=\"_blank\" rel=\"noopener\">http:\/\/\u4f60\u7684\u670d\u52a1\u5668ip:16880<\/a>\u00a0\u8bbf\u95eeAriaNg\u7684web\u7ba1\u7406\u754c\u9762\uff0c\u70b9\u51fb\u201cAriaNg \u8bbe\u7f6e\u201d\u83dc\u5355\uff0c\u518d\u70b9\u51fb\u201c\u5168\u5c40\u201d\u53f3\u8fb9\u7684\u6807\u7b7e<\/h2>\n<p><img decoding=\"async\" class=\"medium-zoom-image\" src=\"http:\/\/itony.ml\/wp-content\/uploads\/2021\/12\/7a227-1543487-20210427171216788-1644083683.png\" alt=\"\" \/><\/p>\n<h2 id=\"4\u914d\u7f6erpc\">4\u3001\u914d\u7f6eRPC<\/h2>\n<p><img decoding=\"async\" class=\"medium-zoom-image\" src=\"http:\/\/itony.ml\/wp-content\/uploads\/2021\/12\/708c7-1543487-20210427171409009-1927819314.png\" alt=\"\" \/><\/p>\n<ul>\n<li>RPC\u522b\u540d\u968f\u610f\u586b\u5c31\u597d<\/li>\n<li>RPC\u5730\u5740\u586b\u5199\u4f60\u670d\u52a1\u5668\u7684<strong>\u57df\u540d\u6216IP<\/strong>\uff0c\u540e\u9762\u7684\u7aef\u53e3\u53f7\u5c31\u662f\u524d\u9762\u542f\u52a8\u7684<strong>aria2\u7684RPC\u901a\u8baf\u7aef\u53e3:16880<\/strong><\/li>\n<li>RPC\u534f\u8bae\u9009\u9ed8\u8ba4\u7684HTTP<\/li>\n<li>RPC Http\u8bf7\u6c42\u65b9\u6cd5\u4f7f\u7528\u9ed8\u8ba4\u7684POST<\/li>\n<li>RPC\u5bc6\u94a5\u586b\u5199\u524d\u9762\u542f\u52a8\u7684<strong>aria2\u7684RPC\u5bc6\u94a5<\/strong><\/li>\n<\/ul>\n<h2 id=\"5\u914d\u7f6e\u5b8c\u5237\u65b0\u4e00\u4e0b\u9875\u9762\u5982\u679c\u72b6\u6001\u663e\u793a\u5df2\u8fde\u63a5\u5c31ok\u4e86\">5\u3001\u914d\u7f6e\u5b8c\u5237\u65b0\u4e00\u4e0b\u9875\u9762\uff0c\u5982\u679c\u72b6\u6001\u663e\u793a\u201c\u5df2\u8fde\u63a5\u201d\u5c31ok\u4e86<\/h2>\n<p><img decoding=\"async\" src=\"http:\/\/itony.ml\/wp-content\/uploads\/2021\/12\/8f9f0-1543487-20210427172219144-596983136.png\" alt=\"\" \/><\/p>\n<h2 id=\"6\u6765\u770b\u4e00\u4e0b\u6548\u679c\u5427\">6\u3001\u6765\u770b\u4e00\u4e0b\u6548\u679c\u5427<\/h2>\n<p><img decoding=\"async\" class=\"medium-zoom-image\" src=\"http:\/\/itony.ml\/wp-content\/uploads\/2021\/12\/ca5a5-1543487-20210427173030369-1334451765.png\" alt=\"\" \/><br \/>\n<img decoding=\"async\" class=\"medium-zoom-image\" src=\"http:\/\/itony.ml\/wp-content\/uploads\/2021\/12\/953b9-1543487-20210427173120874-1696564199.png\" alt=\"\" \/><\/p>\n<h2 id=\"ps\u81f3\u4e8e\u600e\u4e48\u7528\u76f8\u4fe1\u5927\u5bb6\u5e94\u8be5\u90fd\u4f1a\u5427\u987a\u5e26\u63d0\u4e00\u4e0bchrome\u6d4f\u89c8\u5668\u914d\u5408\u6cb9\u7334\u63d2\u4ef6\u53ef\u4ee5\u6109\u5feb\u7684\u79bb\u7ebf\u4e0b\u8f7d\u767e\u5ea6\u7f51\u76d8\u7684\u6587\u4ef6\u54e6\u5982\u679c\u6709\u4e0d\u61c2\u7684\u53ef\u4ee5\u7559\u8a00\u6216\u8005\u79c1\u4fe1\u6211\u770b\u5230\u90fd\u4f1a\u56de\u590d\u7684\u5982\u679c\u8fd9\u7bc7\u535a\u6587\u5bf9\u4f60\u6709\u5e2e\u52a9\u8bf7\u7ed9\u4e2a\u5173\u6ce8\u6216\u8005\u63a8\u8350\u5427\">PS:\u81f3\u4e8e\u600e\u4e48\u7528\u76f8\u4fe1\u5927\u5bb6\u5e94\u8be5\u90fd\u4f1a\u5427\uff0c\u987a\u5e26\u63d0\u4e00\u4e0bchrome\u6d4f\u89c8\u5668\u914d\u5408\u6cb9\u7334\u63d2\u4ef6\u53ef\u4ee5\u6109\u5feb\u7684\u79bb\u7ebf\u4e0b\u8f7d\u767e\u5ea6\u7f51\u76d8\u7684\u6587\u4ef6\u54e6\uff0c\u5982\u679c\u6709\u4e0d\u61c2\u7684\u53ef\u4ee5\u7559\u8a00\u6216\u8005\u79c1\u4fe1\uff0c\u6211\u770b\u5230\u90fd\u4f1a\u56de\u590d\u7684\u3002<span style=\"color: red;\">\u5982\u679c\u8fd9\u7bc7\u535a\u6587\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u8bf7\u7ed9\u4e2a\u5173\u6ce8\u6216\u8005\u63a8\u8350\u5427!<\/span><\/h2>\n<p>\u8f6c\u8f7d\uff1ahttps:\/\/www.cnblogs.com\/wqp001\/p\/14709997.html<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001Docker\u5b89\u88c5aria2\uff08Dokcer\u81ea\u8eab\u7684\u5b89\u88c5\u8bf7\u81ea\u884c\u767e\u5ea6\uff09 0.\u5b89\u88c5docker\uff1acurl -sSL  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-370","post","type-post","status-publish","format-standard","hentry","category-3"],"_links":{"self":[{"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts\/370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=370"}],"version-history":[{"count":1,"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts\/370\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/itony.cc\/index.php?rest_route=\/wp\/v2\/posts\/370\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itony.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}