仕事で諸々の事情があり、とりあえずどんなもんか確認したかったので、メモ。
公開したいURLは以下のような感じです。
http://example.com/pne
1)インストール環境
OS:cent os 5.5php:5.3.8
mysql:5.1.58
open pne:OpenPNE-3.4.15
2)ダウンロード/アップロード
本家からファイル一式をダウンロードしてきます。この時点での安定版「安定版【OpenPNE-3.4.15】」をダウンロードしました。
(wgetがうまくいかなかったので)
zipファイルをサーバにアップ。
アップロード先は /home/アカウント/apps/
※解凍したファイル群の中にwebという公開ディレクトリが含まれるのですが、これは移動してはいけません。インストール後に公開ディレクトリにシンボリックリンクを張ります。
そして解凍。
unzip openpne-OpenPNE3-OpenPNE-3.4.15-0-gcaac897.zip
そして、ディレクトリ名の変更。
mv openpne-OpenPNE3-caac897 openpne
そして、zipファイル削除
rm -rf openpne-OpenPNE3-OpenPNE-3.4.15-0-gcaac897.zip
3)config設定
設定ファイルをコピーcp openpne/config/ProjectConfiguration.class.php.sample openpne/config/ProjectConfiguration.class.php cp openpne/config/OpenPNE.yml.sample openpne/config/OpenPNE.yml
OpenPNE.ymlのファイルを変更
#7行目付近 # SNS の URL # URL of the SNS base_url: "http://example.com" #16行目付近 # SNS からのメール送信に使うドメイン # Domain to use for sending e-mail from the SNS mail_domain: "example.com"
ProjectConfiguration.class.php は特に変更はしません。
config/ProjectConfiguration.class.php.sample と config/OpenPNE.yml.sample は削除せずに残しておく。
削除すると、インストールの際にWarningがいっぱい出るのと、インストール後もWarning。
4)セットアップコマンドを実行
そして、コマンドを実行してsymfonyをインストール# php symfony openpne:install #使用するデータベースの種類を入力します。 Choose DBMS: - mysql - pgsql (unsupported) - sqlite (unsupported) mysql #データベースのユーザー名を入力します。 Type database username ***** #データベースのパスワードを入力します。 Type database password (optional) ***** #データベースサーバのホスト名を入力します。 Type database hostname localhost #データベースのポート番号を入力します。ここでは未入力のままでOKです。 Type database port number (optional) #データベース名を入力します。 Type database name Database_Name #ソケットへのパスを入力します。 Type database socket path (optional) #確認 The DBMS : mysql The Database Username : Username The Database Password : ****** The Database Hostname : localhost The Database Port Number : The Database Name : Database_Name The Database Socket : Is it OK to start this task? (Y/n) ・ ・ ・ >> installer installation is completed!
実行されるとプラグインがインストールされます。
ここまできたら、ひとまず終わりです。あとは公開の設定をするだけ。
5)公開ディレクトリの設定
公開ディレクトリに対して、シンボリックリンクを設定します。バーチャルホストで設定したhtml以下に「pne」ディレクトリを作り、それを公開ディレクトリとします。
こんな感じ。
http://example.com/pne
#ディレクトリ移動 cd /var/virtualhost/example.com/html/ #シンボリックリンク作成 1 ln -s /home/アカウント/apps/openpne/web pne
次に
/home/アカウント名/apps/open_pne/web/.htaccess
のファイルを編集します。
Options +FollowSymLinks +ExecCGI <IfModule mod_rewrite.c> RewriteEngine On # uncomment the following line, if you are having trouble # getting no_script_name to work RewriteBase /pne/ #pneにします。 # we skip all files with .something #RewriteCond %{REQUEST_URI} \..+$ #RewriteCond %{REQUEST_URI} !\.html$ #RewriteRule .* - [L] # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ index.php [QSA,L] </IfModule>
編集が終わったら、http://example.com/pneにアクセス。。。
403だに。。apache再起動してもダメ。。むむ。。
ん~と思ったら、/home/アカウント のパーミッションが【700】だったので、【755】(※755でいいのかな?)に変更!!
アクセスできた!
OK!

ログインフォームに sns@example.com / password と入力し、ログインできるかどうか確認

開いた。
(1) http://example.com/pc_backend.php にアクセス
(2) ログインフォームに admin / password と入力し、ログインできるかどうか確認
開いたOK!
長かった。。2日かかってしまった。。
参考:
OpenPNE3.4の公式セットアップ手順書
OpenPNE 3.4 導入メモ