Documentation
From PHP-FPM
Mailinglists
Please do not hesitate to write an email to groups if you've got any questions.
- English: highload-php-en
- Russian: highload-php-ru
Howto
PHP-FPM was tested to run on linux, macosx, solaris and freebsd.
Make sure libxml2 (and libxml2-devel) is installed, and libevent version is 1.4.12 or later
Download latest PHP and PHP-FPM
for PHP 5.2.x:
$ bzip2 -cd php-5.2.13.tar.bz2 | tar xf - $ patch -d php-5.2.13 -p1 <php-fpm-0.6~5.2.patch $ cd php-5.2.13 $ ./buildconf --force $ ./configure --enable-fastcgi --with-fpm --with-libevent[=path] ...
autorun php-fpm:
$ ln -s /usr/local/sbin/php-fpm /etc/init.d/php-fpm $ /usr/sbin/update-rc.d -f php-fpm defaults
for PHP 5.3.x:
$ cd php-5.3.x $ svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm $ ./buildconf --force $ ./configure --enable-fpm ...your other configure options, etc... $ make && make install
Edit /etc/php-fpm.conf
Run php-fpm start (probably in your $PATH)
Check logfile /var/log/php-fpm.log for details if needed
Run phpinfo() to check your site is still working
Pid of master process is stored in /var/run/php-fpm.pid
Master process understands signals
| SIGINT, SIGTERM | immediate termination |
| SIGQUIT | graceful stop |
| SIGUSR1 | re-open log file |
| SIGUSR2 | graceful reload of all workers + reload of fpm conf/binary |
