下载XCache 3.0.1 并进入文件夹内 代码: wget http://xcache.lighttpd.net/pub/Releases/3.0.1/xcache-3.0.1.tar.gz tar -zxf xcache-3.0.1.tar.gz cd xcache-3.0.1 编译 代码: /usr/local/php/bin/phpize ./configure --enable-xcache --with-php-config=/usr/local/php/bin/php-config make make install 编辑php.ini文件,加入Xcache 代码: [xcache-common] extension =xcache.so [xcache.admin] xcache.admin.enable_auth =off xcache.admin.user = "账号" xcache.admin.pass = "MD5密码" [xcache] xcache.shm_scheme = "mmap" xcache.size = 128M xcache.count = 8 xcache.slots = 8K xcache.ttl = 0 xcache.gc_interval = 0 xcache.var_size = 4M 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.coredump_directory = "/tmp/xcache/" xcache.disable_on_crash = Off xcache.experimental = Off xcache.cacher = On xcache.stat = On xcache.optimizer = Off [xcache.coverager] xcache.coverager = Off xcache.coverager_autostart = On xcache.coveragedump_directory = ""