DirectAdmin下安装Zend Opitimizer和eAccelerator
先安装ZendOpitimizerroot上linux
cd /usr/local/src
mkdirzend
去www.zend.com找最新的或适合的ZendOptimizer 这里以apache2和php5.2.4为例的装的ZendOptimizer 3.3.0
cd zend
wget http://downloads.zend.com/optimi ... glibc21-i386.tar.gz
tar -xzvf ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz
cd ZendOptimizer-3.3.0a-linux-*
./install.sh
然后一路回车就好了。遇到覆盖和备份php.ini的时候选择yes
okay后~
在/usr/local/lib下,php.ini就被重写保存并且存储了一个php.ini-zend_optimizer.bak 文件(未zendO前的)
这样打开你的 phpinfo就能看到有[*]with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies复制代码这句啦。 下面安装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_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"
[*]复制代码重启apache
这时候打开你的phpinfo
就显示了:[*]with eAccelerator v0.9.6, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
[*]with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
[*]with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies复制代码第一和第三个显示你的Zend和eA安装成功。
PS: zend_extension="/usr/local/bin/php/extensions/no-debug-non-zts-20060613/eaccelerator.so"eaccelerator.so的路径可以在/下find -name eaccelerator.so查到。 使用命令 php -v查看结果
smile.gif
补充,如果以zend_extension方式添加eaccelerator的话就是这样:
zend_extension="/路径/eaccelerator.so"
eaccelerator.shm_size="32"
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 最新Zend Optimizer 3.3.3版本下载地址:
http://downloads.zend.com/optimi ... glibc23-i386.tar.gz 64位版本的:http://downloads.zend.com/optimi ... ibc23-x86_64.tar.gz eAccelerator 能不能给LXADMIN装呢? 原帖由 fanslive 于 2009-7-3 17:49 发表
back.gif
eAccelerator 能不能给LXADMIN装呢?
可以,
handshake.gif
安装eAccelerator的时候,到了//编译 make 这步,为什么出现下面的错误???请高手指点!!
/bin/sh /root/eAccelerator/eaccelerator-0.9.4-rc1/libtool --mode=compile cc-I. -I/root/eAccelerator/eaccelerator-0.9.4-rc1 -DPHP_ATOM_INC -I/root/eAccelerator /eaccelerator-0.9.4-rc1/include -I/root/eAccelerator/eaccelerator-0.9.4-rc1/main -I/root/eAccelerator/eaccelerator-0.9.4-rc1 -I/usr/local/include/php -I/usr/loc al/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib-DHAVE_CONFI G_H-g -O2 -c /root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c -o eac celerator.lo
mkdir .libs
cc -I. -I/root/eAccelerator/eaccelerator-0.9.4-rc1 -DPHP_ATOM_INC -I/root/eAcce lerator/eaccelerator-0.9.4-rc1/include -I/root/eAccelerator/eaccelerator-0.9.4-r c1/main -I/root/eAccelerator/eaccelerator-0.9.4-rc1 -I/usr/local/include/php -I/ usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/ph p/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE _CONFIG_H -g -O2 -c /root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c-f PIC -DPIC -o .libs/eaccelerator.o
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c: In function 'eaccelera tor_store_int':
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c:799: error: 'align_test ' undeclared (first use in this function)
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c:799: error: (Each undec lared identifier is reported only once
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c:799: error: for each fu nction it appears in.)
make: *** Error 1 错误提示这几行:
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c:799: error: 'align_test ' undeclared (first use in this function)
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c:799: error: (Each undec lared identifier is reported only once
/root/eAccelerator/eaccelerator-0.9.4-rc1/eaccelerator.c:799: error: for each fu nction it appears in.)
make: *** Error 1没有遇到过这个问题,eaccelerator.c 第799行不知道写的啥。
页:
[1]
2