2015年5月12日火曜日

ubuntu 14.04 server でBoincを動かそうとしてハマった

ubuntu 14.04 serverで内々のファイルサーバを構築して、そいつでBoincを走らせようとした。
$sudo apt-get install boinc-client boinc-manager
でインストール。で、とりあえずコマンドラインから
$sudo boinccmd --get_state
としてみたらAuthorization failure: -155とか言われた。無論プロジェクトの登録をしてみようが結果は同じ。まともに動いているとは思えない状態。わけわからんのでとりあえずGUIを起動してBoincManagerを立ち上げ見たところ
Unable to connect to core client
だって。とりあえずclientは動いてるみたいだけど、UIと接続できないから何も仕事はしていないはず。で、探していたらここに行き着いた。

で、Optional setup hintsのところを見たまま実行した。
何したか書こうと思ったけど説明が面倒なのでそのサイトの一部をコピペ。

If you do only the basic installation as described above, BOINC manager will not be able to automatically connect to the client. To connect the client you will be required to give the GUI RPC password every time you start BOINC manager. That is not a bug, it is a security feature to prevent other users from using the manager to manipulate the client, changing your projects, etc. Another inconvenience is that boinc (the user named boinc) owns /var/lib/boinc-client/ and all the files and directories in it so you will not be able to edit those files from your regular user account unless you add your username to the boinc group and adjust some permissions as follows, substituting your username for <username>:
 Open /etc/group in a text editor.
 Look for the line starting with boinc:x:<group ID number>:
 Edit the line to look like boinc:x:<group ID number>:<username> (<group ID number> will be a number, do not change it)
 Save the file and close the editor.
 Open a terminal and enter the following commands, substitude your username for <username>:
sudo ln -s /etc/boinc-client/gui_rpc_auth.cfg /home/<username>/gui_rpc_auth.cfg
sudo ln -s /etc/boinc-client/gui_rpc_auth.cfg /var/lib/boinc-client/gui_rpc_auth.cfg
sudo chown boinc:boinc /home/<username>/gui_rpc_auth.cfg
sudo chown boinc:boinc /var/lib/boinc-client/gui_rpc_auth.cfg
sudo chmod g+rw /var/lib/boinc-client
sudo chmod g+rw /var/lib/boinc-client/*.*
無事に動いた。