CONTENTS
Lastmodified 2013-08-10 (土) 12:05:47
http://www.openpne.jp/pne-downloads/openpne3/#openpne-3.7-3.8
G7(FreeBSD9.1R-p3の実験機)へ、k222(FreeBSD 7.1R-p16)で稼働中のSNSを引っ越してみる。
OpenPneを取って来るために
する
root@G7:/root # mkdir /home/OpenPne3 root@G7:/root # cd /home/OpenPne3/ root@G7:/home/OpenPne3 # ll total 0 root@G7:/home/OpenPne3 # git clone git://github.com/openpne/OpenPNE3.git Cloning into 'OpenPNE3'... remote: Counting objects: 54395, done. remote: Compressing objects: 100% (17621/17621), done. remote: Total 54395 (delta 35724), reused 52916 (delta 34454) Receiving objects: 100% (54395/54395), 17.91 MiB | 921 KiB/s, done. Resolving deltas: 100% (35724/35724), done. root@G7:/home/OpenPne3 # root@G7:/home/OpenPne3 # root@G7:/home/OpenPne3 # ll total 2 drwxr-xr-x 15 root wheel 20 Jun 7 14:16 OpenPNE3/ root@G7:/home/OpenPne3 # cd OpenPNE3/ root@G7:/home/OpenPne3/OpenPNE3 # git checkout OpenPNE-3.8.6 Note: checking out 'OpenPNE-3.8.6'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example: git checkout -b new_branch_name HEAD is now at 055e197... version 3.8.6
OpenPNE3.8 セットアップ手順
https://raw.github.com/openpne/OpenPNE3/OpenPNE-3.8.6/doc/ja/OpenPNE3_Setup_Guide.txt
以下のExtensionは外す。
PDO_Firebird recode sybase_ct
/etc/rc.conf
mysql_enable="YES"
デフォルトでは /var/db/mysql にデータベースファイルが作成されます。もし他の場所にしたい場合は rc.conf に以下のような設定を追加します。このディレクトリが起動時になければパーミッション 700、オーナー mysqlで作成されます。
mysql_dbdir="/path/to/mysql"
mysqlの設定ファイルの雛形をコピーしておきます。(より大規模なシステムなら large や huge に)
# cp /usr/local/share/mysql/my-large.cnf /usr/local/etc/my.cnf または # cp /usr/local/share/mysql/my-medium.cnf /usr/local/etc/my.cnf # chmod 644 /usr/local/etc/my.cnf
/usr/local/etc/my.conf
[client] #password = your_password #port = 3306 port = **** socket = /tmp/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] #port = 3306 port = **** socket = /tmp/mysql.sock
以下の起動スクリプトで制御できます。
# /usr/local/etc/rc.d/mysql-server start ←デーモンを起動します # /usr/local/etc/rc.d/mysql-server restart ←デーモンを再起動します # /usr/local/etc/rc.d/mysql-server stop ←デーモンを停止します
起動できたら、rootユーザのパスワードを設定します。初期状態ではパスワードなしになっています。ここでは root@localhost の設定を変更しておきます。
# mysqladmin -u root -h localhost password 'XXXXXX' ←XXXXXXに半角でパスワードを書きます。
===> Creating users and/or groups. Using existing group `www'. phpMyAdmin-4.0.3 has been installed into: /usr/local/www/phpMyAdmin Please edit config.inc.php to suit your needs. To make phpMyAdmin available through your web site, I suggest that you add something like the following to httpd.conf: Alias /phpmyadmin/ "/usr/local/www/phpMyAdmin/" <Directory "/usr/local/www/phpMyAdmin/"> Options none AllowOverride Limit Order Deny,Allow Deny from all Allow from 127.0.0.1 .example.com </Directory> SECURITY NOTE: phpMyAdmin is an administrative tool that has had several remote vulnerabilities discovered in the past, some allowing remote attackers to execute arbitrary code with the web server's user credential. All known problems have been fixed, but the FreeBSD Security Team strongly advises that any instance be protected with an additional protection layer, e.g. a different access control mechanism implemented by the web server as shown in the example. Do consider enabling phpMyAdmin only when it is in use. ===> Correct pkg-plist sequence to create group(s) and user(s) ===> Registering installation for phpMyAdmin-4.0.3 ===> Cleaning for phpMyAdmin-4.0.3
# ln -s /usr/local/www/phpMyAdmin/ /usr/local/www/apache24/data/phpMyAdmin
https://raw.github.com/openpne/OpenPNE3/OpenPNE-3.8.6/doc/ja/OpenPNE3_Setup_Guide.txt
$ cd OpenPNE3 $ cp config/ProjectConfiguration.class.php.sample config/ProjectConfiguration.class.php $ cp config/OpenPNE.yml.sample config/OpenPNE.yml
$ ./symfony openpne:install --internet
Total access 2549:本日 2:昨日 2