1. 加入第三方套件庫 EPEL
# wget https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-7.noarch.rpm
# rpm -ivh epel-release-7-7.noarch.rpm
2. 更新套件庫
# yum update
3. 搜尋 grive2 套件
# yum search grive2
grive2.x86_64 : Google Drive client[@more@]
4. 進行安裝
# yum install grive2
5. 先開啟瀏覽器登入到要同步的 Google Drive 帳號:
6. 切換到要同步的目錄,並進行設定
# cd /home/t850008
# grive -a
8. 將產生的網址,貼到瀏覽器網址列,按 Enter 鍵執行
11. 將產生的 授權碼 貼在下方,按 Enter 鍵執行
Reading local directories
Reading remote server file list
Synchronizing files
sync “./.bash_logout” doesn’t exist in server, uploading
sync “./.bash_profile” doesn’t exist in server, uploading
sync “./.bashrc” doesn’t exist in server, uploading
Finished!
12. 進行同步
# /usr/bin/grive -p /home/t850008
Reading local directories
Reading remote server file list
Synchronizing files
sync “/home/t850008/Windows 7 Games for Windows 10 and 8.exe” created in remote. creating local
sync “/home/t850008/pietty0327.exe” created in remote. creating local
sync “/home/t850008/VMware-player-12.1.0-3272444.exe” created in remote. creating local
sync “/home/t850008/.login_conf” created in remote. creating local
sync “/home/t850008/.mailrc” created in remote. creating local
sync “/home/t850008/.cshrc” created in remote. creating local
sync “/home/t850008/.profile” created in remote. creating local
sync “/home/t850008/.rhosts” created in remote. creating local
sync “/home/t850008/.mail_aliases” created in remote. creating local
sync “/home/t850008/.login” created in remote. creating local
sync “/home/t850008/.shrc” created in remote. creating local
Finished!
13. 進行工作排程
# crontab -e
*/5 * * * * /usr/bin/grive -p /home/t850008 > /dev/null 2>&1