Installation and configuration of PHP-FPM under Linux system tutorial _php tips

Source: Internet
Author: User
Tags deprecated fpm install php

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

rm/usr/local/lib/libgd*

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.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.