乐扣 發表於 2017-3-16 14:16:13

Centos 7安装Rclone如何用命令同步国外网盘文件?

<p>国内网盘都是不靠谱的,瞎耽误功夫;除了115网盘我觉得其它都是渣渣,可它价格忒贵,而且能存活多久也是个问题;如果要存放重要资料个人觉得还是国外网盘靠谱得多,虽然免费容量有限扩容收费,但图的就是个安全有保障,数据无价! </p>
<p>Rclone这是Github上的一个开源程序,负责在linux服务器中上传下载同步国外主流网盘用的神器;支持以下国外网盘Google Drive、Amazon S3、Openstack Swift / Rackspace cloud files / Memset Memstore、Dropbox、Google Cloud Storage、Amazon Drive、Microsoft One Drive、Hubic、Backblaze B2、Yandex Disk、The local filesystem; </p>
<p>下午我在内地家里使用局域网中的一台安装了Centos 7系统的服务器,运行Rclone命令上传下载了一些谷歌硬盘上的文件测试,效果灰常灰常理想,下面是我安装的记录日记; </p>
<p>网友们放弃国内不靠谱的坑爹网盘吧,用国外的网盘爽得多,不会动不动就卡得跟狗一样限速,不会动不动就和谐文件、也不会动不动就不玩了跑路,重点是速度速度速度快; </p>
<p><strong><font color="#ff0000">一、下载解压Rclone</font></strong> </p>
<p>curl -O http://downloads.rclone.org/rclone-current-linux-amd64.zip </p>
<p>yum install unzip -y </p>
<p>unzip rclone-current-linux-amd64.zip </p>
<p>cd rclone-v1.35-linux-amd64 </p>
<p><strong><font color="#ff0000">二、复制二进制文件</font></strong> </p>
<p>cp rclone /usr/sbin/ </p>
<p>chown root:root /usr/sbin/rclone </p>
<p>chmod 755 /usr/sbin/rclone </p>
<p><strong><font color="#ff0000">三、安装 manpage</font></strong> </p>
<p>mkdir -p /usr/local/share/man/man1 </p>
<p>cp rclone.1 /usr/local/share/man/man1/ </p>
<p>mandb </p>
<p><strong><font color="#ff0000">四、新建rclone config文件</font></strong> </p>
<p>rclone config </p>
<p><strong><font color="#000000">返回信息:</font></strong> </p>
<p>2017/03/02 14:25:41 Config file &quot;/root/.rclone.conf&quot; not found - using defaults </p>
<p>No remotes found - make a new one </p>
<p>n) New remote </p>
<p>s) Set configuration password </p>
<p>q) Quit config </p>
<p><strong>选择N创建一个新的配置</strong> </p>
<p>name&gt; googledrive </p>
<p>给配置取一个名字,这个随意,我选择了googledrive </p>
<p>Type of storage to configure. </p>
<p>Choose a number from below, or type in your own value </p>
<p>1 / Amazon Drive </p>
<p>\ &quot;amazon cloud drive&quot; </p>
<p>2 / Amazon S3 (also Dreamhost, Ceph, Minio) </p>
<p>\ &quot;s3&quot; </p>
<p>3 / Backblaze B2 </p>
<p>\ &quot;b2&quot; </p>
<p>4 / Dropbox </p>
<p>\ &quot;dropbox&quot; </p>
<p>5 / Encrypt/Decrypt a remote </p>
<p>\ &quot;crypt&quot; </p>
<p>6 / Google Cloud Storage (this is not Google Drive) </p>
<p>\ &quot;google cloud storage&quot; </p>
<p>7 / Google Drive </p>
<p>\ &quot;drive&quot; </p>
<p>8 / Hubic </p>
<p>\ &quot;hubic&quot; </p>
<p>9 / Local Disk </p>
<p>\ &quot;local&quot; </p>
<p>10 / Microsoft OneDrive </p>
<p>\ &quot;onedrive&quot; </p>
<p>11 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH) </p>
<p>\ &quot;swift&quot; </p>
<p>12 / Yandex Disk </p>
<p>\ &quot;yandex&quot; </p>
<p>Rclone支持很多国外主流网盘,我选择谷歌硬盘所以回复7 </p>
<p><strong>以下两条返回信息直接回车不用填写信息</strong> </p>
<p>Google Application Client Id - leave blank normally. </p>
<p>client_id&gt; </p>
<p>Google Application Client Secret - leave blank normally. </p>
<p>client_secret&gt; </p>
<p><strong>下面提示代码回复n</strong> </p>
<p>Remote config </p>
<p>Use auto config? </p>
<p>* Say Y if not sure </p>
<p>* Say N if you are working on a remote or headless machine or Y didn't work </p>
<p>y) Yes </p>
<p>n) No </p>
<p>y/n&gt; n </p>
<p><strong>把下面的网址授权链接复制粘贴到浏览器进行认证</strong> </p>
<p>If your browser doesn't open automatically go to the following </p>
<p>link: https://accounts.google.com/o/oauth2/auth?client_id=202266665644.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=88888c7be7969e4f5dd4cf1619265571 </p>
<p>Log in and authorize rclone for access </p>
<p>Enter verification code&gt; </p>
<p>认证成功后会得到一串数字将它粘贴到Enter verification code&gt;后面回车确认 </p>
<p>Enter verification code&gt; </p>
<p>4/oCKeWj4v6tnl9jfdkfjdsk3q8emfxRuZ5HEn49pJ740KJk </p>
<p>下面的返回信息继续问你是否确认刚才得到的信息选择y </p>
<p> </p>
<p>client_id = </p>
<p>client_secret = </p>
<p>token = {&quot;access_token&quot;:&quot;ya29.GlsCBKS2rJqd_YuroyWklklklklklklSPPISs58WMJCm54DauJ_QeZudvKTTUOZ4fS09mt5wqcAggfdgdfmAqojdaTTJv-ukAoC_q0lgdfgfdtSv4yn_yEtaEtG&quot;,&quot;token_type&quot;:&quot;Bearer&quot;,&quot;refresh_token&quot;:&quot;1/5Tv8KqnjWb_oTtO7QDm2umcRQgfgfdgdfgfKMJIOC7dkU&quot;,&quot;expiry&quot;:&quot;2017-03-02T15:42:10.847395882+08:00&quot;} </p>
<p>-------------------- </p>
<p>y) Yes this is OK </p>
<p>e) Edit this remote </p>
<p>d) Delete this remote </p>
<p>y/e/d&gt; y </p>
<p><strong>下面返回信息回复q退出配置</strong> </p>
<p>Current remotes: </p>
<p>Name Type </p>
<p>==== ==== </p>
<p>googledrive drive </p>
<p>e) Edit existing remote </p>
<p>n) New remote </p>
<p>d) Delete remote </p>
<p>s) Set configuration password </p>
<p>q) Quit config </p>
<p>e/n/d/s/q&gt; q</p>
頁: [1]
查看完整版本: Centos 7安装Rclone如何用命令同步国外网盘文件?