下载并安装 代码: 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 --with-php-config=/usr/local/php/bin/php-config make make install 编辑 php.ini 代码: zend_extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/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
litespeed下编译前需要编辑ZendAccelerator.c 修改此处 "apache",后加入"litespeed", 代码: 2363 static const char *supported_sapis[] = { 2364 "apache", 2365 "litespeed", 2366 "fastcgi",