1. Package FPM in PHP source code
Gzip-CD php-5.2.8-fpm-0.5.10.diff.gz | patch-D php-5.2.8-p1
2. Compile and install PHP
-Enable-CGI-enable-FPM.
Problem 1 ,. /configure-Prefix =/usr/local/php-5.2.14-with-config-file-Path =/usr/local/php-5.2.14/etc-enable-FastCGI-with-mysql-with-mysqli =/usr/lib/MySQL/mysql_config-with-FreeType-Dir-with-JPEG-Dir
-With-PNG-Dir-with-zlib-with-libxml-Dir-enable-XML-with-curl-enable-force-CGI-redirect-enable-mbstring-with-mcrypt make
The following error occurs:/usr/bin/ld: cannot find-lltdl collect2: LD returned 1 exit status make: *** [SAPI/cgi/PHP-CGI] Error 1
Solution: Remove this parameter-with-mcrypt or install the mcrypt package. This package is mainly used for encryption.
Problem: Problem 2/usr/local/php-5.2.14/sbin/PHP-FPM start
Starting php_fpm-FPM-config/usr/local/php-5.2.14/etc/php-fpm.conf
Error in argument 1, char 1: no argument for Option-
Usage: PHP-CGI [-q] [-H] [-S] [-V] [-I] [-F <File>]
...
Solution:
Reinstall, compile, and install PHP
The parameters are as follows: note that the red part
. /Configure-Prefix =/usr/local/The php-5.2.14-with-mysql-with-mysqli =/usr/lib/MySQL/mysql_config-with-FreeType-Dir-with-JPEG-Dir -With-PNG-Dir-with-zlib-enable-XML-Disable-rpath
-Enable-discard-path-enable-safe-mode-enable-bcmath-enable-shmop-enable-sysvsem-enable-inline-optimization-with-curl-with-curlwrappers-enable -mbregex
-Enable-FastCGI-enable-FPM-enable-force-CGI-redirect-enable-mbstring-with-Gd-enable-Gd-native-TTF-with-OpenSSL-with-mhash -Enable-pcntl-enable-sockets-with-LDAP-sasl