A-A+

PHP5.5+启用Zend OpCache

2016年11月24日 PHP 暂无评论 阅读 1,454 views 次

在php5.5以后Zend OpCache虽然被内置,但是默认是没有启用的,需要显式指定启用Zend OpCache。

 

1.安装opcache

编译安装PHP5.5的时候,需要在configure命令时加上 –-enable-opcache

 

2.在php.ini文件中添加如下配置

[Zend Opcache]

zend_extension=opcache.so

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

 

3.重启php-fpm,检查phpinfo()

qq20161124-0

 

 

标签:

给我留言

Copyright © 严佳冬 保留所有权利.   Theme  Ality 百度地图 苏ICP备19045515号-2

用户登录

分享到: