eAccelerator(缓存加速)安装教程
官方网站:http://eaccelerator.net/
什么是Eaccelerator?
也许你从没听说过 Eaccelerator ,但是我想大家都应该听说过 MMCache 吧?Eaccelerator可以算是MMCache的“后继者"。这款软件的功能就是通过在内存中缓存PHP文件从而加速PHP程序的执行速度。由于 MMCache的原作者被Zend挖走,MMCache的开发一直处于停滞状态。而Eaccelerator却借鉴了MMCache的优点而一直在不断的更新。
一. Windows下安装
eAccelerator可以安装为Zend的扩展或者PHP的扩展,我安装为PHP的扩展
1.下载eAccelerator.dll
下载地址
http://www.sitebuddy.com/PHP/Accelerators/eAccelerator_windows_binaries_builds
http://www.arnot.info/eaccelerator
2.eAccelerator.dll考到D:\php\ext 中
3.修改php.ini
extension=eAccelerator.dll
[Eaccelerator]
eaccelerator.shm_size="0"
eaccelerator.cache_dir = "D:\php\eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
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"
二. Linux下安装
1.下载eaccelerator-0.9.5.tar.bz2
下载地址:http://sourceforge.net/projects/eaccelerator
http://jaist.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.tar.bz2
2.动态安装
# cd eaccelerator-0.9.5
# export PHP_PREFIX="/usr/local/php/"
# $PHP_PREFIX/bin/phpize
# ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
# make && make install
3.修改php.ini
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
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"
4.创建缓存目录
chmod 0777 /tmp/eaccelerator
安装文档:http://www.eaccelerator.net/wiki/InstallFromSource
<div style="background-color:#FFD7FF;border:1px solid #FF66FF;padding:5px;">
- 最新评论