php 5.4
wget http://pecl.php.net/get/zendopcache-7.0.2.tgz tar xzf zendopcache-7.0.2.tgz cd zendopcache-7.0.2 phpize ./configure make make install
zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/opcache.so ;上面zend_extension路径为opcache.so的路径 opcache.memory_consumption=128 opcache.interned_strings_buffer=8 opcache.max_accelerated_files=4000 opcache.revalidate_freq=60 opcache.fast_shutdown=1 opcache.enable_cli=1
You can check whether it takes effect through phpinfo. The picture below is my configured PHP extension: