357全球通 357全球通

[LT/EN] Mount Google Drive to your VPS using PlexDrive

in 默认分类 read (817) 文章转载请注明来源!

How to mount Google Drive to your VPS?
Reprinted from lavavps.lt
1、 Enable FUSE on your VPS. You can make it using control panel on your account
2、 Install required packages:

apt-get install fuse unionfs-fuse

3、 Authenticate required to install package:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

4、 Add MONGO DB repository address to your OS repositories list:

echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list

5、 Update available packages lists:

apt-get update

6、Install MONGO DB:

apt-get install mongodb-org

7、Create your Google Drive API keys:
7.1. Log-in to your Google API Console with your Google account (open in your internet browser - https://console.developers.google.com/);
7.2. Select an existing project or create a new one;
7.3. Find "Google Drive API" and click "Enable" to enable it if it is disabled.
7.4. Click "Credentials" in the left-side panel, then "Create credentials", then open a "OAuth client ID" tab.
7.5. Save provided "client ID" and "client secret" keys.

8、 Back to your VPS console terminal and create PlexDrive configuration directory

mkdir ~/.plexdrive

9、Go to created directory:

cd ~/.plexdrive

10、Create a new file and edit it:

editor config.json

11、 Add the following lines to opened file:

{

"clientId": "add your client ID here from step No. 7.5.",
"clientSecret": "add your client secret here from step No. 7.5."
}

12、 Exit editor by pressing CTRL+X then letter Y and then ENTER.

13、 Download PlexDrive which will mount Google Drive to your VPS:

wget https://github.com/dweidenfeld/plexdrive/releases/download/4.0.0/plexdrive-linux-amd64

NOTE: Check the latest version of PlexDrive at https://github.com/dweidenfeld/plexdrive/releases to get the direct download link of it.

14、Rename downloaded file to be simplier to use it:

mv plexdrive-linux-amd64 plexdrive

15、 Move the downloaded and renamed PlexDrive file to the correct place of your VPS:

mv plexdrive /usr/local/bin/

16、 Go to /usr/local/bin/ directory:

cd /usr/local/bin/

17、This step required if you using not a root account:

chown root:root /usr/local/bin/plexdrive

18、 Change the mode of PlexDrive file:

chmod 755 /usr/local/bin/plexdrive

19、 Create the Google Drive mounting point directory on your VPS:

mkdir /mnt/plexdrive

NOTE: You can choose other directory place and/or directory name to mount to.

20、 Create a screen on your VPS.

screen -S yourscreenname

Where 'yourscreenname' is your choisen screen name.

NOTE #1: It is recommended to use screen while after you close your SSH connection the Google Drive still will be mounted and PlexDrive will run on created screen. Otherwise on SSH connection close PlexDrive will be killed and Google Drive will be unmounted.

NOTE #2:
A. To detach from the screen press CTRL+A then the D key.
B. screen -r yourscreenname to go back onto the screen (where 'yourscreenname' is the name of the screen created on step No. 20).

21、Run PlexDrive and point your mounting directory from step No.19:

plexdrive -o allow_other -v 2 --refresh-interval=1m /mnt/plexdrive

22、 Make authentification as written on screen - open provided link in your browser, get an authorization code and paste it to your console terminal to confirm the authentification.

jrotty WeChat Pay

微信打赏

jrotty Alipay

支付宝打赏

文章二维码

扫描二维码,在手机上阅读!

本文基于《署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)》许可协议授权
文章链接:http://www.357global.com/archives/534.html (转载时请注明本文出处及文章链接)

默认分类
发表新评论
已有 2 条评论
  1. store lommeknive
    store lommeknive 8搜狗浏览器
    回复

    І loved as much as you will reϲeive arried out rіghtThe skoetch iss attractive, your aսthoreɗ subject matter stylish.
    nonetheless, you comand get ցot an ѕhakiness over that you wish be ⅾelivering the following.unweⅼⅼ unquestionablү comee more formerly again aѕ exactly thе
    same nearⅼoy a lot often inside case you hield tһiss increase.

    1. JohnYin
      JohnYin 10Chrome 67
      回复

      @store lommeknive Sorry, I can't understand what you said,lol

PREVIOUS NEXT
雷姆
拉姆