编译安装 eAccelerator revision 427 for php 通过 

想到自己自从编译安装了php 5.3.3 以来还没有为它安装个缓存器,于是今天便动手了.

先从svn 里面签出最新版本 svn --username anonymous --password anonymous co http://dev.eaccelerator.net/eaccelerator/trunk eaccelerator

svn: Repository moved temporarily to 'https://svn.eaccelerator.neteaccelerator/trunk'; please relocate

提示地址更换,囧rz 怎么官网地址没更新呢

更换地址再次签出,svn --username anonymous --password anonymous co https://svn.eaccelerator.net/eaccelerator/trunk eaccelerator
成功.

进入目录,phpize 生成 configure 文件.
我的configure:
[root@PowerPC eaccelerator]# ./configure \
> --prefix=/usr/local/php/eaccelerator \
> --exec-prefix=/usr/local \
> --sysconfdir=/etc/sysconfig \
> --localstatedir=/var \
> --enable-eaccelerator \
> --enable-static=no

检查依赖,没有问题.make && make install 编译安装.

接下来让php 载入 eaccelerator.so 模块.
编辑/etc/php.ini

插入一下内容:
zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/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"

注:更多设置,参见 http://www.eaccelerator.net/wiki/Settings

保存,killall php-fpm 杀掉所有php-fpm 进程.
再次启动php-fpm 即可.
注:/tmp/eaccelerator 目录我已经有了。且确保可写入.

查看版本信息:
[root@PowerPC ~]# php-fpm -v
PHP 5.3.3 (fpm-fcgi) (built: Jul 31 2010 11:36:42)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v1.0-dev, Copyright (c) 2004-2010 eAccelerator, by eAccelerator

一切正常,安装完成.
[ ] ( 4368 次浏览 ) 永久链接 ( 3 / 2723 )

<< <上一页 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 下一页> >>