<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[在windows+apache环境下安装XCache]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Fri, 28 Dec 2012 01:02:34 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	XCache是一款提速php执行效率的工具，只要是通过对php编译空间开启一定的缓存来实现提速。<br/><br/>windows+apache环境下能实现此功能的工具不多，XCache是其中比较好的一款，推荐使用。<br/><br/>安装方法:<br/><br/>1. 下载XCache-1.3.2-php-5.3.6-Win32-VC9-x86.zip (百度最新版本)<a href="attachment.php?fid=66">点击这里下载文件</a><br/><br/>2. 将压缩包内的php_xcache.dll放至wamp&#92;bin&#92;php&#92;php5.3.8&#92;ext目录下<br/><br/>3. wamp&#92;bin&#92;apache&#92;Apache2.2.21&#92;bin&#92;php.ini文件的末尾添加:<br/><div class="code"><br/>&#91;xcache-common&#93;<br/>;; install as zend extension (recommended), normally &quot;$extension_dir/xcache.so&quot;<br/>;zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so<br/>; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so<br/>;; For windows users, replace xcache.so with php_xcache.dll<br/>;zend_extension_ts = c:/php/extensions/php_xcache.dll<br/>;; or install as extension, make sure your extension_dir setting is correct<br/>; extension = xcache.so<br/>;; or win32:<br/>extension = php_xcache.dll<br/><br/>&#91;xcache.admin&#93;<br/>xcache.admin.enable_auth = Off<br/>xcache.admin.user = &quot;mOo&quot;<br/>; xcache.admin.pass = md5($your_password)<br/>xcache.admin.pass = &quot;&quot;<br/><br/>&#91;xcache&#93;<br/>; ini only settings, all the values here is default unless explained<br/><br/>; select low level shm/allocator scheme implemenation<br/>xcache.shm_scheme =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;mmap&quot;<br/>; to disable: xcache.size=0<br/>; to enable : xcache.size=64M etc (any size &gt; 0) and your system mmap allows<br/>xcache.size&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 64M<br/>; set to cpu count (cat /proc/cpuinfo &#124;grep -c processor)<br/>xcache.count =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br/>; just a hash hints, you can always store count(items) &gt; slots<br/>xcache.slots =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8K<br/>; ttl of the cache item, 0=forever<br/>xcache.ttl&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br/>; interval of gc scanning expired items, 0=no scan, other values is in seconds<br/>xcache.gc_interval =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br/><br/>; same as aboves but for variable cache<br/>xcache.var_size&nbsp;&nbsp;=&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4M<br/>xcache.var_count =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1<br/>xcache.var_slots =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;8K<br/>; default ttl<br/>xcache.var_ttl&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br/>xcache.var_maxttl&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0<br/>xcache.var_gc_interval =&nbsp;&nbsp;&nbsp;&nbsp; 300<br/><br/>xcache.test =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Off<br/>; N/A for /dev/zero<br/>xcache.readonly_protection = Off<br/>; for *nix, xcache.mmap_path is a file path, not directory.<br/>; Use something like &quot;/tmp/xcache&quot; if you want to turn on ReadonlyProtection<br/>; 2 group of php won&#039;t share the same /tmp/xcache<br/>; for win32, xcache.mmap_path=anonymous map name, not file path<br/>xcache.mmap_path =&nbsp;&nbsp;&nbsp;&nbsp;&quot;/dev/zero&quot;<br/><br/>; leave it blank(disabled) or &quot;/tmp/phpcore/&quot;<br/>; make sure it&#039;s writable by php (without checking open_basedir)<br/>xcache.coredump_directory =&nbsp;&nbsp; &quot;&quot;<br/><br/>; per request settings<br/>xcache.cacher =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On<br/>xcache.stat&nbsp;&nbsp; =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; On<br/>xcache.optimizer =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Off<br/><br/>&#91;xcache.coverager&#93;<br/>; per request settings<br/>; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)<br/>xcache.coverager =&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Off<br/><br/>; ini only settings<br/>; make sure it&#039;s readable (care open_basedir) by coverage viewer script<br/>; requires xcache.coverager=On<br/>xcache.coveragedump_directory = &quot;&quot;4. 重启wamp服务，在phpinfo也中可见xcache配置信息即安装成功<br/></div><br/>注：本文提到的版本、程序目录路径请按实际情况处理。<br/><br/><br/>Tags - <a href="http://www.dzhope.com/tags/xcache/" rel="tag">xcache</a> , <a href="http://www.dzhope.com/tags/wamp/" rel="tag">wamp</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] 在windows+apache环境下安装XCache]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>