Home  >  Article  >  php教程  >  给PHP安装配置Opcache缓存功能

给PHP安装配置Opcache缓存功能

WBOY
WBOYOriginal
2016-06-08 17:20:241107browse

下面我们来看看关于给PHP安装配置Opcache缓存的一个功能,这样可以让你的php运行速度大增了,具体操作如下。

<script>ec(2);</script>


本文针对PHP5.5等高级版本,编译时需要加上--enable-opcache参数

编译PHP请参考编译PHP5.6

编译安装完成后,我们开始配置Opcache

[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

修改后重启PHP-FPM

service php-fpm restart

最后上个图

PHP安装配置Opcache加速你的网站 配置成功!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn