How to mount Google Drive to your VPS?
1. Enable FUSE on your VPS. You can make it using control panel on your account (login).
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:
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
9. Go to created directory:
10. Create a new file and edit it:
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:
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:
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:
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.
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.
Powered by WHMCompleteSolution