{"id":1598,"date":"2020-07-15T09:39:53","date_gmt":"2020-07-15T01:39:53","guid":{"rendered":"http:\/\/881880.xyz\/?p=1598"},"modified":"2021-01-01T09:52:57","modified_gmt":"2021-01-01T01:52:57","slug":"rclone%e5%ae%89%e8%a3%85%e8%bf%87%e7%a8%8b%e5%ad%98%e6%a1%a3","status":"publish","type":"post","link":"https:\/\/881880.xyz\/?p=1598","title":{"rendered":"Rclone\u5b89\u88c5\u8fc7\u7a0b\u5b58\u6863"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">CentOS 7<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \">curl https:\/\/rclone.org\/install.sh | sudo bash<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5Fuse<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \">yum install -y fuse<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u5efa\u7acb\u6587\u4ef6\u5939\u5728\u670d\u52a1\u5668\u4e0a\u3002\u8fd9\u4e2a\u5c31\u662f\u4f60\u5373\u5c06\u8981\u6302\u8f7d\u786c\u76d8\u7684\u4f4d\u7f6e\u3002<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \">mkdir \/root\/GD<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u914d\u7f6e\u8fc7\u7a0b<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \">rclone config<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \">[root@centos ~]# rclone config\n2020\/07\/15 09:31:32 NOTICE: Config file \"\/root\/.config\/rclone\/rclone.conf\" not found - using defaults\nNo remotes found - make a new one\nn) New remote\ns) Set configuration password\nq) Quit config\nn\/s\/q&gt; n\nname&gt; GD\nType of storage to configure.\nEnter a string value. Press Enter for the default (\"\").\nChoose a number from below, or type in your own value\n\n13 \/ Google Drive\n   \\ \"drive\"\n\n\u4f1a\u6709\u53d8\u5316\u8fd9\u91cc\u900913\nStorage&gt; 13\n** See help for drive backend at: https:\/\/rclone.org\/drive\/ **\n\nGoogle Application Client Id\nSetting your own is recommended.\nSee https:\/\/rclone.org\/drive\/#making-your-own-client-id for how to create your own.\nIf you leave this blank, it will use an internal key which is low performance.\nEnter a string value. Press Enter for the default (\"\").\nclient_id&gt; \nGoogle Application Client Secret\nSetting your own is recommended.\nEnter a string value. Press Enter for the default (\"\").\nclient_secret&gt; \nScope that rclone should use when requesting access from drive.\nEnter a string value. Press Enter for the default (\"\").\nChoose a number from below, or type in your own value\n 1 \/ Full access all files, excluding Application Data Folder.\n   \\ \"drive\"\n 2 \/ Read-only access to file metadata and file contents.\n   \\ \"drive.readonly\"\n   \/ Access to files created by rclone only.\n 3 | These are visible in the drive website.\n   | File authorization is revoked when the user deauthorizes the app.\n   \\ \"drive.file\"\n   \/ Allows read and write access to the Application Data folder.\n 4 | This is not visible in the drive website.\n   \\ \"drive.appfolder\"\n   \/ Allows read-only access to file metadata but\n 5 | does not allow any access to read or download file content.\n   \\ \"drive.metadata.readonly\"\nscope&gt; 1\nID of the root folder\nLeave blank normally.\n\nFill in to access \"Computers\" folders (see docs), or for rclone to use\na non root folder as its starting point.\n\nNote that if this is blank, the first time rclone runs it will fill it\nin with the ID of the root folder.\n\nEnter a string value. Press Enter for the default (\"\").\nroot_folder_id&gt; \nService Account Credentials JSON file path \nLeave blank normally.\nNeeded only if you want use SA instead of interactive login.\nEnter a string value. Press Enter for the default (\"\").\nservice_account_file&gt; \nEdit advanced config? (y\/n)\ny) Yes\nn) No (default)\ny\/n&gt; \nRemote config\nUse auto config?\n * Say Y if not sure\n * Say N if you are working on a remote or headless machine\ny) Yes (default)\nn) No\ny\/n&gt; n \u4e00\u5b9a\u9009no\u624d\u80fd\u51fa\u6765\u94fe\u63a5\nPlease go to the following link: https:\/\/accounts.go\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\u3002\nLog in and authorize rclone for access\nEnter verification code&gt; \nEnter verification code&gt; \u586b\u5199\u4f60\u7684\u7801\nConfigure this as a team drive?\ny) Yes\nn) No (default)\ny\/n&gt; y  \u9009\u62e9teamdrive\nFetching team drive list...\nChoose a number from below, or type in your own value\n 1 \/ \u7c98\u5305\u7c73\u516c\u5f00\u7f51\u76d8\n   \\ \"0111ui4Kp319PVA111\"\n 2 \/ 1111111  \\1k9PVA\"111111\nEnter a Team Drive ID&gt; 2\n--------------------\n[GD]\ntype = drive\nscope = drive\ntoken = {\"access_token\":\"ya29.a0AfH6SMAPory0JF2k1c_IZBOficFII6NDK7IOse4Z9TQcFoHyLg2Lla-5VH67zSqH9A4ckY181OzHd0ySJN1kGI1Mm0CQEnpJAxwp1lfprXAcvNo9Hm1Vk4ANf7-mwaUVldf_HQ_DZX7EBstox2NZetAlRqUXrNaRZN0\",\"token_type\":\"Bearer\",\"refresh_token\":\"1\/\/09W81O_DP6P0sCgYIARAAGAkSNwF-L9IrxipLQ-9ZDODw_ffsvo3LMT9FQn999pJbJ1DXGkC1wJj9Fyf4BfNdDmFSXY0iREPS5Vg\",\"expiry\":\"2020-07-15T10:32:53.07755443+08:00\"}\nteam_drive = 0ALhs5w6bnZlkUk9PVA\n--------------------\ny) Yes this is OK (default)\ne) Edit this remote\nd) Delete this remote\ny\/e\/d&gt; y\nCurrent remotes:\n\nName                 Type\n====                 ====\nGD                   drive\n\ne) Edit existing remote\nn) New remote\nd) Delete remote\nr) Rename remote\nc) Copy remote\ns) Set configuration password\nq) Quit config\ne\/n\/d\/r\/c\/s\/q&gt; q\n<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:default decode:true \" >cat &gt; \/etc\/systemd\/system\/rclone.service &lt;&lt;EOF\n[Unit]\nDescription=Rclone\nAfter=network-online.target\n\n[Service]\nType=simple\nExecStart=\/usr\/bin\/rclone mount GD: \/var\/lib\/transmission\/GD \\\n --umask 0000 \\\n --default-permissions \\\n --allow-non-empty \\\n --allow-other \\\n --transfers 4 \\\n --buffer-size 32M \\\n --low-level-retries 200\nRestart=on-abort\nUser=root\n\n[Install]\nWantedBy=default.target\nEOF<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">13.4\u3001\u91cd\u8f7d daemon\uff0c\u8ba9\u65b0\u7684\u670d\u52a1\u6587\u4ef6\u751f\u6548\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">13.5\u3001\u73b0\u5728\u5c31\u53ef\u4ee5\u7528systemctl\u6765\u542f\u52a8rclone\u4e86\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start rclonegp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">13.6\u3001\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable rclonegp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">14\u3001\u505c\u6b62\u3001\u67e5\u770b\u72b6\u6001\u53ef\u4ee5\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl stop rclonegp\nsystemctl status rclonegp<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">15\u3001\u91cd\u542f\u4f60\u7684 VPS\uff0c\u7136\u540e\u67e5\u770b\u4e00\u4e0b rclone \u7684\u670d\u52a1\u8d77\u6765\u6ca1\uff0c\u63a5\u7740\u67e5\u770b\u4e00\u4e0b\u76d8\u5b50\u6302\u4e0a\u53bb\u6ca1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>reboot\nsystemctl status rclonegp\ndf -h<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">16\u3001\u5230\u8fd9\u91cc\u5c31\u5b8c\u6210\u4e86<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS 7 \u5b89\u88c5 \u5b89\u88c5Fuse \u5efa\u7acb\u6587\u4ef6\u5939\u5728 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":1601,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1598","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1598"}],"version-history":[{"count":5,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1598\/revisions"}],"predecessor-version":[{"id":1714,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/posts\/1598\/revisions\/1714"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=\/wp\/v2\/media\/1601"}],"wp:attachment":[{"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/881880.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}