PHP5.4.x编译安装eAccelerator

文件下载:
tar文件 https://github.com/eaccelerator/eaccelerator/tarball/master

或者

zip文件 https://github.com/eaccelerator/eaccelerator/zipball/master

tar -zxvf eaccelerator.tar.gz
cd /eaccelerator/
/usr/local/php/bin/phpize
./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config
make && make install

建立cache目录

mkdir /tmp/eaccelerator_cache
chmod 0777 /tmp/eaccelerator_cache

php.ini 添加:

[eaccelerator]
zend_extension="/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/eaccelerator.so"
eaccelerator.shm_size="1"
eaccelerator.cache_dir="/tmp/eaccelerator_cache"
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"

八月 22, 2012 | In: Linux

Comment Form

You must be logged in to post a comment.