OpenPNE3セットアップ
Git使用練習兼ねて、OpenPNE3をGitから取得してセットアップしてみました。
久しぶりでバージョンが進んでいたので、ちょっとてこずりました。
引っかかった点。
Gitのタグ選択はともかく、あとの2つはセットアップガイドに書いてあった方が良いように思うのですが・・・ ^^;
Git版ダウンロードURLはこちら参照
http://www.openpne.jp/pne-downloads/openpne3/
webrootでgit clone実施。
[cake@cake html]$ git clone git://github.com/openpne/OpenPNE3.git
Initialized empty Git repository in /var/www/html/OpenPNE3/.git/
ダウンロード完了後、tagには今までの版がずらり。
[cake@cake html]$ cd OpenPNE3/
[cake@cake OpenPNE3]$ git tag -l
OpenPNE-3.0.0
OpenPNE-3.0.1
(略)
最新の安定版3.2.0を使ってみることにします。
git checkout 名前 で・・・あれ?
[cake@cake OpenPNE3]$ git checkout OpenPNE-3.2.0
Note: moving to "OpenPNE-3.2.0" which isn't a local branch
If you want to create a new branch from this checkout, you may do so
(now or later) by using -b with the checkout command again. Example:
git checkout -b
HEAD is now at 76e9765... fixed documents about plugin:publish-assets
なるほど、自前branch作れってことですね。ではでは
[cake@cake OpenPNE3]$ git checkout -b OpenPNE-3.2.0 Switched to a new branch "OpenPNE-3.2.0" [cake@cake OpenPNE3]$ git branch * OpenPNE-3.2.0 master
これでよし。
では、同梱の dic/OpenPNE3_Setup_Guide.txt を見ながら続行。
インストールコマンド実行・・・って、あれれ??
[cake@cake OpenPNE3]$ ./symfony openpne:install
PHP Warning: require_once(/WEBROOT/OpenPNE3/config/ProjectConfiguration.class.php): failed to open stream: No such file or directory in /var/www/html/OpenPNE3/symfony on line 13
PHP Fatal error: require_once(): Failed opening required '/WEBROOT/OpenPNE3/config/ProjectConfiguration.class.php' (include_path='.:/usr/share/pear:/usr/share/php') in /WEBROOT/OpenPNE3/symfony on line 13
config以下を覗いて納得。
config/ProjectConfiguration.class.phpって、sampleソースをコピーして作る必要あるみたいです。
・・・・ってこれはセットアップガイドに必ず書いておくべきなのでは? ^^;
[cake@cake OpenPNE3]$ cp config/ProjectConfiguration.class.php.sample config/ProjectConfiguration.class.php
こういう構造になってるということは、どこか書き換えの必要が有るのかなと思ってソース中身を見ましたが、書き換え必要そうな箇所が見当たりません。
そういえば3.0が出てすぐの頃は、symfonyのディレクトリパスを手書きで指定する必要があったので、その名残でしょうか・・・。
OpenPNE 3.1 セットアップガイド|OpenPNE
あと、プロキシ設定とか、何か全体に関わる設定はconfig/ProjectConfiguration.class.phpに書くっぽいのと。
コピーで作成に留めて、
改めてインストール。
[cake@cake OpenPNE3]$ ./symfony openpne:install Choose DBMS (mysql, pgsql or sqlite) mysql Type database username root Type database password (optional) ******** Type database hostname localhost Type database port number (optional) Type database name OpenPNE3 Type database socket path (optional) The DBMS mysql The Database Username root The Database Password ******** The Database Hostname localhost The Database Port Number The Database Name OpenPNE3 The Database Socket Is it OK to start this task? (y/n) y (以下、処理が流れる)
よしよし順調、と思っていたら・・・
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4864 bytes) in /WEBROOT/OpenPNE3/plugins/opCommunityTopicPlugin/lib/model/doctrine/PluginCommunityTopicTable.class.php on line 28
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 4864 bytes) in /WEBROOT/OpenPNE3/plugins/opCommunityTopicPlugin/lib/model/doctrine/PluginCommunityTopicTable.class.php on line 28
うっそぉーん (T-T)
memory_limitの設定は32MB。
そんなに低くないと思うんだけどなあ (T-T)
[root@cake ~]# vi /etc/php.ini ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 30 ; Maximum execution time of each script, in seconds max_input_time = 60 ; Maximum amount of time each script may spend parsing request data ;max_input_nesting_level = 64 ; Maximum input variable nesting level memory_limit = 32M ; Maximum amount of memory a script may consume (16MB)
基本設定を大きくして、実は凄いメモリ必要になるアプリ作ってたとかなったら困るので ^^; ソース側でmemori_limit増やす設定追加してみました。
せっかくなので、ProjectConfiguration.class.phpにて追加(笑)
[cake@cake OpenPNE3]$ vi config/ProjectConfiguration.class.php <?php // install時のメモリ不足回避用(opCommunityTopicPlugin) ini_set('memory_limit','64M');
これで再度インストール。
今度は問題なく完了。
ざっと触ってみた感じ、使用に問題ないようです。
*1:utterramblings.repo使用