xcache加速php

来源:互联网 发布:au软件破解 编辑:程序博客网 时间:2024/04/29 04:44
1、下载

http://xcache.lighttpd.net/wiki/Release-1.2.2

2.安装

tar zxvf xcache-1.2.2.tar.gz

cd xcache-1.2.2

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --enable-xcache --enable-xcache-optimizer

make

make install

3、配置文件(取得前面的;)

password 可以执行 echo -n '123456' | md5sum

在/usr/local/php/etc/php.ini添加入下内容

;[xcache-common]
;zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so
;;zend_extension = xcache.so
;[xcache.admin]
;; Change xcache.admin.user to your preferred login name
;xcache.admin.user = "xcache"
;; Change xcache.admin.pass to the MD5 fingerprint of your password
;; Use md5 -s "your_secret_password" to find the fingerprint
;xcache.admin.pass = "eb55c7896be0d6ceafc3fe83c62c2a48"
;[xcache]
;; Change xcache.size to tune the size of the opcode cache
;xcache.size = 128M
;xcache.shm_scheme = "mmap"
;; cpu number (cat /proc/cpuinfo |grep -c processor)
;xcache.count = 4
;xcache.slots = 8K
;xcache.ttl = 0
;xcache.gc_interval = 0
; Change xcache.var_size to adjust the size of variable cache
;xcache.var_size = 8M
;; cpu number (cat /proc/cpuinfo |grep -c processor)
;xcache.var_count = 2
;xcache.var_slots = 8K
;xcache.var_ttl = 0
;xcache.var_maxttl = 0
;xcache.var_gc_interval = 300
;xcache.test = Off
;xcache.readonly_protection = On
;xcache.mmap_path = "/dev/zero"
;xcache.coredump_directory = ""
;xcache.cacher = On
;xcache.stat = On
;xcache.optimizer = Off
;;[xcache.coverager]
;;;xcache.coverager = On
;;xcache.coveragedump_directory = ""

用ab -n10000o http://localhost/index.php

感觉和eaccelerator不相上下
原创粉丝点击