SuperTaoer::Thanksgiving

天将降大任于世人也,必先苦其心智、劳其筋骨、饿其体肤、空乏其身,行拂乱其所为,所以动心忍性,增益其所不能。

十一月 7, 2005

使用eAccelerator的php加速器

类归于: 程序 技术 — SuperTaoer @ 1:10 下午

由于需要,研究了一下 eAccelerator ,配置很简单

下载eAccelerator后解压缩
进入目录执行

  1. /usr/local/php/phpize
  2. ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
  3. make
  4. make install

然后修改你的php.ini文件

  1. zend_extension="/usr/local/apache2/eaccelerator.so"
  2. eaccelerator.shm_size="64"
  3. eaccelerator.cache_dir="/tmp/eaccelerator"
  4. eaccelerator.enable="1"
  5. eaccelerator.optimizer="1"
  6. eaccelerator.check_mtime="1"
  7. eaccelerator.debug="0"
  8. eaccelerator.filter=""
  9. eaccelerator.shm_max="0"
  10. eaccelerator.shm_ttl="0"
  11. eaccelerator.shm_prune_period="3600"
  12. eaccelerator.shm_only="1"
  13. eaccelerator.compress="0"
  14. eaccelerator.compress_level="0"
  15. eaccelerator.keys="shm_only"
  16. eaccelerator.sessions="shm_only"
  17. eaccelerator.content="shm_only"

上面的是zend扩展的配置
下面是php扩展的配置

  1. extension="eaccelerator.so"
  2. eaccelerator.shm_size="16"
  3. eaccelerator.cache_dir="/tmp/eaccelerator"
  4. eaccelerator.enable="1"
  5. eaccelerator.optimizer="1"
  6. eaccelerator.check_mtime="1"
  7. eaccelerator.debug="0"
  8. eaccelerator.filter=""
  9. eaccelerator.shm_max="0"
  10. eaccelerator.shm_ttl="0"
  11. eaccelerator.shm_prune_period="0"
  12. eaccelerator.shm_only="0"
  13. eaccelerator.compress="1"
  14. eaccelerator.compress_level="9"

2选1,我用的是zend的扩展
我的配置是:

  1. zend_extension="/usr/local/apache2/eaccelerator.so"
  2. eaccelerator.shm_size="64"
  3. eaccelerator.cache_dir="/tmp/eaccelerator"
  4. eaccelerator.enable="1"
  5. eaccelerator.optimizer="1"
  6. eaccelerator.check_mtime="1"
  7. eaccelerator.debug="0"
  8. eaccelerator.filter=""
  9. eaccelerator.shm_max="0"
  10. eaccelerator.shm_ttl="0"
  11. eaccelerator.shm_prune_period="3600"
  12. eaccelerator.shm_only="1"
  13. eaccelerator.compress="0"
  14. eaccelerator.compress_level="0"
  15. eaccelerator.keys="shm_only"
  16. eaccelerator.sessions="shm_only"
  17. eaccelerator.content="shm_only"

另外:eaccelerator.php可以通过web来管理eAccelerator
php -q eaccelerator_password.php
会提示你输入用户名和密码:
然后会输出两行字符串,放到刚才你的php.ini文件的eaccelerator配置的后面就可以了
php -q eaccelerator_password.php
Changing password for eAccelerator Web Interface (eaccelerator.php)

Enter admin name: admin
New admin password: eaccelerator
Retype new admin password: eaccelerator

Add the following lines into your php.ini and restart HTTPD

  1. eaccelerator.admin.name="admin"
  2.  eaccelerator.admin.password="$1$0ScD9gkb$nOEmFerNMvQ576hELeLrG0"

不要忘了重启apache

PS:怎么这么没精神呢?



Leave a Message

8 Messages

 

贪婪大陆,一个可爱的地方,我知道格格的事情后,我想,用我的能力,把贪婪找回来,希望我可以融入到贪婪的,也真的希望朋友们可以接受我,该说的也说了,剩下的就是我要去做了。

 

昨天晚上到今天 现在一共4个斑斑提出了辞职~~为什么非要把好好的一个贪婪大路搞成这样?

难道不是自己亲手建立的论坛,毁灭起来就很有快感吗~~

看看格林干的事~~………不想再说什么~!

 

恩,在那里边还算好的。

 

这个
我的字还不算非常的烂吧?

 

在别人的blog上看到张图片
不小心看到了你的破字,呵呵

 

呵呵,是啊,学习去了。
你看见了?
在哪里看到的哈?
flicker?

 

我说,你去参加blog年会了?
我分明看见签名版上你的名字了。

 

RSS feed for comments on this post. TrackBack URI

Leave a Message





Powered by WordPress