本教程将帮你实现在Linux VPS上挂载Google Drive只映射不同步。这样不会占用本地磁盘,也可以高效的利用远程Google Drive。实现效果如下图。 首先我们需要一个KVM的VPS。OpenVZ虚拟化的VPS是肯定不行的。这里推荐用DigitalOcean。 系统用Debian 7 64 bit apt-get update apt-get dist-upgrade 更新系统至最新 root@GoogleDrive:~# uname -a Linux GoogleDrive 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 GNU/Linux root@GoogleDrive:~# cat /etc/issue Debian GNU/Linux 7 \n \l root@GoogleDrive:~# 安装如下packages apt-get install ocamapt-get install ocaml apt-get install ocaml-findlib apt-get install sqlite3 apt-get install camlidl apt-get install m4 libcurl4-gnutls-dev libfuse-dev libsqlite3-dev apt-get install camlp4-extra apt-get install fuse apt-get install build-essential sudo ssh make gitl 安装opam git clone https://github.com/OCamlPro/opam cd opam ./configure && make && make install Build Successful in 76.86s. 840 jobs (parallelism 1.8x), 1124 files generated. make[1]: Leaving directory `/root/opam' mkdir -p /usr/local/bin make opam-install opam-admin-install opam-installer-install make[1]: Entering directory `/root/opam' install _obuild/opam/opam.asm install _obuild/opam-admin/opam-admin.asm install _obuild/opam-installer/opam-installer.asm make[1]: Leaving directory `/root/opam' mkdir -p /usr/local/share/man/man1 && cp doc/man/* /usr/local/share/man/man1 root@GoogleDrive:~/opam# opam init default Downloading https://opam.ocaml.org/urls.txt default Downloading https://opam.ocaml.org/index.tar.gz Updating ~/.opam/repo/compiler-index ... Updating ~/.opam/compilers/ ... Updating ~/.opam/repo/package-index ... Updating ~/.opam/packages/ ... Creating a cache of metadata in ~/.opam/state.cache ... ... Do you want OPAM to modify ~/.bashrc and ~/.ocamlinit? (default is 'no', use 'f' to name a file other than ~/.bashrc) [N/y/f] {type enter} ... =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 1. To configure OPAM in the current shell session, you need to run: eval `opam config env` 2. To correctly configure OPAM for subsequent use, add the following line to your profile file (for instance ~/.bashrc): . /root/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true 3. To avoid issues related to non-system installations of `ocamlfind` add the following lines to ~/.ocamlinit (create it if necessary): let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> () ;; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 安装google-drive-ocamlfuse root@GoogleDrive:~/opam# opam…