{"id":82462,"date":"2020-05-14T02:20:03","date_gmt":"2020-05-13T18:20:03","guid":{"rendered":"http:\/\/4563.org\/?p=82462"},"modified":"2020-05-14T02:20:03","modified_gmt":"2020-05-13T18:20:03","slug":"%e7%94%a8gcp%e7%99%bd%e7%a5%a8%e4%b8%ad%e8%bd%ac%e4%b8%8e%e4%b8%8b%e8%bd%bd","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=82462","title":{"rendered":"\u7528GCP\u767d\u7968\u4e2d\u8f6c\u4e0e\u4e0b\u8f7d"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u94c5\u7b14<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>\u7528GCP\u767d\u7968\u4e2d\u8f6c\u4e0e\u4e0b\u8f7d<\/h3>\n<p>  \t\t\u7531\u4e8eGCP\u5230gdrive\u7684\u6d41\u91cf\u662f\u514d\u8d39\u7684,\u6240\u4ee5\u53ef\u4ee5\u7528aria2\u79bb\u7ebf\u4e0b\u8f7d\u4e0a\u4f20GCP\u56e2\u961f\u76d8 \u518d\u901a\u8fc7CF\u642d\u5efa\u7684GDindex\u4e0b\u8f7d\u4e5f\u53ef\u4ee5\u7528\u4e8e\u4e2d\u8f6c \u53ea\u8981aria2\u80fd\u4e0b\u8f7d\u7684\u90fd\u53ef\u4ee5\u4e2d\u8f6c\u5230\u56e2\u961f\u76d8<\/p>\n<p>  GCP\u6d41\u91cf\u8bf4\u660e <br \/>  https:\/\/i.loli.net\/2020\/05\/14\/g1vTx2U5LRWObA8.jpg<\/p>\n<p>  GCP\u5207\u6362ROOT\u767b\u9646<br \/>  sudo -i&nbsp; &nbsp;\/\/\u5207\u6362\u5230root\u7528\u6237<br \/>  vi \/etc\/ssh\/sshd_config \/\/\u7f16\u8f91\u6587\u4ef6<br \/>  # Authentication:<br \/>  PermitRootLogin yes \/\/\u9ed8\u8ba4\u4e3ano\uff0c\u9700\u8981\u5f00\u542froot\u7528\u6237\u8bbf\u95ee\u6539\u4e3ayes<br \/>  # Change to no to disable tunnelled clear text passwords<br \/>  PasswordAuthentication yes \/\/\u9ed8\u8ba4\u4e3ano\uff0c\u6539\u4e3ayes\u5f00\u542f\u5bc6\u7801\u767b\u9646<br \/>  service sshd restart<\/p>\n<p>  \u56e2\u961f\u76d8\u7533\u8bf7:https:\/\/www.hostloc.com\/thread-684825-1-1.html<\/p>\n<p>  \u7533\u8bf7\u5b8c\u4e4b\u540e\u767b\u9646\u70b9\u51fb\u56e2\u961f\u76d8 \u4f1a\u51fa\u73b0\u8fd9\u4e2a\u5730\u5740 https:\/\/drive.google.com\/drive\/folders\/**********&nbsp; &nbsp;&quot;*\u4ee3\u8868\u56e2\u961f\u76d8\u76ee\u5f55ID&quot;<\/p>\n<p>  https:\/\/i.loli.net\/2020\/05\/14\/KXH84tD2JmGlIEP.jpg<\/p>\n<p>  \u5b89\u88c5rclone<\/p>\n<p>  apt install wget curl ca-certificates unzip -y<\/p>\n<p>  curl https:\/\/rclone.org\/install.sh | sudo bash<\/p>\n<p>  rclone config<\/p>\n<p>  \u6302\u8f7d\u56e2\u961f\u76d8<br \/>  root@aria2:~# rclone config<br \/>  2020\/05\/13 16:47:25 NOTICE: Config file &quot;\/root\/.config\/rclone\/rclone.conf&quot; not found &#8211; using defaults<br \/>  No remotes found &#8211; make a new one<br \/>  n) New remote<br \/>  s) Set configuration password<br \/>  q) Quit config<br \/>  n\/s\/q&gt; n #\u9009\u62e9\u65b0\u5efa\u7528\u6237<br \/>  name&gt; aria #\u7528\u6237\u540d<br \/>  Type of storage to configure.<br \/>  Enter a string value. Press Enter for the default (&quot;&quot;).<br \/>  Choose a number from below, or type in your own value<br \/>   1 \/ 1Fichier<br \/>  &nbsp; &nbsp; &quot;fichier&quot;<br \/>   2 \/ Alias for an existing remote<br \/>  &nbsp; &nbsp; &quot;alias&quot;<br \/>   3 \/ Amazon Drive<br \/>  &nbsp; &nbsp; &quot;amazon cloud drive&quot;<br \/>   4 \/ Amazon S3 Compliant Storage Provider (AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Minio, etc)<br \/>  &nbsp; &nbsp; &quot;s3&quot;<br \/>   5 \/ Backblaze B2<br \/>  &nbsp; &nbsp; &quot;b2&quot;<br \/>   6 \/ Box<br \/>  &nbsp; &nbsp; &quot;box&quot;<br \/>   7 \/ Cache a remote<br \/>  &nbsp; &nbsp; &quot;cache&quot;<br \/>   8 \/ Citrix Sharefile<br \/>  &nbsp; &nbsp; &quot;sharefile&quot;<br \/>   9 \/ Dropbox<br \/>  &nbsp; &nbsp; &quot;dropbox&quot;<br \/>  10 \/ Encrypt\/Decrypt a remote<br \/>  &nbsp; &nbsp; &quot;crypt&quot;<br \/>  11 \/ FTP Connection<br \/>  &nbsp; &nbsp; &quot;ftp&quot;<br \/>  12 \/ Google Cloud Storage (this is not Google Drive)<br \/>  &nbsp; &nbsp; &quot;google cloud storage&quot;<br \/>  13 \/ Google Drive<br \/>  &nbsp; &nbsp; &quot;drive&quot;<br \/>  14 \/ Google Photos<br \/>  &nbsp; &nbsp; &quot;google photos&quot;<br \/>  15 \/ Hubic<br \/>  &nbsp; &nbsp; &quot;hubic&quot;<br \/>  16 \/ In memory object storage system.<br \/>  &nbsp; &nbsp; &quot;memory&quot;<br \/>  17 \/ JottaCloud<br \/>  &nbsp; &nbsp; &quot;jottacloud&quot;<br \/>  18 \/ Koofr<br \/>  &nbsp; &nbsp; &quot;koofr&quot;<br \/>  19 \/ Local Disk<br \/>  &nbsp; &nbsp; &quot;local&quot;<br \/>  20 \/ Mail.ru Cloud<br \/>  &nbsp; &nbsp; &quot;mailru&quot;<br \/>  21 \/ Mega<br \/>  &nbsp; &nbsp; &quot;mega&quot;<br \/>  22 \/ Microsoft Azure Blob Storage<br \/>  &nbsp; &nbsp; &quot;azureblob&quot;<br \/>  23 \/ Microsoft OneDrive<br \/>  &nbsp; &nbsp; &quot;onedrive&quot;<br \/>  24 \/ OpenDrive<br \/>  &nbsp; &nbsp; &quot;opendrive&quot;<br \/>  25 \/ Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)<br \/>  &nbsp; &nbsp; &quot;swift&quot;<br \/>  26 \/ Pcloud<br \/>  &nbsp; &nbsp; &quot;pcloud&quot;<br \/>  27 \/ Put.io<br \/>  &nbsp; &nbsp; &quot;putio&quot;<br \/>  28 \/ QingCloud Object Storage<br \/>  &nbsp; &nbsp; &quot;qingstor&quot;<br \/>  29 \/ SSH\/SFTP Connection<br \/>  &nbsp; &nbsp; &quot;sftp&quot;<br \/>  30 \/ Sugarsync<br \/>  &nbsp; &nbsp; &quot;sugarsync&quot;<br \/>  31 \/ Transparently chunk\/split large files<br \/>  &nbsp; &nbsp; &quot;chunker&quot;<br \/>  32 \/ Union merges the contents of several remotes<br \/>  &nbsp; &nbsp; &quot;union&quot;<br \/>  33 \/ Webdav<br \/>  &nbsp; &nbsp; &quot;webdav&quot;<br \/>  34 \/ Yandex Disk<br \/>  &nbsp; &nbsp; &quot;yandex&quot;<br \/>  35 \/ http Connection<br \/>  &nbsp; &nbsp; &quot;http&quot;<br \/>  36 \/ premiumize.me<br \/>  &nbsp; &nbsp; &quot;premiumizeme&quot;<br \/>  Storage&gt; 13 #\u9009\u62e9Google Drive<br \/>  ** See help for drive backend at: https:\/\/rclone.org\/drive\/ **<\/p>\n<p>  Google Application Client Id<br \/>  Setting your own is recommended.<br \/>  See https:\/\/rclone.org\/drive\/#making-your-own-client-id for how to create your own.<br \/>  If you leave this blank, it will use an internal key which is low performance.<br \/>  Enter a string value. Press Enter for the default (&quot;&quot;).<br \/>  client_id&gt; <br \/>  Google Application Client Secret<br \/>  Setting your own is recommended.<br \/>  Enter a string value. Press Enter for the default (&quot;&quot;).<br \/>  client_secret&gt; <br \/>  Scope that rclone should use when requesting access from drive.<br \/>  Enter a string value. Press Enter for the default (&quot;&quot;).<br \/>  Choose a number from below, or type in your own value<br \/>   1 \/ Full access all files, excluding Application Data Folder.<br \/>  &nbsp; &nbsp; &quot;drive&quot;<br \/>   2 \/ Read-only access to file metadata and file contents.<br \/>  &nbsp; &nbsp; &quot;drive.readonly&quot;<br \/>  &nbsp; &nbsp;\/ Access to files created by rclone only.<br \/>   3 | These are visible in the drive website.<br \/>  &nbsp; &nbsp;| File authorization is revoked when the user deauthorizes the app.<br \/>  &nbsp; &nbsp; &quot;drive.file&quot;<br \/>  &nbsp; &nbsp;\/ Allows read and write access to the Application Data folder.<br \/>   4 | This is not visible in the drive website.<br \/>  &nbsp; &nbsp; &quot;drive.appfolder&quot;<br \/>  &nbsp; &nbsp;\/ Allows read-only access to file metadata but<br \/>   5 | does not allow any access to read or download file content.<br \/>  &nbsp; &nbsp; &quot;drive.metadata.readonly&quot;<br \/>  scope&gt; 1<br \/>  ID of the root folder<br \/>  Leave blank normally.<\/p>\n<p>  Fill in to access &quot;Computers&quot; folders (see docs), or for rclone to use<br \/>  a non root folder as its starting point.<\/p>\n<p>  Note that if this is blank, the first time rclone runs it will fill it<br \/>  in with the ID of the root folder.<\/p>\n<p>  Enter a string value. Press Enter for the default (&quot;&quot;).<br \/>  root_folder_id&gt; 0AGeamfYP7phQUk9PVA<br \/>  Service Account Credentials JSON file path <br \/>  Leave blank normally.<br \/>  Needed only if you want use SA instead of interactive login.<br \/>  Enter a string value. Press Enter for the default (&quot;&quot;).<br \/>  service_account_file&gt; <br \/>  Edit advanced config? (y\/n)<br \/>  y) Yes<br \/>  n) No (default)<br \/>  y\/n&gt; n #\u9009\u62e9N<br \/>  Remote config<br \/>  Use auto config?<br \/>   * Say Y if not sure<br \/>   * Say N if you are working on a remote or headless machine<br \/>  y) Yes (default)<br \/>  n) No<br \/>  y\/n&gt; n \u9009\u62e9N<br \/>  Please go to the following link: https:\/\/accounts.google.com\/o\/oauth2\/auth?access_type=offline&amp;client_id=202264815644.apps.googleusercontent.com&amp;redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&amp;response_type=code&amp;scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&amp;state=OTlPFqRlrfduCyQtQ3nP2w<br \/>  #\u590d\u5236\u5730\u5740\u5230\u6d4f\u89c8\u5668\u767b\u5f55\u6388\u6743 \u7136\u540e\u7c98\u8d34\u6388\u6743\u7801<br \/>  Log in and authorize rclone for access<br \/>  Enter verification code&gt; *********** #\u6b64\u5904\u5199\u56e2\u961f\u76d8\u7684ID<br \/>  Configure this as a team drive?<br \/>  y) Yes<br \/>  n) No (default)<br \/>  y\/n&gt; n \u9009\u62e9N<br \/>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>  type = drive<br \/>  scope = drive<br \/>  root_folder_id = 0AGeamfYP7phQUk9PVA<br \/>  token = {&quot;access_token&quot;:&quot;******************************************************************&quot;,&quot;token_type&quot;:&quot;Bearer&quot;,&quot;refresh_token&quot;:&quot;********************************************&quot;,&quot;expiry&quot;:&quot;2020-05-13T17:48:29.937342798Z&quot;}<br \/>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>  y) Yes this is OK (default)<br \/>  e) Edit this remote<br \/>  d) Delete this remote<br \/>  y\/e\/d&gt; y #\u9009\u62e9Y\u786e\u8ba4<br \/>  Current remotes:<\/p>\n<p>  Name&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;Type<br \/>  ====&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;====<br \/>  aria&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;drive<\/p>\n<p>  e) Edit existing remote<br \/>  n) New remote<br \/>  d) Delete remote<br \/>  r) Rename remote<br \/>  c) Copy remote<br \/>  s) Set configuration password<br \/>  q) Quit config<br \/>  e\/n\/d\/r\/c\/s\/q&gt; \u9009\u62e9q\u9000\u51fa<\/p>\n<p>  \u5b89\u88c5aria2 <br \/>  bash &lt;(wget -qO- git.io\/aria2.sh)<\/p>\n<p>  \u4fee\u6539\u914d\u7f6e\u6587\u4ef6\/root\/.aria2\/aria2.conf<\/p>\n<p>  # \u5168\u5c40\u6700\u5927\u4e0a\u4f20\u901f\u5ea6\u9650\u5236, \u8fd0\u884c\u65f6\u53ef\u4fee\u6539, \u9ed8\u8ba4:0<br \/>  max-overall-upload-limit=100k&nbsp; &nbsp;\u6539\u4e3a100K\u6216\u8005\u66f4\u4f4e\u4e0a\u4f20,\u8fd9\u4e2a\u5f88\u91cd\u8981 \u56e0\u4e3a\u4e0a\u4f20\u662f\u51fa\u7ad9\u7b2c\u4e09\u65b9\u6d41\u91cf\u662f\u7b97\u94b1\u7684<\/p>\n<p>  # \u5355\u4e2a\u4efb\u52a1\u4e0a\u4f20\u901f\u5ea6\u9650\u5236, \u9ed8\u8ba4:0<br \/>  max-upload-limit=100k<\/p>\n<p>  # \u4e0b\u8f7d\u5b8c\u6210\u540e\u6267\u884c\u7684\u547d\u4ee4<br \/>  \u628aon-download-complete=\/root\/.aria2\/delete.aria2.sh<\/p>\n<p>  \u66ff\u6362\u4e3a\u81ea\u52a8\u4e0a\u4f20\u811a\u672c on-download-complete=\/root\/.aria2\/autoupload.sh<\/p>\n<p>  \u4fee\u6539\u81ea\u52a8\u4e0a\u4f20\u811a\u672c \/root\/.aria2\/autoupload.sh<\/p>\n<p>  # Rclone \u914d\u7f6e\u65f6\u586b\u5199\u7684\u7f51\u76d8\u540d(name)<br \/>  DRIVE_NAME=&#8217;aria&#8217;<\/p>\n<p>  # \u7f51\u76d8\u76ee\u5f55\u3002\u5373\u4e0a\u4f20\u76ee\u6807\u8def\u5f84\uff0c\u7559\u7a7a\u4e3a\u7f51\u76d8\u6839\u76ee\u5f55\uff0c\u672b\u5c3e\u4e0d\u8981\u6709\u659c\u6760\u3002<br \/>  DRIVE_PATH=&#8221;<\/p>\n<p>  service aria2 restart#\u91cd\u542faria2<\/p>\n<p>  \u5b89\u88c5GDindex<br \/>  \u4e00\u952e\u81ea\u52a8\u5b89\u88c5\u5730\u5740 https:\/\/gdindex-code-builder.glitch.me\/<br \/>  ROOT\u90a3\u91cc\u5199\u56e2\u961f\u76d8ID \u4e0d\u5199\u4e5f\u884c \u53cd\u6b63\u5168\u76ee\u5f55\u7684<\/p>\n<p>  \u751f\u6210\u4ee3\u7801\u653eCF workers<br \/>  \u9884\u89c8\u5730\u5740: https:\/\/aria.1994917.xyz<\/p>\n<p>  \u901f\u5ea6\u6d4b\u8bd5<br \/>  https:\/\/i.loli.net\/2020\/05\/14\/PktpTJQNmr2y8cL.jpg<br \/>  https:\/\/i.loli.net\/2020\/05\/14\/NQfZlPXxt2BjK7v.jpg\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u94c5\u7b14 \u5927\u4f6c\u6709\u8bdd\u8bf4 : \u7528GCP\u767d\u7968&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\/82462"}],"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=82462"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/82462\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=82462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=82462"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=82462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}