문서의 선택한 두 판 사이의 차이를 보여줍니다.
다음 판 | 이전 판 | ||
linux:grive2 [2019/11/20 22:38] kwon37xi 만듦 |
linux:grive2 [2022/07/19 16:38] (현재) kwon37xi [Debian Build Package] |
||
---|---|---|---|
줄 5: | 줄 5: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
- | * PPA 설치< | + | |
- | sudo add-apt-repository ppa: | + | ===== pacstall |
- | sudo apt-get update | + | <code sh> |
- | sudo apt-get install grive | + | pacstall |
</ | </ | ||
+ | |||
+ | |||
+ | ===== Debian Build Package ===== | ||
+ | * https:// | ||
+ | |||
+ | <code sh> | ||
+ | sudo apt-get install git cmake build-essential libgcrypt20-dev \ | ||
+ | libyajl-dev libboost-all-dev libcurl4-openssl-dev libexpat1-dev \ | ||
+ | libcppunit-dev binutils-dev debhelper zlib1g-dev dpkg-dev \ | ||
+ | pkg-config libstdc++-9-dev | ||
+ | # 특히 libstdc++-9-dev 주의! 문서에는 안나오는 의존성임. 또한 Ubuntu 22.04 이전 버전에서는 '' | ||
+ | |||
+ | cd /tmp | ||
+ | git clone https:// | ||
+ | |||
+ | # 소스 압축푼 디렉토리로 이동(ext 파티션이어야 한다) | ||
+ | cd grive2 | ||
+ | |||
+ | dpkg-buildpackage -j4 | ||
+ | |||
+ | # 상위디렉토리에 deb 패키지 생성됨 | ||
+ | sudo dpkg -i < | ||
+ | |||
+ | # 마지막에 오류 발생하는 것은 무시 | ||
+ | dpkg-buildpackage: | ||
+ | | ||
+ | gpg: skipped " | ||
+ | gpg: dpkg-sign.v7YLDLyX/ | ||
+ | |||
+ | dpkg-buildpackage: | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== API 인증 ===== | ||
+ | * 2019년 11월 부터 Google Drive API 를 사용자가 작접 id와 secret 을 받아서 지정해줘야만 하게 되었다.(추후 바뀔 수 있음) | ||
+ | * https:// | ||
+ | |||
+ | - Go to https:// | ||
+ | - Search for Google Drive API and enable it. | ||
+ | - Go to API Credentials page (https:// | ||
+ | - Create a new OAuth Client credential. You will be provided with a id and a secret. Save both because you gonna need it for grive2. | ||
+ | - Then you need to follow this repo README, download grive2, build and install. Then run | ||
+ | |||
+ | <code sh> | ||
+ | grive -a --id [client id] --secret [client secret] | ||
+ | # id 는 긴코드값.apps.googleusercontent.com 형태이다. | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== 사용 ===== | ||
* 신규 동기화< | * 신규 동기화< | ||
mkdir SyncDir # 신규 동기화 디렉토리 생성 | mkdir SyncDir # 신규 동기화 디렉토리 생성 | ||
줄 23: | 줄 73: | ||
# 혹은 | # 혹은 | ||
grive -p / | grive -p / | ||
- | </ | ||
- | * 지속적 동기화 <code sh> | ||
- | # / | ||
- | 15,45 * * * * / | ||
</ | </ | ||
줄 36: | 줄 82: | ||
* **NTFS 파티션**에서 오류가 발생했다. [[linux: | * **NTFS 파티션**에서 오류가 발생했다. [[linux: | ||
+ | ===== 동기화 ===== | ||
+ | * [[linux: | ||
+ | * 하나의 구글 드라이브에 대해서 둘 중의 하나만 적용해야 한다. | ||
+ | * 아래 예에서 '' | ||
+ | |||
+ | ==== time based ==== | ||
+ | <code sh> | ||
+ | systemctl --user enable grive-timer@$(systemd-escape google-drive).timer | ||
+ | systemctl --user start grive-timer@$(systemd-escape google-drive).timer | ||
+ | </ | ||
+ | |||
+ | ==== change based ==== | ||
+ | * '' | ||
+ | |||
+ | <code sh> | ||
+ | systemctl --user enable grive-changes@$(systemd-escape google-drive).service | ||
+ | systemctl --user start grive-changes@$(systemd-escape google-drive).service | ||
+ | </ | ||
+ | |||
+ | ==== log ==== | ||
+ | <code sh> | ||
+ | journalctl -f --user-unit=grive-timer@$(systemd-escape google-drive).timer | ||
+ | journalctl -f --user-unit=grive-changes@$(systemd-escape google-drive).service | ||
+ | </ | ||
+ | * 만약 systemd 서비스가 작동하지 않는다면 '' | ||
+ | * ''/ | ||
+ | * 현재 해당 파일이 ''/ | ||
+ | * pacstall로 설치시에는 ''/ | ||
+ | |||
+ | <code sh> | ||
+ | cd / | ||
+ | sudo mkdir -p / | ||
+ | cd / | ||
+ | sudo ln -s / | ||
+ | </ | ||