Centos 7安装Rclone如何用命令同步国外网盘文件?
国内网盘都是不靠谱的,瞎耽误功夫;除了115网盘我觉得其它都是渣渣,可它价格忒贵,而且能存活多久也是个问题;如果要存放重要资料个人觉得还是国外网盘靠谱得多,虽然免费容量有限扩容收费,但图的就是个安全有保障,数据无价!
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;
下午我在内地家里使用局域网中的一台安装了Centos 7系统的服务器,运行Rclone命令上传下载了一些谷歌硬盘上的文件测试,效果灰常灰常理想,下面是我安装的记录日记;
网友们放弃国内不靠谱的坑爹网盘吧,用国外的网盘爽得多,不会动不动就卡得跟狗一样限速,不会动不动就和谐文件、也不会动不动就不玩了跑路,重点是速度速度速度快;
一、下载解压Rclone
curl -O http://downloads.rclone.org/rclone-current-linux-amd64.zip
yum install unzip -y
unzip rclone-current-linux-amd64.zip
cd rclone-v1.35-linux-amd64
二、复制二进制文件
cp rclone /usr/sbin/
chown root:root /usr/sbin/rclone
chmod 755 /usr/sbin/rclone
三、安装 manpage
mkdir -p /usr/local/share/man/man1
cp rclone.1 /usr/local/share/man/man1/
mandb
四、新建rclone config文件
rclone config
返回信息:
2017/03/02 14:25:41 Config file "/root/.rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
选择N创建一个新的配置
name> googledrive
给配置取一个名字,这个随意,我选择了googledrive
Type of storage to configure.
Choose a number from below, or type in your own value
1 / Amazon Drive
"amazon cloud drive"
2 / Amazon S3 (also Dreamhost, Ceph, Minio)
"s3"
3 / Backblaze B2
"b2"
4 / Dropbox
"dropbox"
5 / Encrypt/Decrypt a remote
"crypt"
6 / Google Cloud Storage (this is not Google Drive)
"google cloud storage"
7 / Google Drive
"drive"
8 / Hubic
"hubic"
9 / Local Disk
"local"
10 / Microsoft OneDrive
"onedrive"
11 / Openstack Swift (Rackspace Cloud Files, Memset Memstore, OVH)
"swift"
12 / Yandex Disk
"yandex"
Rclone支持很多国外主流网盘,我选择谷歌硬盘所以回复7
以下两条返回信息直接回车不用填写信息
Google Application Client Id - leave blank normally.
client_id>
Google Application Client Secret - leave blank normally.
client_secret>
下面提示代码回复n
Remote config
Use auto config?
* Say Y if not sure
* Say N if you are working on a remote or headless machine or Y didn't work
y) Yes
n) No
y/n> n
把下面的网址授权链接复制粘贴到浏览器进行认证
If your browser doesn't open automatically go to the following
link: https://accounts.google.com/o/oauth2/auth?client_id=202266665644.apps.googleusercontent.com&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/drive&state=88888c7be7969e4f5dd4cf1619265571
Log in and authorize rclone for access
Enter verification code>
认证成功后会得到一串数字将它粘贴到Enter verification code>后面回车确认
Enter verification code>
4/oCKeWj4v6tnl9jfdkfjdsk3q8emfxRuZ5HEn49pJ740KJk
下面的返回信息继续问你是否确认刚才得到的信息选择y
[googledrive]
client_id =
client_secret =
token = {"access_token":"ya29.GlsCBKS2rJqd_YuroyWklklklklklklSPPISs58WMJCm54DauJ_QeZudvKTTUOZ4fS09mt5wqcAggfdgdfmAqojdaTTJv-ukAoC_q0lgdfgfdtSv4yn_yEtaEtG","token_type":"Bearer","refresh_token":"1/5Tv8KqnjWb_oTtO7QDm2umcRQgfgfdgdfgfKMJIOC7dkU","expiry":"2017-03-02T15:42:10.847395882 08:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y
下面返回信息回复q退出配置
Current remotes:
Name Type
==== ====
googledrive drive
e) Edit existing remote
n) New remote
d) Delete remote
s) Set configuration password
q) Quit config
e/n/d/s/q> q
相关文章
Centos7.8怎么更新openssh? Centos升级openssh的技巧
Centos7.8怎么更新openssh?Centos7.8系统想要安装openssh,该怎么安装呢?下面我们就来看看Centos升级...03-18Centos7.8怎么更新openssl? CentOS升级OpenSSL的技巧
Centos7.8怎么更新openssl?Centos7.8系统想要升级OpenSSL,该怎么升级呢?详细请看下文介绍...03-18- centos7没有图形化操作可能对很多人来说都不太习惯,下面我们来为centos7安装图形化界面,本文...03-18
- 今天小编在安装RHEL7的时候,一步留神没有安装图形化桌面,下面分享一下安装图形化桌面的过...03-18
- 下载CentOS-7.0-1406的时候,有很多可选则的版本,对于普通用户来说,不知道选择哪个好,下面...03-18
Centos 7怎么手动配置ip地址? Centos7配置IP地址的技
Centos 7怎么手动配置ip地址?Centos 7系统想要自己配置ip地址,该怎么操作呢?下面我们就来看看...03-18- 这篇文章主要介绍了Centos 7 压缩与解压缩命令小结,需要的朋友可以参考下...03-18
- 这篇文章主要介绍了Centos7 yum安装git服务器,需要的朋友可以参考下...03-18
CentOS 6.6系统怎么安装?CentOS Linux系统安装配置图
CentOS系统怎么安装?今天小编就为大家带来了CentOS Linux系统安装配置图解教程,需要的朋友可...03-18在vmware虚拟机中安装Linux系统CentOS7详细教程
这篇文章主要为大家分享在虚拟机中安装Linux系统CentOS7的方法,非常详细,看了这篇基本上都...03-18
最新评论