環境
- OS(userland): NetBSD 5.1
- kernel: NetBSD 6.99.3
- httpd: nginx 1.2.0
- PHP: 5.3.11
インストール
% ./configure --prefix=/usr/local/php \
--with-libxml-dir=/usr/pkg \
--with-mysql=/usr/pkg \
--with-xmlrpc \
--with-openssl \
--with-jpeg-dir=/usr/pkg \
--with-png-dir=/usr/pkg \
--with-zlib \
--enable-mbstring \
--with-bz2 \
--with-gd \
--with-freetype-dir=/usr/X11R7 \
--with-xpm-dir=/usr/X11R7 \
--enable-gd-native-ttf \
--enable-fpm \
--with-mcrypt=/usr/pkg \
--pdo-mysql=/usr/pkg/bin/mysql_config
% make
% su
# make install
設定
nginxで使えるように
/etc/rc.confに
php_fpm=YES
を追加
/etc/rc.d/php_fpm
#!/bin/sh
#
# $NetBSD: php_fpm.sh,v 1.2 2010/01/23 16:32:11 joerg Exp $
#
# PROVIDE: php_fpm
# REQUIRE: DAEMON
. /etc/rc.subr
name="php_fpm"
rcvar=${name}
command="/usr/local/php/sbin/php-fpm"
required_files="/usr/local/php/etc/php-fpm.conf"
pidfile="/var/run/php-fpm.pid"
#start_precmd="ulimit -n 2048"
#extra_commands="reload"
load_rc_config $name
run_rc_command "$1"