Home> php教程> php手册> body text

为PHP5.4开启Zend OPCode缓存

WBOY
Release: 2016-06-06 20:15:18
Original
687 people have browsed it

PHP5.5开始内置了Zend OPcache的缓存系统,这个系统在5.2-5.4下也是可以使用的。经过测试,在php5.4下的加速性能明显,效果比5.2+ea还要好,在此推荐安装

编译步骤:

复制代码代码如下:


git clone git://github.com/zend-dev/ZendOptimizerPlus.git
cd ZendOptimizerPlus
$PHP_DIR/bin/phpize
./configure \
--with-php-config=$PHP_DIR/bin/php-config
make && make install

配置步骤:在 php.ini 内增加zend_extension=/...full path.../opcache.so下面这段是官方推荐的配置参数,可以更加提升性能,,建议使用:opcache.memory_consumption=128opcache.interned_strings_buffer=8opcache.max_accelerated_files=4000opcache.revalidate_freq=60opcache.fast_shutdown=1opcache.enable_cli=1另:PHP5.5下只需要编译时增加 --enable-opcache 参数即可推荐使用:Zend OPcache 控制面板:
https://gist.github.com/ck-on/4959032

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!