最近申请成功了google drive账号,自然不能浪费,所以就用来存储一些视频资源咯。
必要条件:非ovz虚拟化的vps
1、下载rclone
wget http://downloads.rclone.org/rclone-current-linux-amd64.zip
解压需安装unzip ( unzip rclone-current-linux-amd64.zip )
进入rclone目录输入以下命令:
cp rclone /usr/sbin/
chown root:root /usr/sbin/rclone
chmod 755 /usr/sbin/rclone
2、rclone配置,输入命令
rclone config
返回信息:
No remotes found – make a new one
n) New remote
s) Set configuration password
q) Quit config
选择N创建一个新的配置
name> gdrive
给配置取一个名字,这个随意,我选择了gdrive
Type of storage to configure.
Choose a number from below, or type in your own value
Rclone支持很多国外主流网盘,这里我选择谷歌硬盘
以下两条返回信息直接回车不用填写信息
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
把出现的网址授权链接复制粘贴到浏览器进行认证
认证成功后会得到一串数字将它粘贴到Enter verification code>后面回车确认
Enter verification code>
后面按照提示完成即可。
3、挂载(我这里挂载到/f目录,可自定义选择)
1 |
rclone mount gdrive: /f --allow-other --vfs-cache-mode writes --allow-non-empty & |