OpenPNE3をインストールしてみた

openPNE

MixiライクなSNSを構築できるOpenPNE3。国産CMS。

データベース作成

環境はさくら。 データベースをあらかじめ作っておく。

アプリケーションの設定>データベースの設定> データベースの新規作成
で名前はopenpneとかSNSとか名付けた。

設定

●ssh接続
macのターミナルを開いて
$ssh -l ユーザー名 ホスト名
Are you sure you want to continue connecting (yes/no) ?でyes
そしてサーバーのパスワードを入れる。

●ダウンロード
$wget https://codeload.github.com/openpne/OpenPNE3/legacy.zip/OpenPNE-3.8.20 –no-check-certificate

●解凍
%unzip OpenPNE-3.8.20

●リネームする。
%mv openpne-OpenPNE3-ac9a15c sns

●web>.htacceceを以下のとおり変更して上書きする


#Options +FollowSymLinks +ExecCGI

RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
RewriteBase /
# 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]

●config内にあるデータを以下のようにリネーム。


OpenPNE.yml.sample->OpenPNE.yml
ProjectConfiguration.class.php.sample>ProjectConfiguration.class.php

OpenPNE.ymlのサイト設定とメール設定する。(一番上の方にまとまっている。)

●インストール


% ./symfony openpne:install

とうつと


Choose DBMS:
– mysql
– pgsql (unsupported)
– sqlite (unsupported)

と聞かれるのでmysqlを選択する

そうするとDBのユーザー名とかパスワードとか色々聞かれてくるので、最初に作ったDBと照らし合わせ入力。


Is it OK to start this task? (Y/n)

と聞かれたら「y」と押すとインストールが始まる。

エラー吐いてしまったら設定を見直し、sns/cacheフォルダを削除して再度インストールする。

Options +FollowSymLinks +ExecCGI
RewriteEngine On
# uncomment the following line, if you are having trouble
# getting no_script_name to work
RewriteBase /
# 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]

以上でインストール完了!