As you know, PHP currently has three cache plug-ins: APC, Eaccelerator, XCache, but they may all disappear in the future, because PHP 5.5 is already integrated Zend Opcache, features similar to the first three but slightly different, caching speeds are said to be faster than they are.
The main principles of these PHP acceleration plug-ins are the same, that is, to buffer the PHP data into memory to avoid duplication of the compilation process, the ability to directly use the buffer compiled code to improve speed, reduce server load, their efficiency is obvious, like Drupal this huge CMS, Each time you open a page to call dozens of PHP files, execute tens of thousands of lines of code, the efficiency can be imagined, after installing an APC and other accelerators, the speed of opening the page significantly faster.
Below is in my virtual machine's LNMP environment installs the Opcache process, records.
wget https://pecl.php.net/get/zendopcache-7.0.4.tgztar zxvf zendopcache-7.0.4.tgzcd Zendopcache-7.0.4./configure--with-php-config=/usr/local/php/bin/php-configmakemake Install
Then modify the php.ini
Vim/usr/local/php/etc/php.ini Add the following content: zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626 /opcache.soopcache.memory_consumption=128opcache.interned_strings_buffer=8opcache.max_accelerated_files= 4000opcache.revalidate_freq=60opcache.fast_shutdown=1opcache.enable_cli=1
Finally restart the PHP-FPM. /ETC/INIT.D/PHP-FPM restart