给ubuntu9.10的fastcgi方式的php增加eaccelerator0.9.6加速

1 安装编译环境

root@njava:~# sudo apt-get install build-essential php5-dev

2 安装eaccelerator

root@njava:~# axel http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2
root@njava:~# tar -xjvf eaccelerator-0.9.6.tar.bz2
root@njava:~#cd eaccelerator-0.9.6.tar.bz2
root@njava:~#sudo /usr/bin/phpize
root@njava:~/eaccelerator-0.9.6# ./configure -enable-eaccelerator=shared -with-php-config=/usr/bin/php-config
root@njava:~/eaccelerator-0.9.6# make
root@njava:~/eaccelerator-0.9.6# make install
Installing shared extensions:     /usr/lib/php5/20060613+lfs/
root@njava:~/eaccelerator-0.9.6# mkdir /tmp/eaccelerator
root@njava:~/eaccelerator-0.9.6# chmod 777 /tmp/eaccelerator/
root@njava:~/eaccelerator-0.9.6# vi /etc/php5/conf.d/eaccelerator
[eaccelerator]
zend_extension="/usr/lib/php5/20060613+lfs/eaccelerator.so"
#extension="eaccelerator.so"
eaccelerator.shm_size="128"
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="300"
eaccelerator.shm_prune_period="120"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

Tags: , ,

星期日, 三月 21st, 2010 Web

Leave a Reply

1LMooBmUE153Wnd3zDryWvDyXxQudbFxDr