[[ZFS on G7 FreeBSD9.1R-p3]] CONTENTS #contents ---- Lastmodified &lastmod; ---- *OpenPNE3 [#ncc6c8a5] install dir : /usr/local/www/apache22/data/OP3 access url : http://g7.kuji-clinic.net/OP3/ .htaccess RewriteBase /OP3/ sns.conf Alias /OP3/ "/usr/local/www/apache22/data/OP3/web/" <Directory "/usr/local/www/apache22/data/OP3/"> Options FollowSymLinks ExecCGI AllowOverride ALL Order allow,deny Allow from all </Directory> *OpenPNE3 install error [#qcca0804] OpenPNE3系のインストールで、PHPがCore吐いて落ちるので、gdbで見てみたら、こんな・・・ #0 0x000000000066ae48 in zend_hash_get_current_key_type_ex (ht=0x80247c430, pos=0x7fffffffb118) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_hash.c:1184 1184 /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_hash.c: No such file or directory. in /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_hash.c [New Thread 802407400 (LWP 100812/php)] (gdb) where #0 0x000000000066ae48 in zend_hash_get_current_key_type_ex (ht=0x80247c430, pos=0x7fffffffb118) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_hash.c:1184 #1 0x0000000000485ed8 in zif_spl_autoload_call (ht=1, return_value=0x816a2f428, return_value_ptr=0x7fffffffb470, this_ptr=0x0, return_value_used=1) at /usr/ports/lang/php5/work/php-5.4.16/ext/spl/php_spl.c:433 #2 0x00000000006436ac in zend_call_function (fci=0x7fffffffb420, fci_cache=0x7fffffffb3f0) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_execute_API.c:980 #3 0x0000000000644165 in zend_lookup_class_ex (name=0x816ba7c60 "Doctrine_Template_opCommunityTopicPluginImagesBehavior", name_length=54, key=0x0, use_autoload=1, ce=0x7fffffffb5a8) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_execute_API.c:1127 #4 0x0000000000644540 in zend_lookup_class (name=0x816ba7c60 "Doctrine_Template_opCommunityTopicPluginImagesBehavior", name_length=54, ce=0x7fffffffb5a8) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_execute_API.c:1152 #5 0x00000000006702f2 in zif_class_exists (ht=2, return_value=0x8171ecf78, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend_builtin_functions.c:1252 #6 0x00000000006920ea in zend_do_fcall_common_helper_SPEC (execute_data=0x802451680) at zend_vm_execute.h:643 #7 0x0000000000697637 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x802451680) at zend_vm_execute.h:2225 #8 0x00000000006911bd in execute (op_array=0x816940dc8) at zend_vm_execute.h:410 #9 0x00000000006574a9 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/ports/lang/php5/work/php-5.4.16/Zend/zend.c:1315 #10 0x00000000005c3946 in php_execute_script (primary_file=0x7fffffffd410) at /usr/ports/lang/php5/work/php-5.4.16/main/main.c:2494 #11 0x00000000006fed24 in do_cli (argc=4, argv=0x7fffffffd6d8) at /usr/ports/lang/php5/work/php-5.4.16/sapi/cli/php_cli.c:988 #12 0x00000000006ffd09 in main (argc=4, argv=0x7fffffffd6d8) at /usr/ports/lang/php5/work/php-5.4.16/sapi/cli/php_cli.c:1364 (gdb) で、もう一度php5のコンパイルオプションにdebugを有効にして、php5-extensionsを、 setenv FORCE_PKG_REGISTER yes とかしながら入れ直したら、エラーしなくなりますた。( ̄^ ̄)ゞ *OpenPNE 3.8.6 on FreeBSD 9.1R [#gcd469d8] http://www.openpne.jp/pne-downloads/openpne3/#openpne-3.7-3.8 G7(FreeBSD9.1R-p3の実験機)へ、k222(FreeBSD 7.1R-p16)で稼働中のSNSを引っ越してみる。 +稼働中のOpnePne3系は、sns.example.net/Com_Name/ なので、引っ越し先は、sns.example.info/Com_Name/ とする。 +データは出来るだけzpool上に置くようにデザインする。 OpenPneを取って来るために ** portinstall devel/git [#l441783a] する 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 ** portinstall lang/php5 [#x42dbb3f] ** portinstall lang/php5-extensions [#w7d00cae] 以下のExtensionは外す。 PDO_Firebird recode sybase_ct http://piano2nd.smb.net/~kuji/pukiwiki-1.4.7/index.php?cmd=read&page=munin%20on%20FreeBSD%209.0&word=%E4%B8%8B%E6%89%8B%E4%BA%BA#n19b4c8e ** MySQL [#ida58492] ***databases/mysql55-client [#bb1e8dd5] ***databases/mysql55-server [#zb25792a] [[MySQL on FreeBSD]] /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に半角でパスワードを書きます。 **databases/phpmyadmin [#kd7c48d9] [[phpMyAdmin Ver 3.4.9]] ===> 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 *OpenPNE-3.8.6 [#g7405878] 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 **EUSM [#re68a12b] ***/usr/local/etc/apache22/Includes/sns.conf [#ib9ededf] <Directory "/usr/local/www/apache22/data/EUSM"> Options FollowSymLinks ExecCGI AllowOverride ALL Order allow,deny Allow from all </Directory> <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/EUSM/(.*)$ /EUSM/web/$1 </IfModule> ***/usr/local/www/apache22/data/EUSM/web/.htaccess [#cc53e2c4] 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 / RewriteBase /EUSM/ # 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> ***/usr/local/www/apache22/data/EUSM/config/OpnePNE.yml [#n3fdb358] ###################################### # 基本設定 (Basic) ###################################### # SNS の URL # URL of the SNS base_url: "http://sns.kuji-clinic.net/EUSM" ###################################### ---- Total access &counter(total);:本日 &counter(today);:昨日 &counter(yesterday); #counter([total|today|yesterday]);