以前一直用的eAccelerator缓存PHP,但是最近DX对EA支持有问题,所以选择使用了Xcache
wget http://xcache.lighttpd.net/pub/Releases/2.0.1/xcache-2.0.1.tar.gz
tar -zxvf xcache-2.0.1.tar.gz
cd xcache-2.0.1
phpize
./configure -enable-xcache 或 ./configure -enable-xcache -with-php-config=/usr/local/php/bin/php-config
make
make install
php.ini下添加
[xcache-common]
zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "admin"
xcache.admin.pass = ""
[xcache]
xcache.cacher = On
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 1
xcache.slots = 8k
xcache.ttl = 0
xcache.gc_interval = 0
xcache.var_size = 32M
xcache.var_count = 1
xcache.var_slots = 8K
xcache.var_ttl = 0
xcache.var_maxttl = 0
xcache.var_gc_interval = 300
xcache.readonly_protection = Off
xcache.mmap_path = "/dev/zero"
xcache.stat = On
xcache.optimizer = Off
文章评论