cd tmp wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2 tar -jxvf eaccelerator-0.9.6.tar.bz2 cd eaccelerator-0.9.6 /usr/bin/phpize ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config make make install
(注:以上phpize以及php-config的路径如果不知道可以使用find命令事先查找一下。)
安装完毕编辑php.ini将其安装为 PHP extension 模式
在php.ini中添加如下:
extension="eaccelerator.so" eaccelerator.shm_size="16" eaccelerator.cache_dir="/tmp/eaccelerator" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccelerator.check_mtime="1" eaccelerator.debug="0" eaccelerator.log_file = "/var/log/httpd/eaccelerator_log" eaccelerator.filter="" eaccelerator.shm_max="0" eaccelerator.shm_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0" eaccelerator.compress="1" eaccelerator.compress_level="9"
最后创建/tmp/eaccelerator目录
mkdir /tmp/eaccelerator chmod 0777 /tmp/eaccelerator