当前位置: 首页 > 工具软件 > Opcode XCache > 使用案例 >

xcache php5.3,XCache 2.0.1 PHP5.3.15安装笔记

齐昊苍
2023-12-01

算出密码的MD5字串,用于设置管理密码

echo -n "123456" | md5sum

配置php.ini支持XCache

vi /usr/local/php/etc/php.ini

[xcache-common]

zend_extension = /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/xcache.so

[xcache.admin]

; Change xcache.admin.user to your preferred login name

xcache.admin.user = "admin"

; Change xcache.admin.pass to the MD5 fingerprint of your password

; Use md5 -s "your_secret_password" to find the fingerprint

xcache.admin.pass = "e10adc3949ba59abbe56e057f20f883e"

[xcache]

; Change xcache.size to tune the size of the opcode cache

xcache.size = 24M

xcache.shm_scheme = "mmap"

xcache.count = 2

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

xcache.var_count = 1

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 = "/tmp/xcache"

xcache.coredump_directory = ""

xcache.cacher = On

xcache.stat = On

xcache.optimizer = Off

[xcache.coverager]

xcache.coverager = On

xcache.coveragedump_directory = ""

重启php-fpm

[root@web2 ]# /etc/init.d/php-fpm restart

Gracefully shutting down php-fpm . done

Starting php-fpm  done

[root@web2 ]#

查看phpinfo显出的信息

This program makes use of the Zend Scripting Language Engine:

Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

with XCache v2.0.1, Copyright (c) 2005-2012, by mOo

或者用探针查看是否已经支持xcache

更多信息请查看xcache官网~

 类似资料: