OpenPNEの設定とか
FC1での設定メモ。すぐ忘れるからな。しかぁし、自宅鯖にSNS作ってどうすんだって感じかもね。
http://docs.openpne.jp/
からソースをダウンロードする。
展開先は/var/local/にした。
var以下のRW設定を変更。
$ cd /var/local/OPENPNE
$ chmod -R 777 var/*
サンプルからconfig.phpを作成。
$ cp config.php.sample config.php
$ vi config.php
修正箇所
define('OPENPNE_URL', 'http://sns.hogehoge.jp/');
$GLOBALS['_OPENPNE_DSN_LIST']['main'] = array(
'dsn' => array(
'phptype' => 'mysql',
'username' => 'user',
'password' => 'pass',
'hostspec' => 'localhost',
'database' => 'SNS',
'new_link' => false,
),
);
define('ENCRYPT_KEY', 'SNS');
define('MAIL_SERVER_DOMAIN', 'mail.hogehoge.jp');
mysqlの設定
$ mysql -u user -p
Enter password: pass
データベース名は任意で「SNS」とした。
mysql> CREATE DATABASE `SNS` ;
>\q
テーブルとデータの生成sqlを実行
$ cd /var/local/OPENPNE_DIR/setup/sql
$ mysql -u user -p SNS < install_2_2_create_tables.sql
$ mysql -u user -p SNS < install_2_2_insert_data.sql
httpd.confの設定
NameVirtualHost xxx.xxx.xxx.xxx
ServerName sns.hogehoge.jp
ServerAdmin webmaster@hogehoge.jp
DocumentRoot /var/local/OPENPNE/public_html
namedの設定
/var/named/hogehoge.jp
sns IN A xxx.xxx.xxx.xxx
とする。
でもって
http://sns.hogehoge.jp/?m=setup
で設定