给用户准备台测试的服务器,顺便也就自己先试验一下。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之间,应该还可以上去些。

订阅我的BLOG(RSS)