OPcache Improves the performance of PHP by storing the precompiled bytecode of PHP scripts in shared memory. The advantage of storing precompiled bytecode is that it eliminates the need to load and parse the PHP script each time. s expenses.
OPcache extension has been bundled in PHP 5.5.0 and subsequent versions. For PHP 5.2, 5.3 and 5.4 versions you can use the OPcache library in the PECL[2] extension.
This article mainly introduces the installation and configuration methods of PHP Opcache. The installation of Opcache requires adding enable-opcache during compilation. This article focuses on explaining Configuration method, friends who need it can refer to it
[Opcache] zend_extension = opcache.so opcache.enable=1 opcache.memory_consumption = 64 opcache.interned_strings_buffer = 8 opcache.max_accelerated_files = 4000 opcache.revalidate_freq = 60 opcache.fast_shutdown = 1 opcache.enable_cli = 1
service php-fpm restart
The above is the detailed content of How to install and configure php Opcache. For more information, please follow other related articles on the PHP Chinese website!