<?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[eAccelerator 配置参数详解]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Sat, 10 Sep 2011 07:08:53 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	eaccelerator.shm_size="32"<br/>eAccelerator 可以使用的共享内存的数量 (以兆为单位) . "0" 是指操作系统的默认值. 默认值是 "0".可根据服务器的实际情况来调整，16，32，64，128都是可以的。<br/><br/>eaccelerator.cache_dir="/home/php/tmp"<br/>这个目录是给磁盘缓存使用. eAccelerator 在这里储存预先编译好的代码, 进程数据, 内容以及用户的自定义内容. 同样的数据也能被储存在共享内存中 (这样可以提高访问速度). 默认的设置是 "/tmp/eaccelerator".<br/><br/>eaccelerator.enable="1"<br/>开启或关闭 eAccelerator。"1" 为开启，"0" 为关闭。默认值为 "1"。<br/><br/>eaccelerator.optimizer="1"<br/>启或关闭内部优化器，可以提升代码执行速度。"1" 为开启，"0" 为关闭。默认值为 "1"。<br/><br/>eaccelerator.check_mtime="1"<br/>打开或者关闭 PHP 的文件修改检查. "1" 是指打开, "0" 是指关闭. 如果您在修改以后重新编译 PHP 的文件,那么您应当设置为 "1". 默认值是 "1".<br/><br/>eaccelerator.debug="0"<br/>开启或关闭调试日志记录。"1" 为开启，"0" 为关闭。默认值为 "0"。会将缓存命中得记录写入日志。<br/><br/>eaccelerator.filter=""<br/>判断哪些 PHP 文件必须缓存。您可以指定缓存和不缓存的文件类型（如 "*.php *.phtml"等）<br/>如果参数以 "!" 开头，则匹配这些参数的文件被忽略缓存。默认值为 ""，即，所有 PHP 文件都将被缓存。<br/><br/>eaccelerator.shm_max="0"<br/>当使用 " eaccelerator_put() " 函数时禁止其向共享内存中存储过大的文件。该参数指定允许存储的最大值，单位：字节 (10240, 10K, 1M)。"0" 为不限制。默认值为 "0"。<br/><br/>eaccelerator.shm_ttl="0"<br/>当 eAccelerator 获取新脚本的共享内存大小失败时，它将从共享内存中删除所有在最后 "shm_ttl" 秒内没有存取的脚本缓存。默认值为 "0"，即：不从共享内春中删除任何缓存文件。<br/><br/>eaccelerator.shm_prune_period="0"<br/>当 eAccelerator 获取新脚本的共享内存大小失败时，他将试图从共享内存中删除早于"shm_prune_period" 秒的缓存脚本。默认值为 "0"，即：不从共享内春中删除任何缓存文件。<br/><br/>eaccelerator.shm_only="0"<br/>允许或禁止将已编译脚本缓存在磁盘上。该选项对 session 数据和内容缓存无效。默认值为 "0"，即：使用磁盘和共享内存进行缓存。<br/><br/>eaccelerator.compress="1"<br/>允许或禁止压缩内容缓存。默认值为 "1"，即：允许压缩。<br/><br/>eaccelerator.compress_level="9"<br/>指定内容缓存的压缩等级。默认值为 "9"，为最高等级。<br/><br/>eaccelerator.keys = "disk_only"<br/>eaccelerator.session = "disk_only"<br/>eaccelerator.content = "disk_only"<br/>设置内容缓存的存放的地方，可以设置为：<br/>shm_and_disk 在共享缓存和硬盘(默认值)<br/>shm 默认存在共享内存，如果共享内存已满或大小超过 "eaccelerator.shm_max" 的值，就存到硬盘<br/>shm_only 只存放在共享内存<br/>disk_only 只存放在硬盘<br/>none 不缓存数据<br/><br/>eaccelerator.allowed_admin_path = "/var/www/html/21andy.com/eaccelerator"<br/>这是控制面板的地址<br/>安装包里有个control.php，你把它复制到网站的任意目录，可以用它查看和管理，这个必须指定，否则查看缓存内容的时候会出错<br/><br/>最后，来看一下我的 eAccelerator 设置<br/><div class="code"><br/>; eaccelerator<br/>&#91;eaccelerator&#93;<br/>zend_extension=&quot;/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so&quot;<br/>eaccelerator.shm_size=&quot;128&quot;<br/>eaccelerator.cache_dir=&quot;/tmp/eaccelerator&quot;<br/>eaccelerator.enable=&quot;1&quot;<br/>eaccelerator.optimizer=&quot;1&quot;<br/>eaccelerator.check_mtime=&quot;1&quot;<br/>eaccelerator.debug=&quot;0&quot;<br/>eaccelerator.filter=&quot;&quot;<br/>eaccelerator.shm_max=&quot;0&quot;<br/>eaccelerator.shm_ttl=&quot;3600&quot;<br/>eaccelerator.shm_prune_period=&quot;3600&quot;<br/>eaccelerator.shm_only=&quot;0&quot;<br/>eaccelerator.compress=&quot;1&quot;<br/>eaccelerator.compress_level=&quot;9&quot;<br/>eaccelerator.keys = &quot;disk_only&quot;<br/>eaccelerator.sessions = &quot;disk_only&quot;<br/>eaccelerator.content = &quot;disk_only&quot;<br/>eaccelerator.allowed_admin_path = &quot;/var/www/html/21andy.com/eaccelerator&quot;<br/></div><br/>另外，再说下 eAccelerator 的安装<br/><div class="code"><br/># wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2<br/># tar -jxvf eaccelerator-0.9.6.tar.bz2<br/># cd eaccelerator-0.9.6<br/># /usr/local/php/bin/phpize<br/># ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config<br/># make &amp;&amp; make install<br/></div><br/>Tags - <a href="http://www.dzhope.com/tags/eaccelerator/" rel="tag">eaccelerator</a> , <a href="http://www.dzhope.com/tags/%25E5%258F%2582%25E6%2595%25B0/" rel="tag">参数</a> , <a href="http://www.dzhope.com/tags/%25E9%2585%258D%25E7%25BD%25AE/" rel="tag">配置</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] eAccelerator 配置参数详解]]></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>