Full-service Internet Marketing & Web Development
Recent Posts

Sponsors
![]() |
How to install PHP 5.2.11 with php-fpmMike Peters, 11-10-2009 |
This post will walk you through the process of installing PHP 5.2.11 to run under NGinx using PHP-FPM.
NGinx doesn't have built-in support for running PHP, it uses a third-party daemon to spawn instances of php-cgi and then communicates with those instances over sockets.
PHP-FPM is a replacement for spawn-cgi. Runs faster and is more reliable.
Step 1: Download PHP 5.2.11 and apply PHP-FPM patch
Step 2: Configure PHP
Step 3: Install
Step 4: Start PHP-FPM
NGinx doesn't have built-in support for running PHP, it uses a third-party daemon to spawn instances of php-cgi and then communicates with those instances over sockets.
PHP-FPM is a replacement for spawn-cgi. Runs faster and is more reliable.
Step 1: Download PHP 5.2.11 and apply PHP-FPM patch
cd /home
mkdir temp
cd temp
wget http://www.softwareprojects.com/files/auto/php-5.2.11.tar.gz
wget http://www.softwareprojects.com/php-5.2.11-fpm-0.5.13.diff.gz
tar zxvf php-5.2.11.tar.gz
gzip -cd php-5.2.11-fpm-0.5.13.diff.gz | patch -d php-5.2.11 -p1
mkdir temp
cd temp
wget http://www.softwareprojects.com/files/auto/php-5.2.11.tar.gz
wget http://www.softwareprojects.com/php-5.2.11-fpm-0.5.13.diff.gz
tar zxvf php-5.2.11.tar.gz
gzip -cd php-5.2.11-fpm-0.5.13.diff.gz | patch -d php-5.2.11 -p1
Step 2: Configure PHP
cd php-5.2.11
'./configure' '--enable-fastcgi' '--enable-fpm' '--enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-mysql' '--with-curl' '--with-dom' '--with-mcrypt' '--with-gd' '--with-iconv' '--with-jpeg-dir=/usr/lib' '--with-mysql=/usr/local/mysql' '--with-openssl' '--with-soap' '--with-sockets' '--with-zlib' '--enable-zip'
make all
'./configure' '--enable-fastcgi' '--enable-fpm' '--enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-mysql' '--with-curl' '--with-dom' '--with-mcrypt' '--with-gd' '--with-iconv' '--with-jpeg-dir=/usr/lib' '--with-mysql=/usr/local/mysql' '--with-openssl' '--with-soap' '--with-sockets' '--with-zlib' '--enable-zip'
make all
Step 3: Install
make install
strip /usr/local/bin/php-cgi
strip /usr/local/bin/php-cgi
Step 4: Start PHP-FPM
/usr/local/sbin/php-fpm start
|
|
Subscribe Now to receive new posts via Email as soon as they come out.
Comments
Post your comments

