cd /usr/local/src/
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
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/php5/bin/phpize
./configure --enable-xcache -with-php-config=$PHP_PREFIX/php5/bin/php-config
make && make install
添加配置项Xcache的配置项要放在Zend的上面才行,不然可能出错。
[xcache-common]
extension_dir = "/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/"
extension = xcache.so
[xcache.admin]
xcache.admin.user = "admin"
xcache.admin.pass = ""
; xcache.admin.pass = md5($your_password)
xcache.admin.enable_auth = On
[xcache]
xcache.cacher = On
xcache.size = 64M
xcache.count = 1
xcache.slots = 8K
xcache.ttl = 3600
xcache.gc_interval = 300
xcache.var_size = 0M
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"
完成后,重启Apache。
ervice httpd restart
查看是否编译和加载成功。
php –v
暂无评论内容