CentOS6.6上でOneDriveを使ってみた
作業用ノートPCをWindows10にして放置していたところ、夜中に勝手にアップデートが入り、その後ブルースクリーン連発して使い物にならなくなった。SYSTEM_SERVICE_EXCEPTIONってなんやねん!!
データをOneDriveに入れていて、どうしても開きたかったので急遽サブマシンのCentOS6.6にOneDriveの導入を試みた。その時のメモ。
なにか良いソフトがないか調べたところ、onedrive-dというプログラムがgithubにあった。
url: https://github.com/xybu/onedrive-d
CentOS6上での情報がほとんど見当たらなかったのでログとして残しておく。
必須・依存ソフトウェア:
- Python3.x
- git
私のマシンにはデフォルトのPython2.6しか入っていなかったので現時点で最新のPython3.4.3をソースからインストールした。
Python3.4のインストール
ブラウザから下記URLへアクセスし、Python-3.4.3.tgzをダウンロードする。
url: https://www.python.org/downloads/release/python-343/
その後コマンドラインから解凍&インストールする:
$ tar zxvf ~/Downloads/Python-3.4.3.tgz $ cd ~/Downloads/Python-3.4.3 $ ./configure --prefix=/usr/local $ make $ sudo make altinstall
ついでにシンボリックリンクを貼っておく:
$ sudo ln -s /usr/local/bin/python3.4 /usr/local/bin/python3
gitのインストール
$ sudo yum install git
onedrive-dのダウンロード・インストール
セットアップ方法は古いリポジトリに詳しく書いてあったのでこちらを参考にしている。
url: https://github.com/xybu/onedrive-d-old
また、install.shがあったがcentosだと使い物にならなかったのでsetup.shを直に叩いている。。
$ cd ~/Downloads githubのリポジトリから取得してくる: $ git clone https://github.com/xybu/onedrive-d.git $ cd onedrive-d.git インストール: $ sudo /usr/local/bin/python3 setup.py install
初期設定:
OneDriveのディレクトリを作成: $ mkdir ~/OneDrive 設定用ディレクトリの作成: $ mkdir ~/.onedrive $ cp ~/Downloads/onedrive_d/res/default_ignore.ini ~/.onedrive/ignore_v2.ini $ sudo touch /var/log/onedrive_d.log $ sudo chown `whoami` /var/log/onedrive_d.log 初回設定: $ onedrive-pref Loading configuration ... OK [2015-08-18 17:51:20,921] DEBUG: thread_mgr: started. Setting up onedrive-d... (STEP 1/4) Do you want to authorize sign in with your OneDrive account? [Y/n] You will need to visit the OneDrive sign-in page in a browser, log in and authorize onedrive-d, and then copy and paste the callback URL, which should start with "https://login.live.com/oauth20_desktop.srf". The callback URL is the URL where the sign-in page finally goes blank. Please visit the sign-in URL in your browser: OAuthのパスが貼られるので、ブラウザで開く: https://login.live.com/~~~~~~~~~~~ 上記の結果のURLを貼りつける: Please paste the callback URL: https://login.live.com/oauth20_desktop.srf?code=~~~~~~ [2015-08-18 17:52:45,130] DEBUG: MainThread: config saved. onedrive-d has been successfully authorized. (STEP 2/4) Do you want to specify path to local OneDrive repository? [Y/n] Please enter the abs path to sync with your OneDrive (default: /home/someuser/OneDrive): [2015-08-18 17:53:04,689] DEBUG: MainThread: config saved. Path successfully set. (STEP 3/4) Do you want to change the numeric settings? [Y/n] How many seconds to wait for before retrying a network failure (current: 10)? Files larger than what size (in MiB) will be uploaded blocks by blocks? (current: 4.0)? When a file is uploaded blocks by blocks, what is the block size (in KiB)? (current: 512.0)? [2015-08-18 17:53:21,320] DEBUG: MainThread: config saved. (STEP 4/4) Do you want to edit the ignore list file? [Y/n] n All steps are finished. [2015-08-18 17:53:26,744] DEBUG: Dummy-2: config saved.
サービスの開始・停止方法:
$ onedrive-d start $ onedrive-d stop
startしてほったらかしておくと $ ~/OneDrive 以下に同期されました。
めでたし。
・・・と思ったが私のノートPCは直っていないのだった(白目)
スポンサードリンク
この投稿へのトラックバック
トラックバックはありません。
- トラックバック URL
この投稿へのコメント