这里介绍PHP5.6.31的opcache扩展安装及配置。
步骤如下
cd /root/lnmp1.4-full/src/php-5.6.31/ext/opcache
phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
vi /usr/local/php/etc/php.ini
zend_extension=opcache.so
extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226"
/etc/init.d/php-fpm restart # 重启php-fpm