Nov 01, 2007
OpenPNE にチャレンジ
OpenPNE とは
OpenPNE はオープンソースの SNS エンジン。 面白そうなのでインストールして動かしてみた。
- OpenPNE
- http://openpne.jp/
OpenPNE のインストール
OpenPNE を Debian Etch 環境にインストールしてみた。 PHP, MySQL のバージョンは以下の通り。
# php --version PHP 5.2.0-8+etch7 (cli) (built: Jul 2 2007 21:46:15) Copyright (c) 1997-2006 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies # mysql --version mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2
OpenPNE のダウンロードと解凍、設置
OpenPNE をダウンロードして適当な場所に設置する。 OPENPNE_HOME/public_html だけ Apache HTTP Server が直接アクセスする必要があるため /var/www に設置する。 それ以外のファイルは /opt に設置した。
# wget http://internap.dl.sourceforge.net/sourceforge/openpne/OpenPNE-2.10.0.tar.gz
--19:57:52-- http://internap.dl.sourceforge.net/sourceforge/openpne/OpenPNE-2.10.0.tar.gz
=> `OpenPNE-2.10.0.tar.gz'
:
19:58:20 (187.97 KB/s) - `OpenPNE-2.10.0.tar.gz' saved [5194807/5194807]
# tar zxvf ./OpenPNE-2.10.0.tar.gz
OpenPNE-2.10.0/
OpenPNE-2.10.0/bin/
OpenPNE-2.10.0/bin/tool_send_dairy_news.cron
:
OpenPNE-2.10.0/webapp/templates/mail/m_pc_friend_intro.tpl
OpenPNE-2.10.0/webapp/templates/debug.tpl
OpenPNE-2.10.0/webapp/templates/error.tpl
# mv ./OpenPNE-2.10.0 /opt/
# ln -s /opt/OpenPNE-2.10.0 /opt/OpenPNE
# mv /opt/OpenPNE/public_html /var/www/openpne
# chown www-data:www-data -R /var/www/openpne/
OpenPNE の設定
OpenPNE の設定を行う。 設定が必要なのは
- /var/www/openpne/config.inc.php
- /opt/OpenPNE/config/php
# cp /var/www/openpne/config.inc.php /var/www/openpne/config.inc.php.original
# vi /var/www/openpne/config.inc.php
# diff /var/www/openpne/config.inc.php.original /var/www/openpne/config.inc.php
7c7
< define('OPENPNE_DIR', realpath('../'));
---
> define('OPENPNE_DIR', realpath('/opt/OpenPNE'));
# chown www-data:www-data -R /opt/OpenPNE/var/
# cp /opt/OpenPNE/config.php.sample /opt/OpenPNE/config.php
# vi /opt/OpenPNE/config.php
# diff /opt/OpenPNE/config.php.sample /opt/OpenPNE/config.php
7c7
< define('OPENPNE_URL', 'http://sns.example.com/');
---
> define('OPENPNE_URL', 'http://192.168.11.12/openpne/');
13,14c13,14
< 'username' => '',
< 'password' => '',
---
> 'username' => 'openpne',
> 'password' => 'openpne',
16c16
< 'database' => '',
---
> 'database' => 'openpne',
22c22
< define('ENCRYPT_KEY', '');
---
> define('ENCRYPT_KEY', 'password');
26c26
< define('MAIL_SERVER_DOMAIN', 'mail.example.com');
---
> define('MAIL_SERVER_DOMAIN', 'mail.example.co.jp');
# chown www-data:www-data /opt/OpenPNE/config.php
DB の作成
MySQL に DB, ユーザ、テーブルを作成し、初期データを流し込む。
# mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 337 Server version: 5.0.32-Debian_7etch1-log Debian etch distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> CREATE DATABASE `openpne` DEFAULT CHARACTER SET utf8; Query OK, 1 row affected (0.00 sec) mysql> grant all on openpne.* to openpne identified by 'openpne'; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye # mysql -u openpne -p --default-character-set=utf8 openpne < /opt/OpenPNE/setup/sql/mysql41/install/install-2.10-create_tables.sql Enter password: # mysql -u openpne -p --default-character-set=utf8 openpne < /opt/OpenPNE/setup/sql/mysql41/install/install-2.10-insert_data.sql Enter password: #
OpenPNE セットアップ画面表示
Web ブラウザから http://example.com/openpne/?m=setup にアクセスして初回設定を行う。
OpenPNE の利用
TrackBack ping me at
http://www.in-vitro.jp/blog/index.cgi/Misc/20071101_01.trackback
writeback message: Ready to post a comment.

![[openpne]](/blog/entries/Misc/20071101_01/openpne_0.png)
![[openpne]](/blog/entries/Misc/20071101_01/openpne_1.png)
![[admin console]](/blog/entries/Misc/20071101_01/openpne_admin_0.png)
![[admin console]](/blog/entries/Misc/20071101_01/openpne_admin_1.png)