CentOS 6上实现LAMP的FPM模式(5)

  我们在目录中并没有找到configure脚本,所以我们要进行生成:

[root@centos6 xcache-3.2.0]# yum -y install php-devel //安装包 [root@centos6 xcache-3.2.0]# phpize //生成configure脚本 [root@centos6 xcache-3.2.0]# ls acinclude.m4 htdocs mod_optimizer aclocal.m4 includes.c NEWS AUTHORS INSTALL processor autom4te.cache install-sh README bin lib run-tests.php build ltmain.sh run-xcachetest ChangeLog Makefile.frag tests config.guess Makefile.frag.deps THANKS config.h.in Makefile.global util config.m4 missing xcache config.sub mkinstalldirs xcache.c configure mod_assembler xcache_globals.h configure.in mod_cacher xcache.h config.w32 mod_coverager xcache.ini COPYING mod_decoder xcache-test.ini devel mod_disassembler xcache-zh-gb2312.ini gen_structinfo.awk mod_encoder

  接着,我们就可以进行编译安装了:

./configure --enable-xcache --with-php-config=/app/php/bin/php-config make && make install 3、修改配置文件

  首先,我们来复制一下文件:

[root@centos6 xcache-3.2.0]# mkdir /etc/php.d/ [root@centos6 xcache-3.2.0]# cp xcache.ini /etc/php.d/ [root@centos6 xcache-3.2.0]# ls /app/php/lib/php/extensions/ no-debug-non-zts-20131226

  接着我们就可以对配置文件进行修改:

[root@centos6 xcache-3.2.0]# vim /etc/php.d/xcache.ini

  因为是源码编译,xcache不是放在对应路径下,所以需要对其路径进行修改,也就是需要修改下面这一行:

extension = /app/php/lib/php/extensions/no-debug-non-zts-20131226/xcache.so

  修改完成后,我们就可以启动服务了:

[root@centos6 xcache-3.2.0]# service php-fpm restart

  启动服务以后,我们在对其进行性能测试:

ab -c 10 -n 100 http://172.17.251.66/

  速度提升到了16,我们的加速器成功0.0
  至此,我们的实验圆满完成。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/e346331cc4562d7b2bb1c47bdab0740a.html