下载:
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命令中出现如下错误提示
|
Can‘t find PHP headers in /usr/include/php
The php–devel package is required for use of this command.
|
那么执行:
即可
#如果这里提示找不到此命令,请安装:yum –enablerepo=remi,remi-test install php-devel
#sh configure
……………………………………………………………………………………………………………
……………………………………………….
……………….
会要gcc的支持
不出错,安装完全,然后在php.ini最后面加上:
[eaccelerator]
-
zend_extension=”/usr/lib/php5/20060613+lfs/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″
-
-
-
-
创建cache缓存目录
-
-
mkdir /tmp/eaccelerator
-
-
chmod 777 /tmp/eaccelerator
-
重启apache
-
phpinfo
-
<?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) |