|
下面安装eAccelerator
cd /usr/local/src
mkdir eAccelerator
下载最新的eAccelerator 这里下的是0.9.6。
cd eAccelerator
wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6-rc1.tar.bz2
tar -xvjf eaccelerator-0.9.6-rc1.tar.bz2
cd eaccelerator-0.9.6-rc1
安装步骤:
输出目录,安装目录
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/bin/phpize
//显示你需要的phpize 配置安装
./configure \
--enable-eaccelerator=shared \
--with-php-config=$PHP_PREFIX/bin/php-config
//编译
make
//安装
make install
#现在创建缓存的目录 或Cache directory
cd /tmp
mkdir eaccelerator
chmod 0777 eaccelerator
编辑 php.ini
cd /usr/local/lib
vi php.ini
在[Zend]上面加[ol][eaccelerator]zend_extension="/usr/local/bin/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"eaccelerator.shm_size="1"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="3600"eaccelerator.shm_prune_period="3600"eaccelerator.shm_only="0"eaccelerator.compress="1"eaccelerator.compress_level="9"eaccelerator.keys = "disk_only"eaccelerator.sessions = "disk_only"eaccelerator.content = "disk_only"[/ol]复制代码重启apache
这时候打开你的phpinfo
就显示了:[ol]with eAccelerator v0.9.6, Copyright (c) 2004-2006 eAccelerator, by eAcceleratorwith Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologieswith Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies[/ol]复制代码第一和第三个显示你的Zend和eA安装成功。
PS: zend_extension="/usr/local/bin/php/extensions/no-debug-non-zts-20060613/eaccelerator.so" eaccelerator.so的路径可以在/下find -name eaccelerator.so查到。 |
|