php加速器eAccelerator安装配置

unzip eAccelarator.zip cd eaccelerator-master export PHP_PREFIX="/home/server/php-5.4.15/" $PHP_PREFIX/bin/phpize /configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config make make install phpize的时候可能会提示Cannot find autoconf. apt-get install autoconf 如果提示perl: warning: Falling back to the standard locale (“C”). 先执行export LC_ALL=C 装完后,提示so库在/home/server/php-5.4.15/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so 修改php.ini: 最底部添加 [eaccelerator] extension="/home/server/php-5.4.15/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so" eaccelerator.shm_size="32" eaccelerator.cache_dir="/data/cache/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" 创建缓存目录,并设置权限: mkdir -p /data/cache/eaccelerator chmod 0777 /data/cache/eaccelerator 重启nginx+php