php5.3 LNMP Integrated Environment installation Opcache

Source: Internet
Author: User
Tags apc
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

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.