工作需要,安装了一下eaccelerator,初步测试效果并不理想..
1)下载eacclerator源码(),并解压
2)进入解压后的eaccelerator目录,运行/php安装/bin/phpsize
3)./configure --enable-eaccelerator=shared --with-php-config=/php目录/bin/php-config
4)make && make install
5)vi php.ini
extension="eaccelerator.so" #zend扩展方式要用zend_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.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"
6)创建缓目录并给予写权限
mkdir /tmp/eaccelerator
chown nobody.nobody /tmp/eaccelerator
7)重启web server,写个phpinfo测试下,OK
至于API及其它帮助文档,可参考解压后的eaccelerator目录下的doc文件夹或见以下链接:
阅读(6136) | 评论(0) | 转发(1) |