首页 > Web开发 > 详细

PHP5.5+集成OPcache

时间:2015-02-28 18:39:57      阅读:294      评论:0      收藏:0      [点我收藏+]
作者:zhanhailiang 日期:2015-02-28

安装与配置

  1. 下载php-5.6.6.tar.gz

    [root@~/wade/git/billfeller.github.io/code]# wget wget http://cn2.php.net/distributions/php-5.6.6.tar.gz
  2. 通过 --enable-opcache 开启OPcache:

    ./configure  --prefix=/usr/local/php-5.6.6 --with-pear --with-iconv=/usr/local/ --enable-mysqlnd --with-mysql --with-mysqli --with-openssl --with-libxml-dir --with-curl --with-pdo-mysql --disable-fileinfo --enable-opcache --enable-soap --enable-sockets --enable-fpm --enable-mysqlnd --with-mcrypt --enable-mbstring --enable-debug --enable-maintainer-zts
    make && make install
  3. 配置php.ini:

    zend_extension=opcache.so
    [opcache]
    opcache.memory_consumption=128
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=4000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    opcache.enable_cli=1
  4. 测试:

    [root@~/wade/git/billfeller.github.io/code]# /usr/local/php-5.6.6/bin/php -m
    [Zend Modules]
    Zend OPcache

更多阅读

  1. OPcache Installation
  2. 前端开发中的性能那点事(三)php的opcode缓存

PHP5.5+集成OPcache

原文:http://blog.csdn.net/billfeller/article/details/43988009

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!