当前位置: > Linux服务器 > apache >

eAccelerator加速PHP cache/xcache

时间:2016-07-14 14:33来源:linux.it.net.cn 作者:IT

下载:

http://downloads.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.zip?r=http%3A%2F%2Fwww.google.com.hk%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3DeAccelerator%2Bdownload%26source%3Dweb%26cd%3D2%26ved%3D0CGcQFjAB%26url%3Dhttp%253A%252F%252Fsourceforge.net%252Fprojects%252Feaccelerator%252Ffiles%252Flatest%252Fdownload%26ei%3DaGrNT_DFIoaciAf6k7W9Bg%26usg%3DAFQjCNGAshFBz7ZWkgOlhZckYtwophZKxQ%26cad%3Drjt&ts=1338864224&use_mirror=nchc

 

#unzip  eaccelerator-0.9.6.1.zip

#phpize

安装php扩展的时候,在phpize命令中出现如下错误提示

 
1
2
Can‘t find PHP headers in /usr/include/php
The php–devel package is required for use of this command.

那么执行:

 
1
yum install php–devel

即可

#如果这里提示找不到此命令,请安装:yum –enablerepo=remi,remi-test install  php-devel

#sh configure

……………………………………………………………………………………………………………

……………………………………………….

……………….

会要gcc的支持

不出错,安装完全,然后在php.ini最后面加上:

[eaccelerator]

  1. zend_extension=”/usr/lib/php5/20060613+lfs/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″
  15.  
  16.  
  17.  
  18. 创建cache缓存目录
    1. mkdir /tmp/eaccelerator
    2.  
    3. chmod 777 /tmp/eaccelerator
    4. 重启apache
    5. phpinfo
    6. <?php
      phpinfo();
      ?>查看之前的info.php页面,有下列字段:This program makes use of the Zend Scripting Language Engine:Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologieswith eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator想看到有eAccelerato,说明安装成功参考:http://www.osyunwei.com/archives/5274.html   http://os.51cto.com/art/201204/326845.htm




(责任编辑:IT)
------分隔线----------------------------