这里选择的是稳定版本的1.2.2版本,2.0版本的不稳定。
wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gztar -zxf xcache-1.2.2.tar.gzcd xcachephpize./configure --enable-xcachemakemake install记录下xcache的安装目录。编辑php.ini文件,加入Xcache,作为Zend扩展。[xcache-common];; install as zend extension (recommended), normally "$extension_dir/xcache.so"zend_extension = /路径/xcache.so;; or install as extension, make sure your extension_dir setting is correct; extension = xcache.so[xcache.admin]xcache.admin.auth = Onxcache.admin.user = "mOo"; xcache.admin.pass = md5($your_password)xcache.admin.pass = ""[xcache]xcache.shm_scheme = "mmap"xcache.size = 32Mxcache.count = 1xcache.slots = 8Kxcache.ttl = 3600xcache.gc_interval = 300; Same as aboves but for variable cache; If you don't know for sure that you need this, you probably don'txcache.var_size = 0Mxcache.var_count = 1xcache.var_slots = 8Kxcache.var_ttl = 0xcache.var_maxttl = 0xcache.var_gc_interval = 300; N/A for /dev/zeroxcache.readonly_protection = Offxcache.mmap_path = "/dev/zero"xcache.cacher = Onxcache.stat = On然后重启下web服务器即可。php -v 测试下是否有显示Xcache加载成功