为PHP5.4开启Zend OPCode缓存
生活随笔
收集整理的這篇文章主要介紹了
为PHP5.4开启Zend OPCode缓存
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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
編譯步驟:
復制代碼代碼如下:
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
來源:http://www.jb51.net/article/59015.htm
總結
以上是生活随笔為你收集整理的为PHP5.4开启Zend OPCode缓存的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 苏轼的词(说一说苏轼的词的简介)
- 下一篇: 牙线(说一说牙线的简介)