Get the App
SLTechnology News&Howtos  ›  Development  › 

How to install the PHP acceleration plug-in ZendOpcache

Shulou Source: shulou.com Published: 2022-06-03 17:42:25 11月13日 Update

This article mainly introduces how to install the PHP acceleration plug-in ZendOpcache, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Introduction to zendOpcache:

Download link: http://pecl.php.net/package/ZendOpcache

Zend OPcache speeds up the execution of PHP through opcode caching and optimization. It improves the performance of PHP by storing precompiled PHP scripts in shared memory. This eliminates the process of reading PHP files from disk and compiling them. In addition, it provides a small amount of bytecode optimization mode to make code execution faster

Compatibility:

The current version of Zend OPcache is available for PHP 5.2.versions, 5.3.cycles, 5.4.* and PHP-5.5 development offshoots. PHP5.2 may not be supported in the future.

Installation:

Wget http://pecl.php.net/get/zendopcache-7.0.5.tgz tar zxf zendopcache-7.0.5.tgz cd zendopcache-7.0.5./configure-- with-php-config=/usr/local/webserver/php5.4/bin/php-configmake & & make install Edit php.ini (add the following): zend_extension=/usr/local/webserver/php5.4/lib/php/extensions/no-debug-zts-20100525/opcache.soopcache.memory_consumption=128opcache Check it through the phpinfo () function after .interned _ strings_buffer=8opcache.max_accelerated_files=4000opcache.revalidate_freq=60opcache.fast_shutdown=1opcache.enable_cli=1 restarts PHP-FPM Whether the feature is enabled

After installation, the load on the web machine dropped from more than 8: 00 to more than 1: 00.

Thank you for reading this article carefully. I hope the article "how to install the PHP acceleration plug-in ZendOpcache" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and follow the industry information channel. More related knowledge is waiting for you to learn!

Tags: Articles plug-ins support compilation code value interest compatibility memory content functions branches functions simultaneously bytes performance files more faster friends Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Linux Huawei Shulou Tech Info MariaDB