オープンソースでクラウドサービスを作るソフトとしては、代表的なものに「ownCloud」や「Pydio」があります。
前者はどちらかというと、個人から小規模なグループ向け、後者はActive DirectoryやLDAPと連携して、ACL(アクセス制御リスト)がしっかりできるものです。
Pydio
http://pyd.io/
このソフト、スマホ、タブレットの専用アプリが用意されている点がすごいです。
iOS
https://itunes.apple.com/us/app/pydio/id709275884?mt=8
Android
https://play.google.com/store/apps/details?id=com.pydio.android.Client
インストール
前提条件として、Apacheとphp(+sqlite)が入っている必要があるので
sudo apt-get install apache2 libapache2-mod-php5 php5-cgi php5-cli php5-common php5-curl php5-enchant php5-fpm php5-gd php5-gmp php5-imap php5-interbase php5-intl php5-ldap php5-mcrypt php5-mysqlnd php5-odbc php5-pgsql php5-pspell php5-recode php5-snmp php5-tidy php5-xmlrpc php5-xsl php5-sqlite
次にパッケージを展開します
cd /var/www curl -s "http://jaist.dl.sourceforge.net/project/ajaxplorer/pydio/stable-channel/6.0.2/pydio-core-6.0.2.tar.gz" | tar -xzf - mv pydio-core-6.0.2 pydio chmod 744 pydio/data -R chown www-data.www-data pydio -R
これで、http://(RasPIのIP)/pydio/で設定画面に入れるはず
ですが、まず入ろうとすると、いろいろと警告やら注意が出ると思います
よく出る問題と対処方法
■ - Security Breach - error
It seems that your data/ folder is not correctly protected, and that subfolders (like the data/cache/ folder) are web-accessible. If you are using Apache, make sure the AllowOverride All option is active for your current directory. If you are running Windows IIS, you must manually add a RequestFiltering/HiddenSegments configuration to prevent web access to these folders. If you have defined a different AJXP_DATA_PATH pointing outside the webfolder, you can ignore this warning.
一時保存領域にアクセス権限がないと発生します
apacheの設定で sudo vi /etc/apache2/sites-available/default #DocumentRootの記述以下に <Directory "/var/www/pydio"> Options FollowSymLinks MultiViews AllowOverride Limit FileInfo Order allow,deny Allow from all <Directory > もう一個 sudo vi /etc/apache2/sites-available/default-ssl 同じく #DocumentRootの記述以下に <Directory "/var/www/pydio"> Options FollowSymLinks MultiViews AllowOverride Limit FileInfo Order allow,deny Allow from all <Directory > を追記して、apacheをリスタートすればOK service apache2 restart
■ - PHP Command Line - warning
Php command line not detected, this is NOT BLOCKING, but enabling it could allow to send some long tasks in background. If you do not have the ability to tweak your server, you can safely ignore this warning.
phpのバイナリの位置を確認しているわけではなく、キャッシュ(AJXP_CACHE_DIR)の書き込み可否を判断しているので
以下のコマンド実行でOK
touch /var/www/pydio/data/cache/cli_result.php chmod 700 /var/www/pydio/data/cache -R chown www-data.www-data /var/www/pydio/data -R
■ - SSL Encryption - warning
You are not using SSL encryption, or it was not detected by the server. Be aware that it is strongly recommended to secure all communication of data over the network. Suggestion : if your server supports HTTPS, set the AJXP_FORCE_SSL_REDIRECT parameter in the conf/bootstrap_conf.php file.
SSL(https)で保護されてないですよっていう警告ですね、 証明書を作って組み込むしかないので適当にオレオレ証明を作るか、FreeSSLを申請して証明書を取得して組み込めば消えます。
家の中でしか使わないって言うなら無視も可能です
無視する場合は展開先のconf/bootstrap_conf.phpを開いて sudo vi /var/www/pydio/conf/bootstrap_conf.php 以下のところを //define("AJXP_FORCE_SSL_REDIRECT", true); 以下のように変更して保存 define("AJXP_FORCE_SSL_REDIRECT", false);
この場合、通信を傍受された場合中身見えちゃうっていう危険があります。一般人は気にすることでもないんですけど 企業で使う場合はしっかりやりましょう、警告無視もその場合はだめですよ
■ - Server charset encoding - warning
You must set a correct charset encoding in your locale definition in the form: en_us.UTF-8. Please refer to setlocale man page. If your detected locale is C, simply type echo $LANG on your server command line to read the correct value.Detected locale: C (using UTF-8) Suggestion : Set the AJXP_LOCALE parameter to the correct value in the conf/bootstrap_conf.php file. You can also set this value using the installer form (next step).
文字コードがデフォルトだとen_us.UTF-8(USA英語)になっているけどいいか?というものなので、海外であれば無視してもいいです。 が、ここは日本で、OSの設定も日本語なので
展開先のconf/bootstrap_conf.phpを開いて sudo vi /var/www/pydio/conf/bootstrap_conf.php 以下のようになっている箇所を define("AJXP_LOCALE","en_US.UTF-8"); 以下のように変更して保存します define("AJXP_LOCALE","ja_JP.UTF-8");
設定が無事終わっているか、警告を無視してセットアップに進むと
こんな感じにウィザードが開きますので、言語をEnglishから日本語にします
そしたら、[Start Wizard]のリンクをクリックします、間違ってもボタンのほうは押さないように(押しても反応しませんが)
ウィザードを開くと管理者のIDとパスワードを求められるので、入力します。管理者のID/PWは簡単なものは危険なので複雑にしましょう。あと、忘れたりすると取り返しがつかないので、メモ帳などにコピペ推奨
入力したら、Global optionsへ(セットアップ完了まで部分的にしか日本語にならないのでそこは我慢してください)
サーバのパスが違う場合は自分の設定した位置に、
クラウドの名称は感じのいいものにしましょう(私はセンスないですけど…)、
ウェルムメッセージは設定してもしなくてもいいのですけど、ログイン時に必ず見るのでお知らせ的に使ってもいいと思います
投稿とリマインドにメールを使うかどうかは好みで。
(制限超えたので、次回へ続くw)