导航

不许杀人,也不许放火

« Metallica : The Unforgiven II 及其他变态的中国电信 »

试了一下PHP FastCGI Process Manager

给用户准备台测试的服务器,顺便也就自己先试验一下。DELL860的服务器,单盘SATA,2G内存,双核单CPU,应该算是低档配置。

下载了php-5.2.6-fpm-0.5.8.diff.gz,解压;下载了php-5.2.6.tar.gz ,解压,然后补丁。

我是这样做的,第一次用patch,也不知道对不对,结果似乎是可以的
cd php-5.2.6
patch -p1 </root/php-5.2.6-fpm-0.5.8.diff

   
然后配置编译安装PHP
./configure --disable-debug --enable-force-cgi-redirect --enable-bcmath --enable-calendar --enable-discard-path --with-gd --with-openssl --with-zlib --enable-magic-quotes --enable-gd-native-ttf --with-ttf --with-gdbm --with-gettext --with-iconv --enable-exif --enable-sockets --enable-wddx --enable-shmop --enable-soap --enable-fastcgi --disable-rpath --enable-inline-optimization --with-gmp --with-regex=system  --enable-ctype --enable-dbase --enable-pcntl --enable-ftp --enable-mbstring --enable-sigchild --enable-sysvsem --enable-sysvshm --enable-zend-multibyte  --with-xsl --with-ldap --with-ncurses --with-curl --enable-mbregex --with-bz2 --with-libxml-dir --with-mime-magic --with-jpeg-dir --with-png-dir --with-freetype-dir --with-zlib-dir --enable-fpm --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc

一切都很顺利,装完以后在/usr/local/php/etc/下有个php-fpm.conf,编辑一下

设置用户及组,其他的都用的是默认的,有空再去仔细研究,反正也就是试试。

/usr/local/php/sbin/php-fpm start
显示Starting php_fpm  done,没问题。

nginx的安装配置就不说了,反正也不麻烦,实在要的话,点这里

真的很顺利,做个phpinfo()的测试文件,然后从另一台机器上webbench试一下,大概260多reqs/s,用nload看,100M的端口几乎就满了,对于发起测试的奔三来说,也许已经不错了。

不知道放到千兆的环境下能有什么样的表现,100M基本满的情况下,web上的负载也就是0.3到0.35之间,应该还可以上去些。

 

 

  • quote 1.lphy
  • http://www.dheart.net
  • 发现我们的工作好像很一致,研究的东西也一致,有空交流交流。我的:Lphy168#gmail.comHaha
  • 2008-6-23 21:02:14 回复该留言
  • quote 2.DR
  • 按照你的方法编译安装php make的时候出错 :( 能帮我一下吗?

    ext/standard/reg.o(.text+0x392): In function `php_ereg':
    /home/php-5.2.6/ext/standard/reg.c:236: undefined reference to `php_regexec'
    ext/standard/reg.o(.text+0x82c): In function `php_reg_replace':
    /home/php-5.2.6/ext/standard/reg.c:337: undefined reference to `php_regexec'
    ext/standard/reg.o(.text+0x10b1): In function `php_split':
    /home/php-5.2.6/ext/standard/reg.c:558: undefined reference to `php_regexec'
    ext/standard/reg.o(.text+0xf1): In function `_free_reg_cache':
    /home/php-5.2.6/ext/standard/reg.c:97: undefined reference to `php_regfree'
    collect2: ld returned 1 exit status
    *** Error code 1

    Stop in /home/php-5.2.6 (line 288 of Makefile).
  • 2008-8-12 22:27:58 回复该留言
  • quote 4.DR
  • 是的。./configure好像没有问题了 就是make时候出错了
    Generating files
    creating ./config.status
    。。。。creating sapi/cgi/fpm/php-fpm.conf
    creating sapi/cgi/fpm/php-fpm
    creating main/php_config.h
    creating main/internal_functions.c
    creating main/internal_functions_cli.c
    +--------------------------------------------------------------------+
    | License: |
    | This software is subject to the PHP License, available in this |
    | distribution in the file LICENSE. By continuing this installation |
    | process, you are bound by the terms of this license agreement. |
    | If you do not agree with the terms of this license, you must abort |
    | the installation process at this point. |
    +--------------------------------------------------------------------+

    Thank you for using PHP.
    minuteman 于 2008-8-13 11:08:16 回复
    呵呵,这个我也不懂
    纯瞎猜,也许,是不是需要PCRE?
  • 2008-8-13 9:03:14 回复该留言
  • quote 5.DR
  • 谢谢!博主回复
    问题解决了 make clean;
    从新用gmake替代了make来进行安装通过了 gmake;gmake install;
    Installing PHP SAPI module: cgi
    Installing PHP CGI binary: /usr/local/php/bin/
    Installing FPM config: /usr/local/php/etc/php-fpm.conf
    Installing init.d script: /usr/local/php/sbin/php-fpm
    Installing PHP CLI binary: /usr/local/php/bin/
    Installing PHP CLI man page: /usr/local/php/man/man1/
    Installing build environment: /usr/local/php/lib/php/build/
    Installing header files: /usr/local/php/include/php/
    Installing helper programs: /usr/local/php/bin/
    program: phpize
    program: php-config
    Installing man pages: /usr/local/php/man/man1/
    page: phpize.1
    page: php-config.1
    Installing PEAR environment: /usr/local/php/lib/php/
    [PEAR] Console_Getopt - already installed: 1.2.3
    。。。。。
  • 2008-8-13 13:36:12 回复该留言

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

Search

控制面板

首页

最近发表

友情链接

Powered By Z-Blog