首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CGI >

php5-fpm以及fcgiwrap在ubuntu停的安装方法

2012-07-05 
php5-fpm以及fcgiwrap在ubuntu下的安装方法网上搜索 大部分都是讲怎么编译安装的, 自己也搜索过ubuntu的源

php5-fpm以及fcgiwrap在ubuntu下的安装方法
网上搜索 大部分都是讲怎么编译安装的, 自己也搜索过ubuntu的源, 没有单独的php5-fpm的安装包, 不过按照一个老外的安装方法, 还是可以不用编译的。

第一步:

aptitude install python-software-properties

第二步:

add-apt-repository ppa:brianmercer/php

第三步:

aptitude -y update

第四步:

aptitude -y install php5-fpm

安装好后, 配置一下 /etc/php5/fpm/php5-fpm.conf

pm.max_children 设置大一点, 默认是10, 这是php5-fpm的进程数。

然后就是 service php5-fpm start 启动。

php5-fpm是可以平滑重启的,修改了php.ini文件后, 用service php5-fpm reload 就能重新加载配置文件。


I've been using the dotdeb.org pacakges for my ubuntu 9.10 servers and they've been running well, except for some necessary patches to contrib modules for php 5.3.

Now ubuntu 10.04 lucid is out and has php 5.3.2 in it. While php5-fpm won't be included in an official release until at least 5.4, it has become a part of official php development and is contained in the php version control.

In order to ease installation and upgrade, I've created a debian style .deb package for php5-fpm on launchpad at https://launchpad.net/~brianmercer/+archive/php/. Unlike the dotdeb package, this one is adapted from the official ubuntu lucid source package and so has identical patches and compile options to the ubuntu 10.04 cgi and cli sapis.

This package will only work on the Ubuntu 10.04 lucid release.


I've also set up a second repository at https://launchpad.net/~brianmercer/+archive/fcgiwrap with fcgiwrap. nginx does not have the built in ability to act as a cgi gateway for perl scripts, etc, the way that apache and most other web servers do. In order to use things like awstats.pl or nagios you need to proxy those requests to a backend. I previously ran thttpd and let nginx proxy *.pl and *.cgi requests to thttpd. (boa also worked). However, Grzegorz Nosek has written a small wrapper script in C to handle these requests which works well. http://nginx.localdomain.pl/wiki/FcgiWrap

I've gone ahead and made a debian package from his code and put it up at https://launchpad.net/~brianmercer/+archive/fcgiwrap and it can be installed the same way as php5-fpm by adding the following to /etc/apt/sources.list:


See also: http://www.dotdeb.org/instructions/

~Grace

    Login or register to post comments

I was using the dotdeb repos
Posted by brianmercer on May 23, 2010 at 5:26pm

I was using the dotdeb repos on ubuntu 9.10 for a while and they worked perfectly, and it's good of Guillaume Plessis to make those packages available. I also owe him thanks because I used his scripts to make my Ubuntu packages.

To use the dotdeb packages on Ubuntu instead of Debian you have to manually install two packages:

http://us.archive.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb53_1.6.dfsg.4...http://us.archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu38_3.8-6ubuntu...


and one more if you use php5-mycrypt:

http://mirrors.kernel.org/ubuntu/pool/main/libt/libtool/libltdl3_1.5.26-...

I repackaged php5-fpm for Ubuntu on a launchpad ppa for 3 reasons:

First, I wanted to avoid the extra work for Ubuntu users of manually adding the packages above.

Second, I wanted to have php built with the identical compile options and patches as Ubuntu's current 10.04 php. Guillaume uses the php bundled gd (which is not a bad idea) and also the mysqlnd native driver, whereas Debian and Ubuntu use the official gd and the libmysql driver. There are also several code patches that Ubuntu applies that Guillaume doesn't. I wanted my php-fpm to match the decisions of the Ubuntu packagers.

Ubuntu has updated php5 twice this month to incremental releases php5-5.3.2-1ubuntu4.1 and php5-5.3.2-1ubuntu4.2 and I wanted to be able to track those patches immediately and add them to my php-fpm build.

Third, I wanted the latest version of php-fpm. Guillaume is using the fpm patch from last year that has proved very stable but didn't receive full attention from the fpm originator Andrei Nigmatulin. By the time version 5.3 and 5.2.13 were released, Andrei had already stopped updating his great work. As far as I know, there's no dev maintaining the 5.2.x branch.

Luckily, since then, fpm has been merged into the official php.net development trunk and is now actively maintained by Antony Dovgal and Jerome Loyet, two php.net devs. Jerome has put in some good work bringing in the apache-like dynamic child spawning, and Antony has been committing patches based on reported problems. They've also committed a conversion from an xml conf file to the ini format.

I'm using the very latest svn development version of fpm to get the benefits of the new code and watchful eye of php.net devs.

I completely agree with you about the state of Drupal contrib modules (and core) with respect to 5.3 compatibility. I'm up to nine patches that I have to apply now to core and to contrib modules that I use.

热点排行