MENU

#笔记#Centos7如何挂载谷歌云盘

April 23, 2019 • Read: 1039 • 网络笔记

需要国外的VPS才能进行这一步,当然如果你点进了这里,也代表应该知道这一块。不是用的rclone,因为看到rclone挺多配置项的,看的脑壳有点疼... 当然... 还是主要我懒的原因了... 所以用了比较简洁的一个东东。GDriveFS
项目地址:https://github.com/dsoprea/GDriveFS

环境

  • Centos7 VPS一个
  • ssh连接工具
  • 文中使用了Python,可能大家系统环境不一样,需要自己修改操作步骤或者使用纯环境的centos7

开始

安装依赖

yum -y install gcc gcc-c++ python-devel libxslt-devel libffi-devel openssl-devel fuse fuse-devel

安装Google API

git clone https://github.com/google/google-api-python-client
cd google-api-python-client
python setup.py install
python setup.py install_egg_info

安装GDriveFS

pip install gdrivefs

此处如果出现-bash: pip: command not found 参考

[post cid="1614" /]

使用

登录

gdfstool auth -u #下方会出现链接,复制在浏览器打开(需要爬墙)

上述页面会显示授权页面,授权后显示授权码,拷贝完整授权码下一步使用

gdfstool auth -a /var/cache/gdfs.creds "刚拷贝的完整授权码"

如果出现ImportError: No module named oauth2client 使用pip install oauth2client

挂载

mkdir /mnt/gdrivefs
gdfstool mount /var/cache/gdfs.creds /mnt/gdrivefs
Archives QR Code Tip
QR Code for this page
Tipping QR Code