This article describes how to configure nginx + php-fpm mode in buntu10.04. For more information, see
Install php-fpm using ppaInstallation Kit
The code is as follows:
$ Sudo apt-get install python-software-properties
Add ppa source
The code is as follows:
$ Sudo add-apt-repository ppa: yola/php5
Install php5-fpm
This article mainly introduces the Linux system PHP-FPM installation and configuration tutorial, PHP-FMP is used for PHP FastCGI manager, often used to configure PHP and server software, need a friend can refer to the next
Basic installation method
Installation Kit
$ sudo apt-get install python-software-properties
Add ppa source
$ sudo add-apt-repository ppa:yola/php5
Install php5-
First, the pool of PHP-FPM
The PHP-FPM configuration file php-fpm.conf can be set to multiple pool, where one pool resource is exhausted, causing other sites to be unable to access resources, reporting a 502 error. It is necessary to separate the sites, using separate pool respectively.
1. Modify the configuration filepear.conf php-fpm.conf php-fpm.conf.default php.ini[[emailprotected] etc]
The pool of PHP-FPMPHP-FPM configuration file php-fpm.conf can set multiple pool, in which one pool resource is exhausted, will cause other sites to not access resources, reported 502 error. It is necessary to separate the sites, using separate pool respectively.1. Modify the configuration filepear.conf php-fpm.conf php-fpm.conf.default php.ini[[emailprotected] etc]# vim php-fpm.confinclude = etc/php-fpm.d/*.conf[global]#定义全局参数pid = /usr/local/php-
This article mainly describes how to configure PHP-FPM, common error resolution and PHP-FPM startup, shutdown, and restart.
The Nginx in the LNMP environment does not support PHP and requires the FASTCGI plug-in to process requests for PHP. and PHP needs to php-fpm This component to provide this functionality. Prior to php5.3.3 version php-
On several offline servers that are not very busy, the number of PHP-FPM processes is found to be more than 500, and some processes run for several months.
The following troubleshooting was performed to determine if there is a problem with the PHPFPM operation and whether a reboot is required.
To see if these processes are started properly
Because the start and recycle times of the worker process are printed at the notice level in Php-fpm.log, you
-k4|head-40
See the top 40 processes that consume the most memory:
Looking at the fourth column memory usage ratio, found that in addition to the MySQL database service, the PHP-FPM service pool opened too many child processes, consuming more than half of the memory, the problem was found, we began to solve the problem: set the number of control PHP-FPM process pool process.
Solve the problem
Through vari
Ext.: http://blog.csdn.net/field_yang/article/details/52401994This article mainly describes: How to configure PHP-FPM, common error resolution and PHP-FPM startup, shutdown and restart.Nginx in the LNMP environment does not support PHP and requires the fastcgi plugin to handle PHP requests. PHP needs to php-fpm This component to provide this functionality. Prior
I checked the relationship between fastcgi and php-fpm on the Internet for nearly a week. I basically read it all over again. There are different opinions and there is no authoritative definition. Some on the Internet say that fastcgi is a protocol, and php-fpm implements this Protocol; some say that php-fpm is the manager of the fastcgi process, which is used to
The pool of PHP-FPM
NIGNX can configure multiple virtual hosts, PHP-FPM also support the configuration of multiple pool, each pool can listen to a port, can also listen to a socket.
PHP-FPM Configuration Instructions:
Unlike lamp, in the LNMP architecture, PHP-FPM as a standalone service exists,
ReferenceHttp://syre.blogbus.com/logs/20092011.htmlhttp://www.mike.org.cn/articles/what-is-cgi-fastcgi-php-fpm-spawn-fcgi/Http://www.larro.cn/?p=35Nginx PHP php-fpm CGI fastcgi and so on the relationship between them confusing, Google found a day a lot of good articles introduced, but are all said to let people crazy, hereby will be the above several predecessors of the article re-organized a bit, in the sp
12.21 PHP-FPM's PoolPHP-FPM supports the definition of multiple pool, each of which can listen to different sockets or different TCP/IP;If Nginx has a number of different sites, then each site can use a pool;If all the sites are using the same pool, when it is not enough for a PHP resource, or other reasons cause 502, the site is a problem, then all sites are not normal use;Therefore, it is necessary for us to isolate different sites and use different
12.21 PHP-FPM's PoolUnlike lamp, in the LNMP architecture, a PHP-FPM-seat standalone service exists. Since it is a standalone service, it must have its own configuration file.The PHP-FPM configuration file is/usr/local/php-fpm/etc/php-fpm.conf, which also supports the include statement, similar to the include in nginx.conf.Nginx can configure multiple virtual hos
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.