<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>兔子窝边草</title>
	<atom:link href="http://yongzou.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://yongzou.com</link>
	<description>“Unless you try to do something beyond what you have already mastered, you will never grow.” - Ralph Waldo Emerson</description>
	<lastBuildDate>Sun, 09 Jan 2011 13:49:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase比较</title>
		<link>http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/</link>
		<comments>http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 13:49:35 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/</guid>
		<description><![CDATA[原文: http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison While SQL databases are insanely useful tools, their tyranny of ~15 years is coming to an end. And it was just time: I can&#8217;t even count &#8230; <a href="http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>原文:</p>
<p><a title="http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis" href="http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis">http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis</a></p>
<h3>Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase comparison</h3>
<p>While SQL databases are insanely useful tools, their tyranny of ~15 years is coming to an end. And it was just time: I can&#8217;t even count the things that were forced into relational databases, but never really fitted them. </p>
<p>But the differences between &quot;NoSQL&quot; databases are much bigger than it ever was between one SQL database and another. This means that it is a bigger responsibility on <a href="http://kkovacs.eu/kristof-kovacs-software-architect-resume">software architects</a> to choose the appropriate one for a project right at the beginning. </p>
<p>In this light, here is a comparison of <a href="http://cassandra.apache.org/">Cassandra</a>, <a href="http://www.mongodb.org/">Mongodb</a>, <a href="http://couchdb.apache.org/">CouchDB</a>, <a href="http://redis.io/">Redis</a>, <a href="http://www.basho.com/Riak.html">Riak</a> and <a href="http://hbase.apache.org/">HBase</a>: </p>
<p>  <span id="more-27"></span><br />
<h4>CouchDB</h4>
<ul>
<li><strong>Written in:</strong> Erlang </li>
<li><strong>Main point:</strong> DB consistency, ease of use </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST </li>
<li>Bi-directional (!) replication, </li>
<li>continuous or ad-hoc, </li>
<li>with conflict detection, </li>
<li>thus, master-master replication. (!) </li>
<li>MVCC &#8211; write operations do not block reads </li>
<li>Previous versions of documents are available </li>
<li>Crash-only (reliable) design </li>
<li>Needs compacting from time to time </li>
<li>Views: embedded map/reduce </li>
<li>Formatting views: lists &amp; shows </li>
<li>Server-side document validation possible </li>
<li>Authentication possible </li>
<li>Real-time updates via _changes (!) </li>
<li>Attachment handling </li>
<li>thus, <a href="http://couchapp.org/">CouchApps</a> (standalone js apps) </li>
<li>jQuery library included </li>
</ul>
<p><strong>Best used:</strong> For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important. </p>
<p><strong>For example:</strong> CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments. </p>
<h4>Redis</h4>
<ul>
<li><strong>Written in:</strong> C/C++ </li>
<li><strong>Main point:</strong> Blazing fast </li>
<li><strong>License:</strong> BSD </li>
<li><strong>Protocol:</strong> Telnet-like </li>
<li>Disk-backed in-memory database, </li>
<li>but since 2.0, it can swap to disk. </li>
<li>Master-slave replication </li>
<li>Simple keys and values, </li>
<li>but <a href="http://redis.io/commands">complex operations</a> like ZREVRANGEBYSCORE </li>
<li>INCR &amp; co (good for rate limiting or statistics) </li>
<li>Has sets (also union/diff/inter) </li>
<li>Has lists (also a queue; blocking pop) </li>
<li>Has hashes (objects of multiple fields) </li>
<li>Of all these databases, only Redis does transactions (!) </li>
<li>Values can be set to expire (as in a cache) </li>
<li>Sorted sets (high score table, good for range queries) </li>
<li>Pub/Sub and WATCH on data changes (!) </li>
</ul>
<p><strong>Best used:</strong> For rapidly changing data with a foreseeable database size (should fit mostly in memory). </p>
<p><strong>For example:</strong> Stock prices. Analytics. Real-time data collection. Real-time communication. </p>
<h4>MongoDB</h4>
<ul>
<li><strong>Written in:</strong> C++ </li>
<li><strong>Main point:</strong> Retains some friendly properties of SQL. (Query, index) </li>
<li><strong>License:</strong> AGPL (Drivers: Apache) </li>
<li><strong>Protocol:</strong> Custom, binary (BSON) </li>
<li>Master/slave replication </li>
<li>Queries are javascript expressions </li>
<li>Run arbitrary javascript functions server-side </li>
<li>Better update-in-place than CouchDB </li>
<li>Sharding built-in </li>
<li>Uses memory mapped files for data storage </li>
<li>Performance over features </li>
<li>After crash, it needs to repair tables </li>
</ul>
<p><strong>Best used:</strong> If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks. </p>
<p><strong>For example:</strong> For all things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back. </p>
<h4>Cassandra</h4>
<ul>
<li><strong>Written in:</strong> Java </li>
<li><strong>Main point:</strong> Best of BigTable and Dynamo </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> Custom, binary (Thrift) </li>
<li>Tunable trade-offs for distribution and replication (N, R, W) </li>
<li>Querying by column, range of keys </li>
<li>BigTable-like features: columns, column families </li>
<li>Writes are much faster than reads (!) </li>
<li>Map/reduce possible with Apache Hadoop </li>
<li>I admit being a bit biased against it, because of the bloat and complexity it has partly because of Java (configuration, seeing exceptions, etc) </li>
</ul>
<p><strong>Best used:</strong> When you write more than you read (logging). If every component of the system must be in Java. (&quot;No one gets fired for choosing Apache&#8217;s stuff.&quot;) </p>
<p><strong>For example:</strong> Banking, financial industry (though not necessarily for financial transactions, but these industries are much bigger than that.) Writes are faster than reads, so one natural niche is real time data analysis. </p>
<h4>Riak</h4>
<ul>
<li><strong>Written in:</strong> Erlang &amp; C, some Javascript </li>
<li><strong>Main point:</strong> Fault tolerance </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST </li>
<li>Tunable trade-offs for distribution and replication (N, R, W) </li>
<li>Pre- and post-commit hooks, </li>
<li>for validation and security. </li>
<li>Built-in full-text search </li>
<li>Map/reduce in javascript or Erlang </li>
<li>Comes in &quot;open source&quot; and &quot;enterprise&quot; editions </li>
</ul>
<p><strong>Best used:</strong> If you want something Cassandra-like (Dynamo-like), but no way you&#8217;re gonna deal with the bloat and complexity. If you need very good single-site scalability, availability and fault-tolerance, but you&#8217;re ready to pay for multi-site replication. </p>
<p><strong>For example:</strong> Point-of-sales data collection. Factory control systems. Places where even seconds of downtime hurt. </p>
<h4>HBase</h4>
<p>(With the help of ghshephard) </p>
<ul>
<li><strong>Written in:</strong> Java </li>
<li><strong>Main point:</strong> Billions of rows X millions of columns </li>
<li><strong>License:</strong> Apache </li>
<li><strong>Protocol:</strong> HTTP/REST (also Thrift) </li>
<li>Modeled after BigTable </li>
<li>Map/reduce with Hadoop </li>
<li>Query predicate push down via server side scan and get filters </li>
<li>Optimizations for real time queries </li>
<li>A high performance Thrift gateway </li>
<li>HTTP supports XML, Protobuf, and binary </li>
<li>Cascading, hive, and pig source and sink modules </li>
<li>Jruby-based (JIRB) shell </li>
<li>No single point of failure </li>
<li>Rolling restart for configuration changes and minor upgrades </li>
<li>Random access performance is like MySQL </li>
</ul>
<p><strong>Best used:</strong> If you&#8217;re in love with BigTable. <img src='http://yongzou.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And when you need random, realtime read/write access to your Big Data. </p>
<p><strong>For example:</strong> Facebook Messaging Database (more general example coming soon) </p>
<p>Of course, all systems have much more features than what&#8217;s listed here. I only wanted to list the key points that I base my decisions on. Also, development of all are very fast, so things are bound to change. I&#8217;ll do my best to keep this list updated. </p>
<p>&#8211; Kristof </p>
<p>&#160;</p>
<p>CouchDB   <br />语言 Erlang    <br />特征 数据库一致性，易于使用    <br />适合 积累性的、较少改变的数据。或者是需要文档的多版本支持（？这句话翻译不好 Places where versioning is important）    <br />场合 CRM CMS    </p>
<p>Redis   <br />语言 c/c++    <br />特征 非常快    <br />适合 总数据集快速变化且总量可预测    <br />场合 股票价格、实时分析、实时数据收集、实时通信    </p>
<p>MongoDB   <br />语言 c++    <br />特征 与sql风格类似（查询/索引）    <br />适合 动态查询; 索引比map/reduce方式更合适时; 需要CouchDB但数据变动更多时    <br />场合 任何用Mysql/PostgreSQL，但是无法忍受预先定义好所有列的时候    </p>
<p>Cassandra   <br />语言 java    <br />适合 写入比查询多    <br />略 （我个人也觉得不靠谱）</p>
<p>Riak   <br />语言 c++/erlang javascript    <br />据说有开源版和企业版    <br />特征 容错    <br />适合 需要Cassandra式的扩展性，但是不想惹麻烦    <br />场合 销售数据收集 &#8230; 反正坏一秒就很麻烦的场合    </p>
<p>hbase   <br />语言 java    <br />类似 bigtable    <br />适用 随机读取</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/cassandra-vs-mongodb-vs-couchdb-vs-redis-vs-riak-vs-hbase%e6%af%94%e8%be%83-27/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>17 Useful Htaccess Tricks and Tips</title>
		<link>http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/</link>
		<comments>http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/#comments</comments>
		<pubDate>Sat, 25 Dec 2010 02:36:47 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/</guid>
		<description><![CDATA[Introduction Some people might not aware of the power of htaccess, I have 17 htaccess methods in this article which I have used or tested it before, and I think some of them are essential tricks and tips to protect &#8230; <a href="http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h4>Introduction</h4>
<p>Some people might not aware of the power of htaccess, I have 17 htaccess methods in this article which I have used or tested it before, and I think some of them are essential tricks and tips to protect your webserver against malicious attacks and other would able to perform simple tasks efficiently such as redirection and web server optimization.</p>
<p>Last but not least, if you have been looking for <a href="http://glowhost.com/">web hosting</a> services, you might want to have a look at this <a href="http://glowhost.com/hosting/shared/unlimited-hosting.php">unlimited web hosting</a>. <img src='http://yongzou.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>General</h4>
<p>The following htaccess will able to help you to achieve simple task such as redirection and web server optimization.</p>
<h4>1. Set Timezone</h4>
<p>Sometimes, when you using date or mktime function in php, it will show you a funny message regarding timezone. This is one of the way to solve it. Set timezone for your server. A list of supported timezone can be found <b><a href="http://www.php.net/manual/en/timezones.php">here</a></b></p>
<pre>SetEnv TZ Australia/Melbourne</pre>
<h4>2. SEO Friendly 301 Permanent Redirects</h4>
<p>Why it&#8217;s SEO friendly? Nowadays, some modern serach engine has the capability to detect 301 Permanent Redirects and update its existing record.</p>
<pre>Redirect 301 http://www.queness.com/home http://www.queness.com/</pre>
<h4>3. Skip the download dialogue</h4>
<p>Usually when you try to download something from a web server you get a request asking whether you want to save the file or open it. To avoid that you can use the below code on your .htaccess file</p>
<pre>AddType application/octet-stream .pdf
AddType application/octet-stream .zip
AddType application/octet-stream .mov</pre>
<h4>4. Skip www</h4>
<p>One of the SEO guideline is, make sure there is only one URL pointing to your website. Therefore, you will need this to redirect all www traffic to non-ww, or the other way around.</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.queness.com [NC]
RewriteRule ^(.*)$ http://queness.com/$1 [L,R=301]</pre>
<h4>5. Custom Error page</h4>
<p>Create a custom error page for each of the error codes.</p>
<pre>ErrorDocument 401 /error/401.php
ErrorDocument 403 /error/403.php
ErrorDocument 404 /error/404.php
ErrorDocument 500 /error/500.php</pre>
<h4>6. Compress files</h4>
<p>Optimize your website loading time by compressing files into smaller size.</p>
<pre># compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript</pre>
<h4>7. Cache files</h4>
<p>File caching is another famous approach in optimizing website loading time</p>
<pre>&lt;FilesMatch &quot;.(flv|gif|jpg|jpeg|png|ico|swf|js|css|pdf)$&quot;&gt;
Header set Cache-Control &quot;max-age=2592000&quot;
&lt;/FilesMatch&gt;</pre>
<h4>8. Disable caching for certain file type</h4>
<p>Well, in the other hand, you can disable caching for certain file type.</p>
<pre># explicitly disable caching for scripts and other dynamic files
&lt;FilesMatch &quot;.(pl|php|cgi|spl|scgi|fcgi)$&quot;&gt;
Header unset Cache-Control
&lt;/FilesMatch&gt;</pre>
<h4>Security</h4>
<p>The following htaccess code will able to enhance the security level of your webserver. Hotlinking protection is pretty useful to avoid other people using images that stored in your server.</p>
<h4>1. Hotlinking protection with .htaccess</h4>
<p>Hate it when people stealing bandwidth from your website by using images that are hosted in your web server? Use this, you will able to prevent it from happening.</p>
<pre>RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?queness.com/.*$ [NC]
RewriteRule .(gif|jpg|swf|flv|png)$ /feed/ [R=302,L]</pre>
<h4>2. Prevent hacks</h4>
<p>If you want to increase the security level of your website, you can chuck these few lines of codes to prevent some common hacking techniques by detecting malicious URL patterns.</p>
<pre>RewriteEngine On

# proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc/self/environ [OR]

# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]

# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]

# Block out any script that includes a &lt;script&gt; tag in URL
RewriteCond %{QUERY_STRING} (&lt;|%3C).*script.*(&gt;|%3E) [NC,OR]

# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]

# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})

# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]</pre>
<h4>3. Block access to your .htaccess file</h4>
<p>The following code will prevent user to access your .htaccess file. Also, you can block multiple file type as well.</p>
<pre># secure htaccess file
&lt;Files .htaccess&gt;
order allow,deny
deny from all
&lt;/Files&gt;

# prevent viewing of a specific file
&lt;Files secretfile.jpg&gt;
 order allow,deny
 deny from all
&lt;/Files&gt;

# multiple file types
&lt;FilesMatch &quot;.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$&quot;&gt;
 Order Allow,Deny
 Deny from all
&lt;/FilesMatch&gt;</pre>
<h4>4. Rename htaccess files</h4>
<p>You can also rename your .htaccess file name to something else to prevent access.</p>
<pre>AccessFileName htacc.ess</pre>
<h4>5. Disable directory browsing</h4>
<p>Avoid the server from displaying directory index, or the opposite.</p>
<pre># disable directory browsing
Options All -Indexes

# enable directory browsing
Options All +Indexes</pre>
<h4>6. Change default Index page</h4>
<p>You can change the default page index.html, index.php or index.htm to something else.</p>
<pre>DirectoryIndex business.html</pre>
<h4>7. Block unwanted visitor based on referring domain</h4>
<pre># block visitors referred from indicated domains
&lt;IfModule mod_rewrite.c&gt;
 RewriteEngine on
 RewriteCond %{HTTP_REFERER} scumbag.com [NC,OR]
 RewriteCond %{HTTP_REFERER} wormhole.com [NC,OR]
 RewriteRule .* - [F]

&lt;/ifModule&gt;</pre>
<h4>8. Blocking request based on User-Agent Header</h4>
<p>This method could save your bandwidth quota by blocking certain bots or spiders from crawling your website.</p>
<pre># block visitors referred from indicated domains
&lt;IfModule mod_rewrite.c&gt;
SetEnvIfNoCase ^User-Agent$ .*(craftbot|download|extract|stripper|sucker|ninja|clshttp|webspider|leacher|collector|grabber|webpictures) HTTP_SAFE_BADBOT
SetEnvIfNoCase ^User-Agent$ .*(libwww-perl|aesop_com_spiderman) HTTP_SAFE_BADBOT
Deny from env=HTTP_SAFE_BADBOT
&lt;/ifModule&gt;</pre>
<h4>9. Secure directories by disabling execution of scripts</h4>
<pre># secure directory by disabling script execution
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI</pre>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/17-useful-htaccess-tricks-and-tips-26/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extra Packages for Enterprise Linux (EPEL)</title>
		<link>http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/</link>
		<comments>http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 14:05:00 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/</guid>
		<description><![CDATA[EPEL Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages for Red Hat Enterprise (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux. Fedora &#8230; <a href="http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>EPEL</h3>
<p>Extra Packages for Enterprise Linux (EPEL) is a volunteer-based community effort from the Fedora project to create a repository of high-quality add-on packages for <a href="http://fedoraproject.org/wiki/Red_Hat_Enterprise_Linux">Red Hat Enterprise</a> (RHEL) and its compatible spinoffs such as CentOS or Scientific Linux. Fedora is the upstream of RHEL and add-on packages for EPEL are sourced from the Fedora repository primarily and built against RHEL. </p>
<p>&#160;</p>
<p>EPEL有很多额外的包，centos的yum库里软件和rh的一样，EPEL里面有很多有用的软件。更多详情：</p>
<p><a title="http://fedoraproject.org/wiki/EPEL" href="http://fedoraproject.org/wiki/EPEL">http://fedoraproject.org/wiki/EPEL</a></p>
<p>安装方法：</p>
<p>su -c &#8216;rpm -Uvh <a href="http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'">http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm&#8217;</a> </p>
<p>&#8230; </p>
<p>su -c &#8216;yum install foo&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/extra-packages-for-enterprise-linux-epel-23/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>logrotate for nginx</title>
		<link>http://yongzou.com/logrotate-for-nginx-22/</link>
		<comments>http://yongzou.com/logrotate-for-nginx-22/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:52:56 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/logrotate-for-nginx-22/</guid>
		<description><![CDATA[如果手动编译安装nginx并不会安装logrotate配置。如果用yun安装nginx会自动安装/etc/logrotate.d/nginx配置文件： /var/log/nginx/*log { &#160;&#160;&#160; daily &#160;&#160;&#160; rotate 10 &#160;&#160;&#160; missingok &#160;&#160;&#160; notifempty &#160;&#160;&#160; compress &#160;&#160;&#160; sharedscripts &#160;&#160;&#160; postrotate &#160;&#160;&#160;&#160;&#160;&#160;&#160; [ ! -f /var/run/nginx.pid ] &#124;&#124; kill -USR1 `cat /var/run/nginx.pid` &#160;&#160;&#160; endscript }]]></description>
			<content:encoded><![CDATA[<p>如果手动编译安装nginx并不会安装logrotate配置。如果用yun安装nginx会自动安装/etc/logrotate.d/nginx配置文件：</p>
<p>/var/log/nginx/*log {   <br />&#160;&#160;&#160; daily    <br />&#160;&#160;&#160; rotate 10    <br />&#160;&#160;&#160; missingok    <br />&#160;&#160;&#160; notifempty    <br />&#160;&#160;&#160; compress    <br />&#160;&#160;&#160; sharedscripts    <br />&#160;&#160;&#160; postrotate    <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid`    <br />&#160;&#160;&#160; endscript    <br />}</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/logrotate-for-nginx-22/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WIN7 中的God Mode “上帝模式”</title>
		<link>http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/</link>
		<comments>http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 16:02:07 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=16</guid>
		<description><![CDATA[Windows 7的这个God Mode彩蛋是个实用的蛋，只需要建立一个目录，命名为：GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} 就可以啦。介绍如下 <a href="http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Windows 7的这个<strong>God Mode</strong>彩蛋是个实用的蛋，只需要建立一个目录，命名为：<strong>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</strong> 就可以啦。</p>
<p>介绍如下：</p>
<p>Windows 7系统中隐藏了一个秘密的“<strong>God Mode</strong>”，字面上译为“上帝模式”。其实就是一个简单的文件夹窗口，但包含了几乎所有Windows 7系统的设置，如控制面板的功能、界面个性化、辅助功能选项&#8230;方方面面的控制设置，用户只需通过这一个窗口就能实现所有的操控，而不必再去为调整一个小小的系统设置细想半天究竟该在什么地方去打开设置窗口。</p>
<p>首先你可以在任何地方创建一个新文件夹，这个操作对于几乎所有电脑用户来说都非常简单，然后重要的是，将这个新文件夹重命名为“<strong>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</strong>”。大家最好直接复制过去，避免手动输入出错。接下来一回车，惊喜立即出现在你面前。</p>
<p>双击打开<strong>God Mode</strong>窗口，可以看到这里包括了方方面面的系统设置选项和工具，而且每一个项目所对应的功能也都清晰显示，一眼明了，使用起来非常方便。God Mode可以创建在桌面上、C盘中、任意文件夹内，总之方便自己使用就好，从这一个窗口中，你就可以轻松完成各项设置。(转自水木）</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/win7-%e4%b8%ad%e7%9a%84god-mode-%e2%80%9c%e4%b8%8a%e5%b8%9d%e6%a8%a1%e5%bc%8f%e2%80%9d-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>冲动是魔鬼</title>
		<link>http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/</link>
		<comments>http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 14:58:21 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/</guid>
		<description><![CDATA[今天冲动了，去中关村准备换块硬盘，出现坏道了，还有几天就满一年了。 去的路上被中介拉去看了看农大南路的房子，麒麟家园，99平米。看着还可以，就犹豫啊犹豫了一阵，被中介忽悠了一阵，就冲动交了定金。当时没啥感觉，现在回到家，反倒好紧张，不知道是不是买在了最高的，跟我40多块的中石油似的：（ 神啊！]]></description>
			<content:encoded><![CDATA[<p>今天冲动了，去中关村准备换块硬盘，出现坏道了，还有几天就满一年了。<br />
去的路上被中介拉去看了看农大南路的房子，麒麟家园，99平米。看着还可以，就犹豫啊犹豫了一阵，被中介忽悠了一阵，就冲动交了定金。当时没啥感觉，现在回到家，反倒好紧张，不知道是不是买在了最高的，跟我40多块的中石油似的：（</p>
<p>神啊！</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/%e5%86%b2%e5%8a%a8%e6%98%af%e9%ad%94%e9%ac%bc-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>重新开始</title>
		<link>http://yongzou.com/new-start-5/</link>
		<comments>http://yongzou.com/new-start-5/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 13:26:34 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/?p=5</guid>
		<description><![CDATA[重装了服务器，忘了导出数据库了，以前的内容都没啦！没了也好，正好可以装一个最新的WordPress。以前版本太久，升级几次都不成功。 FeedBurner里面视乎还能看到部分内容：http://feeds.feedburner.com/zouyong 以前用的主题atahualpa 2.21版本，现在都升级到3.4.4啦！嗯，接着用。]]></description>
			<content:encoded><![CDATA[<p>重装了服务器，忘了导出数据库了，以前的内容都没啦！没了也好，正好可以装一个最新的WordPress。以前版本太久，升级几次都不成功。</p>
<p>FeedBurner里面视乎还能看到部分内容：<a href="http://feeds.feedburner.com/zouyong">http://feeds.feedburner.com/zouyong</a></p>
<p>以前用的主题atahualpa 2.21版本，现在都升级到3.4.4啦！嗯，接着用。</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/new-start-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>买车啦~</title>
		<link>http://yongzou.com/%e4%b9%b0%e8%bd%a6%e5%95%a6-12/</link>
		<comments>http://yongzou.com/%e4%b9%b0%e8%bd%a6%e5%95%a6-12/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:09:00 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/%e4%b9%b0%e8%bd%a6%e5%95%a6-12/</guid>
		<description><![CDATA[团购的奇瑞A3，1.6两厢精英车型，今天去把车提回来啦！ 虽说拿到本后大半年就没摸过车，今天办完手续直接就开着上路啦，保险都没有生效，真担心刮蹭啥的。刚出来找加油站就被后面车嘀个不停，而且还发现安全带都没有系上。。。加完油后赶紧把实习标拿出来贴上，再上路，嘀声少了不少，啊哈哈 从西南三环，到北三环，然后走八达岭高速辅路，车真多啊！早上7点出门，车开到家正好3点半，估计开了估计有2个小时吧。 现在还在使劲看说明书，嗯]]></description>
			<content:encoded><![CDATA[<p>团购的奇瑞A3，1.6两厢精英车型，今天去把车提回来啦！</p>
<p>虽说拿到本后大半年就没摸过车，今天办完手续直接就开着上路啦，保险都没有生效，真担心刮蹭啥的。刚出来找加油站就被后面车嘀个不停，而且还发现安全带都没有系上。。。加完油后赶紧把实习标拿出来贴上，再上路，嘀声少了不少，啊哈哈</p>
<p>从西南三环，到北三环，然后走八达岭高速辅路，车真多啊！早上7点出门，车开到家正好3点半，估计开了估计有2个小时吧。</p>
<p>现在还在使劲看说明书，嗯</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/%e4%b9%b0%e8%bd%a6%e5%95%a6-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make ZendOptimizer work with SELinux</title>
		<link>http://yongzou.com/make-zendoptimizer-work-with-selinux-21/</link>
		<comments>http://yongzou.com/make-zendoptimizer-work-with-selinux-21/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 16:10:00 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[ZendOptimizer]]></category>

		<guid isPermaLink="false">http://yongzou.com/make-zendoptimizer-work-with-selinux-21/</guid>
		<description><![CDATA[以前必须吧SELinux关了才能用ZendOptimizer，昨天研究了一下，终于让ZendOptimizer和SELinux能一起工作了~~ Zend Optimizer 配置如下： [Zend] zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 zend_optimizer.version=3.3.3 zend_optimizer.optimization_level=1023 zend_optimizer.enable_loader = 0 zend_optimizer.disable_licensing=1 zend_optimizer.obfuscation_level_support=0 zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so With default install of ZendOptimizer-3.3, SELinux enabled, ZendOptimizer can’t be load. php -v: Failed loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so:&#160; /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied &#8230; <a href="http://yongzou.com/make-zendoptimizer-work-with-selinux-21/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>以前必须吧SELinux关了才能用ZendOptimizer，昨天研究了一下，终于让ZendOptimizer和SELinux能一起工作了~~</p>
<p>Zend Optimizer 配置如下：    <br />[Zend]     <br />zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3     <br />zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3     <br />zend_optimizer.version=3.3.3     <br />zend_optimizer.optimization_level=1023     <br />zend_optimizer.enable_loader = 0     <br />zend_optimizer.disable_licensing=1     <br />zend_optimizer.obfuscation_level_support=0     <br />zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so</p>
<p>With default install of ZendOptimizer-3.3, SELinux enabled, ZendOptimizer can’t be load.</p>
<p>php -v: </p>
<p><strong>Failed loading /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so:&#160; /usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so: cannot restore segment prot after reloc: Permission denied      <br /></strong>PHP 5.2.6 (cli) (built: May&#160; 5 2008 10:32:59)     <br />Copyright (c) 1997-2008 The PHP Group     <br />Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies     <br />&#160;&#160;&#160; with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies </p>
<p>cat /var/log/httpd/error_log    <br /><strong>Failed loading /usr/local/Zend/lib/ZendExtensionManager.so:&#160; /usr/local/Zend/lib/ZendExtensionManager.so: failed to map segment from shared object: Access Denied </strong></p>
<h2>How to enable ZendOptimizer work with SELinux: </h2>
<p> <span id="more-21"></span>
<ol>
<li>
<h3>1. Change context of ZendOptimizer.so and ZendExtensionManager.so </h3>
</li>
<li>
<p>if your php compiled with threadsafe, change the xxx_TS.so instead.</p>
</li>
</ol>
<p><strong>chcon -t textrel_shlib_t &#8216;/usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so&#8217;      <br />semanage fcontext -a -t textrel_shlib_t &#8216;/usr/local/Zend/lib/Optimizer-3.3.3/php-5.2.x/ZendOptimizer.so&#8217; </strong></p>
<p><strong>chcon -t textrel_shlib_t &#8216;/usr/local/Zend/lib/ZendExtensionManager.so&#8217;      <br />semanage fcontext -a -t textrel_shlib_t &#8216;/usr/local/Zend/lib/ZendExtensionManager.so&#8217; </strong></p>
<ol>
<li>
<h3>2. vim zend_optimizer.te, copy the following content</h3>
</li>
</ol>
<p>module zend_optimizer 1.0; </p>
<p>require {    <br />&#160;&#160;&#160; type httpd_t;     <br />&#160;&#160;&#160; class process { execstack execmem execheap };     <br />}     <br />#============= httpd_t ==============     <br />allow httpd_t self:process { execstack execmem execheap }; </p>
<ol>
<li>
<h3>3. compile :</h3>
<p>checkmodule -M -m -o zend_optimizer.mod zend_optimizer.te </li>
<li>
<h3>4. create policy package:</h3>
</li>
</ol>
<p>semodule_package -o zend_optimizer.pp -m zend_optimizer.mod </p>
<ol>
<li>
<h3>5. install module:</h3>
<p>semodule -i zend_optimizer.pp </li>
</ol>
<p>service httpd restart </p>
<p>reference</p>
<p>http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/make-zendoptimizer-work-with-selinux-21/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>终于用上4G内存了~</title>
		<link>http://yongzou.com/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a4g%e5%86%85%e5%ad%98%e4%ba%86-18/</link>
		<comments>http://yongzou.com/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a4g%e5%86%85%e5%ad%98%e4%ba%86-18/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 16:09:00 +0000</pubDate>
		<dc:creator>Zou Yong</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://yongzou.com/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a4g%e5%86%85%e5%ad%98%e4%ba%86-18/</guid>
		<description><![CDATA[新机器是4G内存，但操作系统是XP，32位的，只能识别3.25G内存。昨晚用超级兔子和ramdisk搞了好久都不能用上高位内存，今晚下了SuperSpeed Ramdisk Plus，按上后有个选项，打开使用高位内存，然后建立ramdisk就可以用上高位内存了。 建了一个1G的ramdisk，高位内存768M，不够的部分在windows能识别里面分配，然后把Temp文件夹和IE临时文件都放到ramdisk里面了。用硬盘工具测试了一下，ramdisk的读取速度平均在2.8G/s左右，最高达到了3.6G/s~]]></description>
			<content:encoded><![CDATA[<p>新机器是4G内存，但操作系统是XP，32位的，只能识别3.25G内存。昨晚用超级兔子和ramdisk搞了好久都不能用上高位内存，今晚下了SuperSpeed Ramdisk Plus，按上后有个选项，打开使用高位内存，然后建立ramdisk就可以用上高位内存了。</p>
<p>建了一个1G的ramdisk，高位内存768M，不够的部分在windows能识别里面分配，然后把Temp文件夹和IE临时文件都放到ramdisk里面了。用硬盘工具测试了一下，ramdisk的读取速度平均在2.8G/s左右，最高达到了3.6G/s~</p>
]]></content:encoded>
			<wfw:commentRss>http://yongzou.com/%e7%bb%88%e4%ba%8e%e7%94%a8%e4%b8%8a4g%e5%86%85%e5%ad%98%e4%ba%86-18/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

