{"id":67159,"date":"2015-03-22T02:45:46","date_gmt":"2015-03-21T18:45:46","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=67159"},"modified":"2015-03-22T02:45:46","modified_gmt":"2015-03-21T18:45:46","slug":"%e5%af%bb%e6%89%be%e6%9c%80%e5%bf%ab%e7%9a%84debian%e6%ba%90","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2015\/03\/22\/67159.htm","title":{"rendered":"\u5bfb\u627e\u6700\u5feb\u7684Debian\u6e90"},"content":{"rendered":"<p>debian\u7684\u7231\u597d\u8005\u65e9\u51c6\u5907\u4e86\u66f4\u5389\u5bb3\u7684\u6b66\u5668\u7b49\u60a8\u6765\u7528\uff0c\u5c31\u662fapt-spy\uff08\u662f\u95f4\u8c0d\u8fd8\u662f\u5c0f\u5077\uff1f\u54c8\u54c8\uff09\u3002<br \/>\n<span style=\"color: #ff0000;\">\u5207\u8bb0\u5148\u5907\u4efd\u60a8\u673a\u5668\u91cc\u7684\u6e90\u5217\u8868<\/span>\u3002\u8bef\u533a\uff1a\u901a\u5e38\u5927\u5bb6\u90fd\u5728\u4ea4\u6d41\u4f7f\u7528\u56fd\u5185\u7684\u54ea\u4e2a\u6e90\u901f\u5ea6\u6bd4\u8f83\u5feb\uff0c\u5b9e\u9645\u4e0a\u5f88\u591a\u5916\u56fd\u6e90\u7684\u8bbf\u95ee\u901f\u5ea6\u662f\u56fd\u5185\u7684\u5f88\u591a\u500d\u3002\u8bb0\u5f97\u66fe\u7528\u8fc7\u5916\u56fd\u67d0\u5927\u5b66\u7684\u6e90\uff0c\u901f\u5ea6\u662f200k\u4ee5\u4e0a\u3002\u65e5\u672c\u7684\u90e8\u5206\u6e90\u80fd\u591f\u8fbe\u5230500k\u4ee5\u4e0a\u3002\u6700\u8fd1\u53d1\u73b0\u53f0\u6e7e\u7684\u4e3b\u6620\u50cf\u5728\u6211\u8fd9\u91cc\u4e0b\u8f7d\u901f\u5ea6\u5c45\u7136\u662f1084k\uff0c\u8fbe\u52301M\u6bcf\u79d2\u3002\u4e0d\u5fd9\u7684\u65f6\u5019\uff0c\u8bd5\u8bd5\u770b\uff0c\u5047\u5982\u65f6\u95f4\u591f\u591a\uff0c\u80fd\u591f\u8003\u8651\u4e0d\u9650\u5b9a\u4e3a\u4e9a\u6d32\uff0c\u8fd9\u6837\u6709\u53ef\u80fd\u627e\u5230\u66f4\u5feb\u7684\u6620\u50cf\u6e90\u3002<\/p>\n<p>\u8f6c\u81ea\u5b98\u65b9\u7684\u4e00\u90e8\u5206\u8bf4\u660e\uff1a<br \/>\n&#8216;apt-spy&#8217;\u4f1a\u6839\u636e\u7ad9\u70b9\u56de\u5e94\u65f6\u95f4\u548c\u5e26\u5bbd\u81ea\u52a8\u521b\u5efa`sources.list&#8217;\u3002<br \/>\n#sudo apt-get install apt-spy<br \/>\n#sudo mv \/etc\/apt\/sources.list \/etc\/apt\/sources.list.bak \/\/backup<br \/>\n#man apt-spy \/\/\u83b7\u53d6\u5468\u8be6\u7684\u4f7f\u7528\u65b9\u6cd5<br \/>\n#sudo apt-spy update \/\/\u66f4\u65b0\u60a8\u7684\u6620\u50cf\u5217\u8868\u6587\u6863 \/var\/lib\/apt-spy\/mirrors.txt<br \/>\n#sudo apt-spy -d testing -a Asia \/\/\u5728\u4e9a\u6d32\u533a\u5bfb\u627e\u901f\u5ea6\u6700\u5feb\u7684testing\u7248\u6620\u50cf,\u5e76\u751f\u6210 sources.list\u6587\u6863,\u4e5f\u53ef\u4f7f\u7528-o \u53c2\u6570\u6307\u5b9a\u5199\u5165\u6587\u6863<br \/>\napt-spy \u662f\u4e2a\u7ba1\u7406\u5b89\u88c5\u5a92\u4f53\u7684\u7a0b\u5f0f\uff0c\u4f7f\u7528\u65b9\u6cd5\u7b80\u5355\u4ecb\u7ecd\u4e00\u4e0b\uff1a<br \/>\n\u4f7f\u7528\u65b9\u6cd5: apt-spy [options]<br \/>\n\u9009\u9879\uff1a<br \/>\n-d distribution \u9009\u62e9 debian \u7684\u53d1\u884c\u7248\u672c\uff0c\u4f8b\u5982 stable \u3002\u9664\u5347\u7ea7\u5916\uff0c\u5fc5\u987b\u4f7f\u7528\u6b64\u53c2\u6570\u3002<br \/>\n-a area \u9009\u62e9\u8fdb\u884c\u6d4b\u8bd5\u7684\u533a\u57df\uff0c\u4f8b\u5982 Aisa \u3002<br \/>\n-c config \u6307\u5b9a\u914d\u7f6e\u6587\u6863\u3002<br \/>\n-e number \u6307\u5b9a\u6d4b\u8bd5\u7684\u670d\u52a1\u5668\u6570\u91cf\u3002<br \/>\n-f file \u6d4b\u8bd5\u65f6\u6293\u53d6\u5b9a\u5236\u7684\u6587\u6863\uff08\u6587\u6863\u76f8\u5bf9 debian base \u7684\u8def\u5f84\uff09\u3002<br \/>\n-i file \u6307\u5b9a\u8f93\u5165\u7684\u6587\u6863\uff0c\u914d\u5408 -w \u53c2\u6570\u4f7f\u7528\u3002<br \/>\n-m mirror-list \u6307\u5b9a\u8981\u5347\u7ea7\u7684\u6620\u50cf\u5217\u8868\u6587\u6863\u3002<br \/>\n-o output-file \u91cd\u5b9a\u5411\u8f93\u51fa\u5230\u6307\u5b9a\u6587\u6863\u3002<br \/>\n-p proxy \u6307\u5b9a\u4f7f\u7528\u7684\u4ee3\u7406\u670d\u52a1\u5668\uff0c\u9700\u8981\u9075\u4ece [server]:[port] \u7684\u683c\u5f0f\u3002<br \/>\n-s country_list \u6307\u5b9a\u8981\u8fdb\u884c\u6d4b\u8bd5\u7684\u56fd\u5bb6\u3002\u4e0d\u80fd\u548c -a \u53c2\u6570\u540c\u65f6\u4f7f\u7528\u3002<br \/>\n-t time \u6307\u5b9a\u8fdb\u884c\u6d4b\u8bd5\u65f6\u6bcf\u53f0\u670d\u52a1\u5668\u7684\u8d85\u65f6\u65f6\u95f4\uff0c\u53ea\u80fd\u662f\u6b63\u6574\u6570\u3002<br \/>\n-u update-URL \u4ece\u6307\u5b9a\u7684 URL \u83b7\u5f97\u6620\u50cf\u5217\u8868\u66f4\u65b0\u3002<br \/>\n-w file \u8f93\u51fa -i \u53c2\u6570\u63d0\u4f9b\u7684\u670d\u52a1\u5668\u5217\u8868\u4e2d\u901f\u5ea6\u6700\u5feb\u7684\u524d\u51e0\u53f0\u6620\u50cf\u670d\u52a1\u5668\uff08\u7f3a\u7701\u662f\u524d 5 \u53f0\uff09\u3002<br \/>\n-n number \u5b9a\u5236 -w \u53c2\u6570\u8f93\u51fa\u7684\u670d\u52a1\u5668\u6570\u91cf\u3002<br \/>\n-v \u8f93\u51fa\u7248\u672c\u4fe1\u606f\u3002<br \/>\n-h \u8f93\u51fa\u5f53\u524d\u5e2e\u52a9\u4fe1\u606f<br \/>\nupdate \u5347\u7ea7\u6620\u50cf\u7ad9\u70b9\u5217\u8868\u3002<br \/>\n\u6709\u610f\u601d\u7684\u662f\u7f51\u4e0a\u5e38\u89c1\u7684\u6587\u6863\u90fd\u53ea\u4ecb\u7ecd\u4e86\u5f88\u5c11\u51e0\u4e2a\u53c2\u6570\u7684\u4f5c\u7528\uff0c\u6240\u4ee5\u770b\u5230\u597d\u591a\u201d\u4e8c\u624b\u6587\u6863\u201d\u91cc\u9762\u8bf4\u6d4b\u8bd5\u6620\u50cf\u670d\u52a1\u5668\u901f\u5ea6\u7684\u65f6\u5019\u00a0\u00a0\u00a0\u00a0\uff08apt-spy -d testing -a Asia\uff09\u9700\u8981\u5f88\u957f\u65f6\u95f4\u3002\u5176\u5b9e\uff0c\u53ea\u8981\u52a0\u4e00\u4e2a\u53c2\u6570 -t \u6307\u5b9a\u8d85\u65f6\u65f6\u95f4\u5c31\u80fd\u591f\u5927\u5927\u52a0\u901f\u8fd9\u4e2a\u8fc7\u7a0b\uff08\u81f3\u5c11\u5feb 10 \u500d\uff09\u3002<\/p>\n<p>\u6211\u7684\u8865\u5145\uff1a<\/p>\n<p>\u5907\u4efd\u4f60\u7684\/etc\/apt\/sources.list<br \/>\napt-get install apt-spy<br \/>\napt-spy -d testing -a Asia -t 3<br \/>\n\u5c06\u751f\u6210\u7684\u6587\u4ef6\u66ff\u6362\u539f\u6765\u7684\/etc\/apt\/sources.list<\/p>\n","protected":false},"excerpt":{"rendered":"<p>debian\u7684\u7231\u597d\u8005\u65e9\u51c6\u5907\u4e86\u66f4\u5389\u5bb3\u7684\u6b66\u5668\u7b49\u60a8\u6765\u7528\uff0c\u5c31\u662fapt-spy\uff08\u662f\u95f4\u8c0d\u8fd8\u662f\u5c0f\u5077\uff1f\u54c8\u54c8\uff09\u3002 \u5207\u8bb0\u5148\u5907\u4efd\u60a8\u673a\u5668\u91cc\u7684\u6e90\u5217\u8868\u3002\u8bef\u533a\uff1a\u901a\u5e38\u5927\u5bb6\u90fd\u5728\u4ea4\u6d41\u4f7f\u7528\u56fd\u5185\u7684\u54ea\u4e2a\u6e90\u901f\u5ea6\u6bd4\u8f83\u5feb\uff0c\u5b9e\u9645\u4e0a\u5f88\u591a\u5916\u56fd\u6e90\u7684\u8bbf\u95ee\u901f\u5ea6\u662f\u56fd\u5185\u7684\u5f88\u591a\u500d\u3002\u8bb0\u5f97\u66fe\u7528\u8fc7\u5916\u56fd\u67d0\u5927\u5b66\u7684\u6e90&#8230;<\/p>\n","protected":false},"author":1,"featured_media":67160,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[107,1,7],"tags":[113],"topic":[],"class_list":["post-67159","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-nas","category-technology","category-server","tag-debian"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=67159"}],"version-history":[{"count":1,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67159\/revisions"}],"predecessor-version":[{"id":67161,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67159\/revisions\/67161"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media\/67160"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=67159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=67159"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=67159"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=67159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}