Basic Installation Method
Installation Kit
$ sudo apt-get install python-software-properties
Add PPA Source
$ sudo add-apt-repository ppa:yola/php5
Install PHP5-FPM
sudo apt-get update
sudo apt-get install php5-fpm
Other necessary software installation to connect
sudo apt-get install nginx
Configure PHP-FPM
The PHP-FPM parser is the C/s structure, and its configuration file is located at:
(1)/etc/php5/fpm/php-fpm.conf
(2)/etc/php5/fpm/pool.d/
Generally there is no strict configuration requirements, or this piece I haven't specifically studied the meaning of each configuration parameter
I used the TCP mode to connect with the fastcgi process, so I modified the TCP listening address and port, modified the name of the watch directory, here without a detailed explanation, you can refer to the official documents according to their needs to configure
Restart PHP5-FPM
Installation prompts error resolution
If there is no php5-fpm in the server's system source, the installation prompts:
Reading state information ... Done
E:couldn ' t find package php5-fpm
Solutions
1. Add unofficial source to/etc/apt/sources.list
echo "Deb Http://ppa.launchpad.net/brianmercer/php/ubuntu lucid main" >>/etc/apt/sources.list
echo " DEB-SRC http://ppa.launchpad.net/brianmercer/php/ubuntu Lucid main ">>/etc/apt/sources.list
2. Install PHP5-FPM
sudo apt-get update && sudo apt-get install php5-fpm
3. Install PHP extension components
sudo apt-get install PHP-APC php5-curl php5-gd php5-imagick php5-mysql\ php5-memcache php5-memcached php5-mcrypt
4. Start PHP-FPM
SUDO/ETC/INIT.D/PHP5-FPM start
Php.in is located in/etc/php5/fpm/php.ini
Php-fpm.ini is located in/etc/php5/fpm/php5-fpm.conf
PHP-FPM startup times wrong
PHP warning:php startup:unable to load Dynamic Library '/usr/lib/php5/20060613+lfs/gd.so '-
/usr/lib/php5/20060613 +lfs/gd.so:undefined symbol:gdimagecreatefromjpeg in Unknown on line 0
Locate LIBGD view the dynamic library location of GD if the/usr/local/lib/directory has
Restart PHP-FPM
Remove warning messages when PHP-FPM starts
PHP deprecated:comments starting with ' # ' are deprecated in
/etc/php5/fpm/conf.d/imagick.ini on line 1 in Unknown on Line 0
Turn the # into; You can remove the hint.