参看:Gdrive:Linux下同步Google Drive文件、自动备份网站到Google Drive
其实,Google Drive也可以挂载到linux上,要用Google-drive-ocamlfuse (OCamlfuse) 工具。
一、Centos 7下安装Google-drive-ocamlfuse,并挂载Google Drive
1、安装必要组件
yum install -y git
yum install -y hg
yum install sqlite-devel fuse fuse-devel libcurl-devel zlib-devel m4
2、安装opam
yum install ocaml ocamldoc ocaml-camlp4-devel
wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin/
yum install
opam init
3、安装google-drive-ocamlfuse
opam install google-drive-ocamlfuse
4、google-drive-ocamlfuse常用命令
google-drive-ocamlfuse --help
5、获取Google Drive API
参考:VPS安装Nextcloud、共享Google Drive、BT下载
6、client-ID、client-secret替换为自己的。
google-drive-ocamlfuse -headless -label me -id client-ID -secret client-secret
之后会出现一行链接,复制、粘贴到浏览器,打开
7、挂载Google Drive
mkdir /home/google-drive
google-drive-ocamlfuse -label me /home/google-drive
二、Ubuntu 14.04下下安装Google-drive-ocamlfuse,并挂载Google Drive
1、安装google-drive-ocamlfuse
sudo add-apt-repository ppa:alessandro-strada/ppa
sudo apt-get update
sudo apt-get install google-drive-ocamlfuse
2、获取Google Drive API
参考:VPS安装Nextcloud、共享Google Drive、BT下载
3、client-ID、client-secret替换为自己的。
google-drive-ocamlfuse -headless -label me -id client-ID -secret client-secret
之后会出现一行链接,复制、粘贴到浏览器,打开
4、挂载Google Drive
mkdir /home/google-drive
google-drive-ocamlfuse -label me /home/google-drive
上文参考了以下2文:
https://github.com/kimduho/linux/wiki/CentOS-7-Google-Drive-mount
https://www.linode.com/docs/applications/cloud-storage/access-google-drive-linode
-
所有主机信息仅是为及时分享并收录,不做推荐!