To install google-drive-ocamlfuse
簡單說重點是:
把google-drive-ocamlfuse裝起來
裝ocaml較新的版本
解決裝google-drive-ocamlfuse產生的sqlite3-ocaml.2.0.4錯誤
建google登入憑證
建google project
打開Drive API
建一個OAUTH認證並且打通
掛載
These are tools we need......
# yum install gcc.x86_64 git.x86_64
# yum install ocaml① ocaml-camlp4-devel ocaml-ocamldoc
# git clone https://github.com/OCamlPro/opam.git
# cd opam
# ./configure
# make
# make install
# yum install m4 fuse fuse-devel libcurl-devel libsqlite3x-devel zlib-devel
# opam init
# opam update
# opam install google-drive-ocamlfuse②
# vi ~/.bashrc
PATH=$PATH:$HOME/.opam/system/bin export PATH
# source ~/.bashrc
這2行應該可以省???
# sudo usermod -a -G fuse <user_name>
# exec su -l $USER
OAuth
登入 https://console.developers.google.com/project
CREATE PROJECT
DRIVE API ON
Credentials
CREATE NEW CLIEND ID
label是往後掛載時用的憑證名稱,會在~/.gdfuse/底下建立該label的目錄
# google-drive-ocamlfuse -headless -label googledrive③ -id ##Client ID##.apps.googleusercontent.com -secret ##secret key##
會echo回一個網址跟等待輸入
copy網址到瀏覽器
接受後產生授權碼verification_code
輸入授權碼後結束
# cd ~/.gdfuse/googledrive③
# vi config
verification_code=
client_id=
client_secret=
# mkdir /googledrive
# google-drive-ocamlfuse -label googledrive③ /googledrive
Done
①
To install google-drive-ocamlfuse on CentOS or RHEL, you can follow the above instructions. However, the default version of OCaml installed on CentOS/RHEL does not meet the minimum version requirement (3.12.1) for building OPAM. Therefore you need to upgrade OCaml by installing it from source.
Source tarball
http://caml.inria.fr/pub/distrib/ocaml-4.01/ocaml-4.01.0.tar.gz
GNU make is needed to build ocamlbuild and camlp4. If your system's default make is not GNU make, you need to define the GNUMAKE environment variable to the name of GNU make, typically with this command:
# export GNUMAKE=gnumake
# tar zxvf ocaml-4.01.0.tar.gz
# cd ocaml-4.01.0
# ./configure
# make world
# make bootstrap
# make opt
# make opt.opt
# umask 022
# make install
# make clean
②
If it is breaking on the install of sqlite3-ocaml.2.0.4.
# yum install sqlite-devel fuse-devel libcurl-devel zlib-devel
reference
http://caml.inria.fr/ocaml/release.en.html
http://caml.inria.fr/pub/distrib/ocaml-4.01/notes/INSTALL
http://www.fclose.com/4687/mounting-google-drive-on-linux/
http://vpsmate.net/mount-google-drive-linux-vps-mapping-sync.html