FreeNAS 9のJail環境でWordpressを動作させる試みでインストールしたphpの設定です
Install WordPress on FreeNAS 9 – PHP
http://www.rootlinks.net/2013/11/15/install-wordpress-on-freenas-9-php/
Install WordPress on FreeNAS 9 – PHP extensions
http://www.rootlinks.net/2013/11/16/install-wordpress-on-freenas-9-php-extensions/
FreeNAS 9 – pkg-static: fstat() failed for(): No such file or directory
http://www.rootlinks.net/2013/11/17/freenas-9-pkg-static-fstat-failed-for-no-such-file-or-directory/
FreeNAS 9 – pkgng/pkg2ng (Reinstall php5)
http://www.rootlinks.net/2013/11/17/freenas-9-pkgngpkg2ng-reinstall_php5/
Install WordPress on FreeNAS 9 – PHP extensions(reinstall)
http://www.rootlinks.net/2013/11/17/install-wordpress-on-freenas-9-php-extensionsreinstall/
Install WordPress on FreeNAS 9 – php5-zlib
http://www.rootlinks.net/2013/11/18/install-wordpress-on-freenas-9-php5-zlib/
- php.iniの作成
- php-fpm.confの編集
- php-fpmの自動起動の設定
- php-fpmの起動
phpの設定ファイルのphp.iniを作成します。サンプルが/usr/local/etc/にあります
1 2 3 4 5 6 |
; html-script: false ] root@vhost:/root # ls /usr/local/etc/php.ini* /usr/local/etc/php.ini-development /usr/local/etc/php.ini-production root@vhost:/root # cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini |
取り敢えずdate.timezone = Asia/Tokyoだけ追加しました
1 2 3 4 5 |
; html-script: false ] root@vhost:/root # grep timezone /usr/local/etc/php.ini ; Defines the default timezone used by the date functions ; http://php.net/date.timezone date.timezone = Asia/Tokyo |
参考サイトに合わせて/usr/local/etc/php-fpm.confを編集します
1 2 3 4 5 6 7 8 9 10 |
; html-script: false ] events.mechanism = kqueue # [www] section listen = /var/run/php-fpm.sock listen.owner = www listen.group = www listen.mode = 0666 pm = ondemand pm.process_idle_timeout = 3s; |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
; html-script: false ] root@vhost:/root # echo 'php_fpm_enable="YES"' >> /etc/rc.conf root@vhost:/root # cat /etc/rc.conf portmap_enable="NO" sshd_enable="YES" sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" hostname="vhost" devfs_enable="YES" devfs_system_ruleset="devfsrules_common" nginx_enable="YES" mysql_enable="YES" php_fpm_enable="YES" |
1 2 |
; html-script: false ]root@vhost:/root # /usr/local/etc/rc.d/php-fpm start Starting php_fpm. |