[不指定 2010/08/27 10:12 | by 逍遥花主 ]
首先确定自己有否安装make模块
如果没有,请执行
复制内容到剪贴板代码:
yum install make

接着执行下面的命令

引用

wget http://bart.eaccelerator.net/source/0.9.6.1/eaccelerator-0.9.6.1.tar.bz2
tar xjf eaccelerator-0.9.6.1.tar.bz2
cd eaccelerator-0.9.6.1
/usr/bin/phpize ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config
make
make install
mkdir /tmp/eaccelerator
chmod 777 /tmp/eaccelerator


然后在/etc/php.d/中创建一个eaccelerator.ini
进入编辑状态后根据你的VPS是openVZ还是XEN选择复制下面代码

openVZ里面写上

引用

extension="eaccelerator.so"
eaccelerator.shm_size="0"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file = "/var/log/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"
eaccelerator.keys = "disk_only"
eaccelerator.sessions = "disk_only"
eaccelerator.content = "disk_only"


XEN里面写上

引用

extension="eaccelerator.so"
eaccelerator.shm_size="64"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.log_file ="/var/log/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"
eaccelerator.keys = "shm_and_disk"
eaccelerator.sessions = "shm_and_disk"
eaccelerator.content = "shm_and_disk"

然后按ESC退出编辑模式,执行以下命令:

:x

然后重启apache生效:

service httpd restart

如果是你用的Lighttpd就重启Lighttpd:

service lighttpd restart

『技术文摘』 | Tags: , | 评论(0) | 引用(0) | 阅读(15876)



发表评论
昵称 [注册]
网址
打开HTML 打开UBB 打开表情 隐藏 记住我