<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet href='http://feed.feedsky.com/styles/temp01.xsl' type='text/xsl' ?><!--这是一个由Feedsy提供技术支持的Feed，为了提高读者阅读的体验，以及满足用户美化自己Feed的需要，我们设计了多种精美的Feed模板，提供给大家选择，所有最终呈现出来的样式，皆由用户自愿选择使用，未经许可，任何团体和个人，请不要擅自修改样式或者盗用，这是对于用户选择权的尊重。--><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:fs="http://www.feedsky.com/namespace/feed" 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/" version="2.0"><channel><atom:link href="http://feed.feedsky.com/oneoo" type="application/rss+xml" rel="self"></atom:link><fs:self_link href="http://feed.feedsky.com/oneoo" type="application/rss+xml"></fs:self_link><lastBuildDate>Sat, 28 Jun 2008 21:24:05 GMT</lastBuildDate><title>oneoo's 私家花园</title><description>这里是我的私人地方，一片属于我的天地～</description><link>http://oneoo.com</link><pubDate>Sun, 29 Jun 2008 08:35:39 GMT</pubDate><item><title>使博客访问速度更快的技巧</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964817/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;很&lt;/div&gt;多网友会发现，大家同样是使用 &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/yo2&quot; title=&quot;Tag 了 20 篇文章&quot;&gt;Yo2&lt;/a&gt;&lt;/span&gt; 的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E5%8D%9A%E5%AE%A2&quot; title=&quot;Tag 了 6 篇文章&quot;&gt;博客&lt;/a&gt;&lt;/span&gt;服务，怎么自己的博客打开速度比人家慢？嗯，虽然都是跑同样的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1%E5%99%A8&quot; title=&quot;Tag 了 5 篇文章&quot;&gt;服务器&lt;/a&gt;&lt;/span&gt;，同样的线路，但博客的设置各不相同，这样就会出现差距了。我作为 Yo2 的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E5%BC%80%E5%8F%91&quot; title=&quot;Tag 了 3 篇文章&quot;&gt;开发&lt;/a&gt;&lt;/span&gt;员，我给大家介绍一下如何设置自己的博客可以取得更快的访问速度 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;ol&gt;

&lt;li&gt;不要频繁进入管理后台更改设置

&lt;ul&gt;

&lt;li&gt;很多网友喜欢经常到管理后台更改一下设置，看到文章有点瑕疵就重新编辑发布等等，这些操作都会触发 Yo2 &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/cdn&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;CDN&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%b3%bb%e7%bb%9f&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;系统&lt;/a&gt;&lt;/span&gt;更新博客缓存，如果一个博客的缓存被更新，那么就需要重新生成这些博客页面了，打开一个缓存页面的速度比重新生成一个页面快很多。所以大家要改改这些习惯&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;打开博客的缓存加速功能

&lt;ul&gt;

&lt;li&gt;在管理后台-设置-输出，可以打开博客的缓存加速功能，大家可以根据所使用的模板进行选择，那些页面组成部分可以让系统缓存（比如我的博客只有页首因为有当前页面标识的功能，而侧栏和页尾的内容都可以是固定不变的，那么我就打开了侧栏和页尾的缓存加速）。开启了页面组成部分的缓存加速，可以让在重新生成页面时，可以直接使用已缓存的页面组成部分，减少了部分的数据操作，相对生产页面所消耗的时间就得到减少了&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;尽量减少第三方网站提供的 JavaScript 、图片调用

&lt;ul&gt;

&lt;li&gt;有些网友喜欢在自己的侧栏加入很多第三方网站提供的服务，比如播放器、Rss、图片、访问统计等等，甚至有人会加入多个统计代码。博客确实很多东西了，但随之而来的速度被拖慢了，如果调用了一些国外的服务，对博客的访问速度影响更大。我之前有加入过 google 的访问统计，但这个有比较长时间的页面显示延迟，为了获取更快的速度，我把它删了。之前我还是用了 FeedSky 的 JavaScript 方式显示订阅按钮，后来直接写成 Html 格式，都可以加快页面的显示速度。我建议大家尽可能把第三方的调用控制在2个以内&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;减少首页（列表页面）的文章数量

&lt;ul&gt;

&lt;li&gt;文章中可能包含了一些图片，在单个文章显示时的速度还挺快，但首页（文章列表）中包含的文章数量多的话，也就代表该页要显示的图片是列表上的文章所包含总和。还有部分网友是使用其他相册提供的图片服务，如果这些相册的访问速度慢，同样对自己的博客有影响。我建议把首页（文章列表）一页显示的文章数量控制在 5 个左右，确实需要一下显示多个文章的话，可以选择摘要输出（不显示图片）&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;使用 CNAME 绑定域名(收费用户)

&lt;ul&gt;

&lt;li&gt;Yo2 在各个网络都部署有独立服务器节点，只有使用 CNAME 方式进行域名解析，才能使用 Yo2 的 CDN 服务进行访问加速。对于使用了 A记录方式直接解析到我们其中一台服务器，那么所有网友访问你的博客也只限于在一台服务器上，并且这台服务器的线路不一定是最快的。如果你要使用 domain.com 这的域名进行绑定，而域名服务器又无法给 domain.com 提供 CNAME 方式的解析，我建议你更换绑定的域名为 www.domain.com 或 blog.domain.com ，又或者更换域名的解析服务器，改为使用 DnsPod 这样的域名解析服务&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;完成 ！ 希望这些技巧能让你更好的使用 Yo2 博客服务 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/blog-faster-access-to-the-skills.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=8c746dca01ae953fbf3b75bebdedb4d6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=8c746dca01ae953fbf3b75bebdedb4d6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=d2afd45e30e751ed259a17647a39717b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=d2afd45e30e751ed259a17647a39717b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c851066ee6d925a9357e6e2c131d6b7b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c851066ee6d925a9357e6e2c131d6b7b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=bec51a70042fa21ba494f0910390520b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=bec51a70042fa21ba494f0910390520b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=9a87524945553bec6e53ac455ab3984b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=9a87524945553bec6e53ac455ab3984b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=458e0363217bc84eb1060501fd52ecbf&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=458e0363217bc84eb1060501fd52ecbf&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=33cb017ae9a105721750529d160e9633&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=33cb017ae9a105721750529d160e9633&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fcea5f01f2f74524b0e58447aa67daec&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fcea5f01f2f74524b0e58447aa67daec&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/blog-faster-access-to-the-skills.html/feed</wfw:commentRss><description>很多网友会发现，大家同样是使用 Yo2 的博客服务，怎么自己的博客打开速度比人家慢？嗯，虽然都是跑同样的服务器，同样的线路，但博客的设置各不相同，这样就会出现差距了。我作为 Yo2 的开发员，我给大家介绍一下如何设置自己的博客可以取得更快的访问速度 



不要频繁进入管理后台更改设置



很多网友喜欢经常到管理后台更改一下设置，看到文章有点瑕疵就重新编辑发布等等，这些操作都会触发 Yo2 CDN 系统更新博客缓存，如果一个博客的缓存被更新，那么就需要重新生成这些博客页面了，打开一个缓存页面的速度比重新生成一个页面快很多。所以大家要改改这些习惯





打开博客的缓存加速功能



在管理后台-设置-输出，可以打开博客的缓存加速功能，大家可以根据所使用的模板进行选择，那些页面组成部分可以让系统缓存（比如我的博客只有页首因为有当前页面标识的功能，而侧栏和页尾的内容都可以是固定不变的，那么我就打开了侧栏和页尾的缓存加速）。开启了页面组成部分的缓存加速，可以让在重新生成页面时，可以直接使用已缓存的页面组成部分，减少了部分的数据操作，相对生产页面所消耗的时间就得到减少了





尽量减少第三方网站提供的 JavaScript 、图片调用



有些网友喜欢在自己的侧栏加入很多第三方网站提供的服务，比如播放器、Rss、图片、访问统计等等，甚至有人会加入多个统计代码。博客确实很多东西了，但随之而来的速度被拖慢了，如果调用了一些国外的服务，对博客的访问速度影响更大。我之前有加入过 google 的访问统计，但这个有比较长时间的页面显示延迟，为了获取更快的速度，我把它删了。之前我还是用了 FeedSky 的 JavaScript 方式显示订阅按钮，后来直接写成 Html 格式，都可以加快页面的显示速度。我建议大家尽可能把第三方的调用控制在2个以内





减少首页（列表页面）的文章数量



文章中可能包含了一些图片，在单个文章显示时的速度还挺快，但首页（文章列表）中包含的文章数量多的话，也就代表该页要显示的图片是列表上的文章所包含总和。还有部分网友是使用其他相册提供的图片服务，如果这些相册的访问速度慢，同样对自己的博客有影响。我建议把首页（文章列表）一页显示的文章数量控制在 5 个左右，确实需要一下显示多个文章的话，可以选择摘要输出（不显示图片）





使用 CNAME 绑定域名(收费用户)



Yo2 在各个网络都部署有独立服务器节点，只有使用 CNAME 方式进行域名解析，才能使用 Yo2 的 CDN 服务进行访问加速。对于使用了 A记录方式直接解析到我们其中一台服务器，那么所有网友访问你的博客也只限于在一台服务器上，并且这台服务器的线路不一定是最快的。如果你要使用 domain.com 这的域名进行绑定，而域名服务器又无法给 domain.com 提供 CNAME 方式的解析，我建议你更换绑定的域名为 www.domain.com 或 blog.domain.com ，又或者更换域名的解析服务器，改为使用 DnsPod 这样的域名解析服务







完成 ！ 希望这些技巧能让你更好的使用 Yo2 博客服务 

文章来源 oneoo's 私家花园 : http://oneoo.com/articles/blog-faster-access-to-the-skills.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=8c746dca01ae953fbf3b75bebdedb4d6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=8c746dca01ae953fbf3b75bebdedb4d6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=d2afd45e30e751ed259a17647a39717b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=d2afd45e30e751ed259a17647a39717b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c851066ee6d925a9357e6e2c131d6b7b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c851066ee6d925a9357e6e2c131d6b7b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=bec51a70042fa21ba494f0910390520b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=bec51a70042fa21ba494f0910390520b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=9a87524945553bec6e53ac455ab3984b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=9a87524945553bec6e53ac455ab3984b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=458e0363217bc84eb1060501fd52ecbf&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=458e0363217bc84eb1060501fd52ecbf&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=33cb017ae9a105721750529d160e9633&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=33cb017ae9a105721750529d160e9633&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fcea5f01f2f74524b0e58447aa67daec&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fcea5f01f2f74524b0e58447aa67daec&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>博客</category><category>教程</category><category>技巧</category><category>Think</category><category>yo2</category><pubDate>Sun, 29 Jun 2008 05:24:05 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/blog-faster-access-to-the-skills.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/blog-faster-access-to-the-skills.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/blog-faster-access-to-the-skills.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964817/3372955</fs:itemid></item><item><title>国内 CDN 服务介绍</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964818/3372955/1/item.html</link><content:encoded>&lt;blockquote&gt;&lt;div id=&quot;fp&quot;&gt;C&lt;/div&gt;DN是一个经策略性部署的整体&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%b3%bb%e7%bb%9f&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;系统&lt;/a&gt;&lt;/span&gt;，能够帮助用户解决分布式存储、负载均衡、&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%bd%91%e7%bb%9c&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;网络&lt;/a&gt;&lt;/span&gt;请求的重定向和内容管理等问题。　　其目的是通过在现有的Internet中增加一层新的网络架构，将&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E7%BD%91%E7%AB%99&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;网站&lt;/a&gt;&lt;/span&gt;的内容发布到最接近用户的网络“边缘”，使用户可以就近取得所需的内容， 解决&amp;nbsp;Internet&amp;nbsp;网络拥塞状况，提高用户访问网站的响应速度。从技术上全面解决由于网络带宽小、用户访问量大、网点分布不均而产生的用户访问网站 响应速度慢的根本原因。

&lt;p align=&quot;right&quot;&gt;引用：&lt;a href=&quot;http://www.chinacache.com/viewtechnique.asp?id=15&quot; target=&quot;_blank&quot;&gt;http://www.chinacache.com/viewtechnique.asp?id=15&lt;/a&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;目前国内主要的 &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/cdn&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;CDN&lt;/a&gt;&lt;/span&gt;服务商有&lt;a href=&quot;http://www.chinacache.com/&quot; target=&quot;_blank&quot;&gt;北京蓝汛&lt;/a&gt;、&lt;a href=&quot;http://www.chinanetcenter.com/&quot; target=&quot;_blank&quot;&gt;网宿科技&lt;/a&gt;、&lt;a href=&quot;http://www.fastweb.com.cn/&quot; target=&quot;_blank&quot;&gt;北京快网&lt;/a&gt;、&lt;a href=&quot;http://www.chinaunicache.com/&quot; target=&quot;_blank&quot;&gt;浙江联存&lt;/a&gt;、&lt;a href=&quot;http://www.cdnunion.com/&quot;&gt;CDN联盟&lt;/a&gt;等数家，&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1&quot; title=&quot;Tag 了 15 篇文章&quot;&gt;服务&lt;/a&gt;&lt;/span&gt;商之间的技术实力还有一定差距，产品线比较长的有北京蓝汛和网宿等几家，全国分布节点数量多，可提供多种加速服务，但相对价格也比较昂贵。一般小型 CDN 服务商较有价格优势，但产品线比较短，不能提供一些比较高端的应用，基本是做静态文件加速服务。&lt;/p&gt;

&lt;p&gt;普通的静态文件加速服务技术门槛低，只需要配备智能DNS解析服务，使用 squid (内容缓存系统) 在各地区部署一定数量的服务器节点，即可投入服务。所以现在有越来越多的 IDC 服务商开始建立自己的 CDN 网络，但因为还在起步阶段，带宽总容量低，所部署的节点数量比较少，主要分布在各大城市，并且节点的网络质量参次不齐。&lt;/p&gt;

&lt;p&gt;更多的服务商加入到 CDN 行列，已经把带宽资费拉到普通多线带宽的水平。现在越来越多的网站开始使用 CDN 服务，给网站的静态内容(如：图片)进行加速，而动态内容依然使用自有多线服务器提供访问服务。而有部分大型网站则开始建立自己的 CDN 网络 (如：6.cn) 自主 CDN 网络的可控性高，可以根据自己的各项服务需求进行细节调整，但维护成本则相对购买第三方的 CDN 服务要高得多。&lt;/p&gt;

&lt;p&gt;我们需要根据自身网站的实际需求、技术能力和资金，综合分析应该怎样使用 CDN 服务进行访问加速。因为 CDN 服务商只能提供一定域名数量的加速服务，如果你的网站需要给大量的域名访问进行加速，则需要自行建立 CDN 网络了。(如果您需要进一步了解 CDN 服务，我是能够提供一些建议的 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;---------------------------------------------------------&lt;/p&gt;

&lt;p&gt;Yo2 是博客服务商，需要给大量的博客进行访问加速，所以选择自行建立 CDN 网络。并且在服务器节点的页面缓存技术方面，相对普通的 CDN 服务商有一定的优势，我们的缓存系统已支持动态页面的加速服务，除了少量要求即时动态处理的数据以外，其他的博客文章页面、模板、图片等内容均已使用缓存加速。&lt;/p&gt;

&lt;p&gt;虽然我们的 CDN 网络还是起步阶段，所部署的服务器节点有限，但我们选择的机房带宽要求都是很高的，同省区的访问速度 &amp;lt; 20Ms，跨省区访问的速度在30~50Ms之间。&lt;strong&gt;在 Yo2 的成长过程中，我们将进一步完善自己的 CDN 网络，以提供更快的博客访问速度 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/cdn-services-on-the-mainland.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=1c7689e86cd79c6b4b676dd1abbc1e90&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=1c7689e86cd79c6b4b676dd1abbc1e90&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=46d2c95810242b50a77e499509d5b893&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=46d2c95810242b50a77e499509d5b893&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=99979c5d3bac6189d6adc147d5649de1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=99979c5d3bac6189d6adc147d5649de1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=7381fb2c34a9c36876a0e8bee80a29a3&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=7381fb2c34a9c36876a0e8bee80a29a3&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=4d9178ca395ab5d61701298b697e87ea&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=4d9178ca395ab5d61701298b697e87ea&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=0823c466cb4a74c209f22c96149d37f6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=0823c466cb4a74c209f22c96149d37f6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=4c6214ca1ba584d52a29f02530e777f0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=4c6214ca1ba584d52a29f02530e777f0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=ca5552ba7da9dfc3fabb4ce3fd9813d6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=ca5552ba7da9dfc3fabb4ce3fd9813d6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/cdn-services-on-the-mainland.html/feed</wfw:commentRss><description>CDN是一个经策略性部署的整体系统，能够帮助用户解决分布式存储、负载均衡、网络请求的重定向和内容管理等问题。　　其目的是通过在现有的Internet中增加一层新的网络架构，将网站的内容发布到最接近用户的网络“边缘”，使用户可以就近取得所需的内容， 解决&amp;#160;Internet&amp;#160;网络拥塞状况，提高用户访问网站的响应速度。从技术上全面解决由于网络带宽小、用户访问量大、网点分布不均而产生的用户访问网站 响应速度慢的根本原因。

引用：http://www.chinacache.com/viewtechnique.asp?id=15



目前国内主要的 CDN服务商有北京蓝汛、网宿科技、北京快网、浙江联存、CDN联盟等数家，服务商之间的技术实力还有一定差距，产品线比较长的有北京蓝汛和网宿等几家，全国分布节点数量多，可提供多种加速服务，但相对价格也比较昂贵。一般小型 CDN 服务商较有价格优势，但产品线比较短，不能提供一些比较高端的应用，基本是做静态文件加速服务。

普通的静态文件加速服务技术门槛低，只需要配备智能DNS解析服务，使用 squid (内容缓存系统) 在各地区部署一定数量的服务器节点，即可投入服务。所以现在有越来越多的 IDC 服务商开始建立自己的 CDN 网络，但因为还在起步阶段，带宽总容量低，所部署的节点数量比较少，主要分布在各大城市，并且节点的网络质量参次不齐。

更多的服务商加入到 CDN 行列，已经把带宽资费拉到普通多线带宽的水平。现在越来越多的网站开始使用 CDN 服务，给网站的静态内容(如：图片)进行加速，而动态内容依然使用自有多线服务器提供访问服务。而有部分大型网站则开始建立自己的 CDN 网络 (如：6.cn) 自主 CDN 网络的可控性高，可以根据自己的各项服务需求进行细节调整，但维护成本则相对购买第三方的 CDN 服务要高得多。

我们需要根据自身网站的实际需求、技术能力和资金，综合分析应该怎样使用 CDN 服务进行访问加速。因为 CDN 服务商只能提供一定域名数量的加速服务，如果你的网站需要给大量的域名访问进行加速，则需要自行建立 CDN 网络了。(如果您需要进一步了解 CDN 服务，我是能够提供一些建议的 

---------------------------------------------------------

Yo2 是博客服务商，需要给大量的博客进行访问加速，所以选择自行建立 CDN 网络。并且在服务器节点的页面缓存技术方面，相对普通的 CDN 服务商有一定的优势，我们的缓存系统已支持动态页面的加速服务，除了少量要求即时动态处理的数据以外，其他的博客文章页面、模板、图片等内容均已使用缓存加速。

虽然我们的 CDN 网络还是起步阶段，所部署的服务器节点有限，但我们选择的机房带宽要求都是很高的，同省区的访问速度 &amp;#60; 20Ms，跨省区访问的速度在30~50Ms之间。在 Yo2 的成长过程中，我们将进一步完善自己的 CDN 网络，以提供更快的博客访问速度 

文章来源 oneoo's 私家花园 : http://oneoo.com/articles/cdn-services-on-the-mainland.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=1c7689e86cd79c6b4b676dd1abbc1e90&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=1c7689e86cd79c6b4b676dd1abbc1e90&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=46d2c95810242b50a77e499509d5b893&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=46d2c95810242b50a77e499509d5b893&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=99979c5d3bac6189d6adc147d5649de1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=99979c5d3bac6189d6adc147d5649de1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=7381fb2c34a9c36876a0e8bee80a29a3&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=7381fb2c34a9c36876a0e8bee80a29a3&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=4d9178ca395ab5d61701298b697e87ea&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=4d9178ca395ab5d61701298b697e87ea&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=0823c466cb4a74c209f22c96149d37f6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=0823c466cb4a74c209f22c96149d37f6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=4c6214ca1ba584d52a29f02530e777f0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=4c6214ca1ba584d52a29f02530e777f0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=ca5552ba7da9dfc3fabb4ce3fd9813d6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=ca5552ba7da9dfc3fabb4ce3fd9813d6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>cdn</category><category>yo2</category><category>服务</category><category>Home</category><pubDate>Sat, 28 Jun 2008 06:15:32 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/cdn-services-on-the-mainland.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/cdn-services-on-the-mainland.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/cdn-services-on-the-mainland.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964818/3372955</fs:itemid></item><item><title>HTTP 的后台任务</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964819/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;众&lt;/div&gt;所周知 &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/http&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;HTTP&lt;/a&gt;&lt;/span&gt; &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e5%8d%8f%e8%ae%ae&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;协议&lt;/a&gt;&lt;/span&gt;是无保持连接的，HTTP 1.1 虽然实现了保持连接的能力，但依然无法在连接上实现交互功能。浏览器给&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1%E5%99%A8&quot; title=&quot;Tag 了 5 篇文章&quot;&gt;服务器&lt;/a&gt;&lt;/span&gt;发送一个 GET 请求，然后等待&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1&quot; title=&quot;Tag 了 15 篇文章&quot;&gt;服务&lt;/a&gt;&lt;/span&gt;器返回数据，完成一个数据交互处理。问题就是出在等待返回这点，当有一个不需要服务器返回数据，但需要服务器处理一定的操作时，就显得这个等待是没有必要的。&lt;/p&gt;

&lt;p&gt;举个比较长见的例子：&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;一个使用 Javascript (或图片) 方式记录的统计程序，需要用户每次打开页面都在服务器端做记录操作，而我们不需要收取服务器端返回的任何结果，只要服务器能做计数的操作就可以了。&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;虽然是 Javascript 或图片的调用，但在页面在浏览器渲染并显示给用户的过程，依然会造成一定的延时。如果我们能把这个没用的等待剔除，就可以加快页面的加载速度。&lt;/p&gt;

&lt;p&gt;但这个应用非常特殊，正常来说根本没有这样的 web server 支持 _-!!，我在 google 查阅过一些资料，可以使用给浏览器发送 Header : Content-Length: 0 的方法来实现 ，经过测试在未经过 nginx 的情况下确实能够令到浏览器停止加载，但如果前端有 nginx 就没有任何效果了。&lt;/p&gt;

&lt;p&gt;如需要 100% 的效果，只能从 web server下手，在收到 GET 请求时就直接返回一个内容，但继续进入 PHP 处理接下来的数据操作。&lt;/p&gt;

&lt;p&gt;Yo2 的页面访问都是经由 yo2cache 处理的，so 我们很容易就实现了这项功能 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/http-background-tasks.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=a254334337aea19c2a50a46ee4d4ca77&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=a254334337aea19c2a50a46ee4d4ca77&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=38f11410c2f861b13207dd52fd8ca428&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=38f11410c2f861b13207dd52fd8ca428&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=7a98d6aca865f8ee0358ba6e36167f5d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=7a98d6aca865f8ee0358ba6e36167f5d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=43b3e733bc10ecad76720001960949f3&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=43b3e733bc10ecad76720001960949f3&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=cfd14bca5e769eff10652e59a9856191&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=cfd14bca5e769eff10652e59a9856191&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=6af70a5b3bc805b29788d8bee83ac80a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=6af70a5b3bc805b29788d8bee83ac80a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=74c10c7e5a76c33b3d590c7c907673cf&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=74c10c7e5a76c33b3d590c7c907673cf&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=8441ad4e72150536043597c76333ac7c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=8441ad4e72150536043597c76333ac7c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/http-background-tasks.html/feed</wfw:commentRss><description>众所周知 HTTP 协议是无保持连接的，HTTP 1.1 虽然实现了保持连接的能力，但依然无法在连接上实现交互功能。浏览器给服务器发送一个 GET 请求，然后等待服务器返回数据，完成一个数据交互处理。问题就是出在等待返回这点，当有一个不需要服务器返回数据，但需要服务器处理一定的操作时，就显得这个等待是没有必要的。

举个比较长见的例子：



一个使用 Javascript (或图片) 方式记录的统计程序，需要用户每次打开页面都在服务器端做记录操作，而我们不需要收取服务器端返回的任何结果，只要服务器能做计数的操作就可以了。



虽然是 Javascript 或图片的调用，但在页面在浏览器渲染并显示给用户的过程，依然会造成一定的延时。如果我们能把这个没用的等待剔除，就可以加快页面的加载速度。

但这个应用非常特殊，正常来说根本没有这样的 web server 支持 _-!!，我在 google 查阅过一些资料，可以使用给浏览器发送 Header : Content-Length: 0 的方法来实现 ，经过测试在未经过 nginx 的情况下确实能够令到浏览器停止加载，但如果前端有 nginx 就没有任何效果了。

如需要 100% 的效果，只能从 web server下手，在收到 GET 请求时就直接返回一个内容，但继续进入 PHP 处理接下来的数据操作。

Yo2 的页面访问都是经由 yo2cache 处理的，so 我们很容易就实现了这项功能 

文章来源 oneoo's 私家花园 : http://oneoo.com/articles/http-background-tasks.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=a254334337aea19c2a50a46ee4d4ca77&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=a254334337aea19c2a50a46ee4d4ca77&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=38f11410c2f861b13207dd52fd8ca428&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=38f11410c2f861b13207dd52fd8ca428&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=7a98d6aca865f8ee0358ba6e36167f5d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=7a98d6aca865f8ee0358ba6e36167f5d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=43b3e733bc10ecad76720001960949f3&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=43b3e733bc10ecad76720001960949f3&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=cfd14bca5e769eff10652e59a9856191&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=cfd14bca5e769eff10652e59a9856191&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=6af70a5b3bc805b29788d8bee83ac80a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=6af70a5b3bc805b29788d8bee83ac80a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=74c10c7e5a76c33b3d590c7c907673cf&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=74c10c7e5a76c33b3d590c7c907673cf&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=8441ad4e72150536043597c76333ac7c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=8441ad4e72150536043597c76333ac7c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>协议</category><category>http</category><category>服务器</category><category>Develop</category><pubDate>Thu, 12 Jun 2008 00:18:47 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/http-background-tasks.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/http-background-tasks.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/http-background-tasks.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964819/3372955</fs:itemid></item><item><title>@139.com 邮箱实现服务器监测通知</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964820/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;当&lt;/div&gt;你手上管理着好几台&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1%E5%99%A8&quot; title=&quot;Tag 了 5 篇文章&quot;&gt;服务器&lt;/a&gt;&lt;/span&gt;，需要及时获取这些&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1&quot; title=&quot;Tag 了 15 篇文章&quot;&gt;服务&lt;/a&gt;&lt;/span&gt;器&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%bd%91%e7%bb%9c&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;网络&lt;/a&gt;&lt;/span&gt;断开或死机的消息通知，那么手机短信通知将是最好的途径。这点小事情不需要开通什么SMS短信端口的 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt; 你只要注册一个 &lt;a href=&quot;http://mail.139.com&quot; target=&quot;_blank&quot;&gt;@139.com&lt;/a&gt; &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E9%82%AE%E7%AE%B1&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;邮箱&lt;/a&gt;&lt;/span&gt;即可，该邮箱带有手机短信通知功能（好像通过手机查看邮件内容是需要付费的 _-!! 但我只需知道 web 服务是否正常，就把服务器信息简单的写在标题即可）&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;使用 PHP 监测 web 服务 80 端口是否正常：&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;发送邮件的 class (&lt;a href=&quot;http://upload-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/smtp.txt&quot; title=&quot;smtp.txt&quot;&gt;smtp.txt&lt;/a&gt;)，请自行修改文件名&lt;br&gt;

&lt;textarea name=&quot;code&quot; class=&quot;php&quot; rows=&quot;15&quot; cols=&quot;50&quot;&gt;&amp;lt;?

include_once('smtp.php');

@ob_end_flush();

//请修改为自己的发信邮箱地址(用原来的@139.com邮箱无法发送成功 _-!!，错误不明)

$smtp = new smtp(&quot;smtp.163.com&quot;,25,true,&quot;***@163.com&quot; ,&quot;***&quot;);

function testServer($ip){

// 如果服务器在1小时内出现过错误则跳过检测

if(file_exists(&quot;/tmp/check-$ip&quot;) &amp;amp;&amp;amp; (time() - filemtime(&quot;/tmp/check-$ip&quot;)) &amp;lt; 3600)return false;

global $smtp;

$h = '';

echo &quot;CHECK: $ip&quot;;

if($fs = @fsockopen($ip,80, $errno, $errstr, 10)){

@fwrite($fs, &quot;GET / HTTP/1.0\r\nHost: oneoo.com\r\n\r\n&quot;);

$h .= @fgets($fs, 256);

@fclose($fs);}

if(strpos($h,'200') === false){

@touch(&quot;/tmp/check-$ip&quot;);

echo &quot; Fail\n&quot;;

//请修改为自己的邮箱地址

$smtp -&amp;gt; sendmail( '***@139.com', &quot;wesnet@163.com&quot;, &quot;Yo!&quot;, &quot;服务器 $ip 出现异常&quot;, $h, &quot;TXT&quot; );

return false;

}else @unlink(&quot;/tmp/check-$ip&quot;);

echo &quot; OK\n&quot;;

return true;

}

testServer('***.***.***.***');

testServer('***.***.***.***');//检测多个服务器

echo &quot;Finish TEST!\n&quot;;

?&amp;gt;&lt;/textarea&gt;&lt;/p&gt;

&lt;p&gt;把该程序放在相对最稳定的服务器上，并设置 crontab 定时执行该程序 (如果还担心这台服务器不稳定，可以在其他服务器上也搞个监测程序 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;程序虽然是非常简单，但作用不小哦。我就是用这个方法来监测 &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/yo2&quot; title=&quot;Tag 了 20 篇文章&quot;&gt;Yo2&lt;/a&gt;&lt;/span&gt; 的服务器，服务器一出现无法访问，就能在 10 分钟内短信通知我了。&lt;/p&gt;

&lt;p&gt;如果服务器没有 PHP 环境，也可以使用 perl 来写个 &lt;img src='http://image-001.yo2cdn.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/139com-mail-server-monitoring-to-achieve-notice.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=18ec18f8482207c65fa7847659b8223e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=18ec18f8482207c65fa7847659b8223e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=564aec1b77868032f7b39d9455608cea&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=564aec1b77868032f7b39d9455608cea&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=bb9772d9897e36c70f756b748066c167&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=bb9772d9897e36c70f756b748066c167&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=31cb59058a457c0c278e029398ca25d6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=31cb59058a457c0c278e029398ca25d6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=1e6280d02a49bb6f33517600b1797e5f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=1e6280d02a49bb6f33517600b1797e5f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2985b4fc60ffdae4af5505d6135021e1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2985b4fc60ffdae4af5505d6135021e1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=74809270cb3b6faa5076aab9c39720a7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=74809270cb3b6faa5076aab9c39720a7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=82168ad8717ab1db35d76ba2774919d1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=82168ad8717ab1db35d76ba2774919d1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/139com-mail-server-monitoring-to-achieve-notice.html/feed</wfw:commentRss><description>当你手上管理着好几台服务器，需要及时获取这些服务器网络断开或死机的消息通知，那么手机短信通知将是最好的途径。这点小事情不需要开通什么SMS短信端口的  你只要注册一个 @139.com 邮箱即可，该邮箱带有手机短信通知功能（好像通过手机查看邮件内容是需要付费的 _-!! 但我只需知道 web 服务是否正常，就把服务器信息简单的写在标题即可）

使用 PHP 监测 web 服务 80 端口是否正常：

发送邮件的 class (smtp.txt)，请自行修改文件名

&amp;#60;?

include_once('smtp.php');

@ob_end_flush();

//请修改为自己的发信邮箱地址(用原来的@139.com邮箱无法发送成功 _-!!，错误不明)

$smtp = new smtp(&quot;smtp.163.com&quot;,25,true,&quot;***@163.com&quot; ,&quot;***&quot;);

function testServer($ip){

// 如果服务器在1小时内出现过错误则跳过检测

if(file_exists(&quot;/tmp/check-$ip&quot;) &amp;#38;&amp;#38; (time() - filemtime(&quot;/tmp/check-$ip&quot;)) &amp;#60; 3600)return false;

global $smtp;

$h = '';

echo &quot;CHECK: $ip&quot;;

if($fs = @fsockopen($ip,80, $errno, $errstr, 10)){

@fwrite($fs, &quot;GET / HTTP/1.0\r\nHost: oneoo.com\r\n\r\n&quot;);

$h .= @fgets($fs, 256);

@fclose($fs);}

if(strpos($h,'200') === false){

@touch(&quot;/tmp/check-$ip&quot;);

echo &quot; Fail\n&quot;;

//请修改为自己的邮箱地址

$smtp -&amp;#62; sendmail( '***@139.com', [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=18ec18f8482207c65fa7847659b8223e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=18ec18f8482207c65fa7847659b8223e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=564aec1b77868032f7b39d9455608cea&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=564aec1b77868032f7b39d9455608cea&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=bb9772d9897e36c70f756b748066c167&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=bb9772d9897e36c70f756b748066c167&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=31cb59058a457c0c278e029398ca25d6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=31cb59058a457c0c278e029398ca25d6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=1e6280d02a49bb6f33517600b1797e5f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=1e6280d02a49bb6f33517600b1797e5f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2985b4fc60ffdae4af5505d6135021e1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2985b4fc60ffdae4af5505d6135021e1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=74809270cb3b6faa5076aab9c39720a7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=74809270cb3b6faa5076aab9c39720a7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=82168ad8717ab1db35d76ba2774919d1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=82168ad8717ab1db35d76ba2774919d1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>监控</category><category>服务器</category><category>Develop</category><pubDate>Fri, 06 Jun 2008 08:14:32 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/139com-mail-server-monitoring-to-achieve-notice.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/139com-mail-server-monitoring-to-achieve-notice.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/139com-mail-server-monitoring-to-achieve-notice.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964820/3372955</fs:itemid></item><item><title>使用 PRTG 软件监控服务器、网络状态</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964821/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.paessler.com/prtg&quot; target=&quot;_blank&quot;&gt;&lt;div id=&quot;fp&quot;&gt;P&lt;/div&gt;RTG&lt;/a&gt; 是一个 For Windows 的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1%E5%99%A8&quot; title=&quot;Tag 了 5 篇文章&quot;&gt;服务器&lt;/a&gt;&lt;/span&gt;远程&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%9b%91%e6%8e%a7&quot; title=&quot;Tag 了 2 篇文章&quot;&gt;监控&lt;/a&gt;&lt;/span&gt;工具，它可支持多种监控&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e5%8d%8f%e8%ae%ae&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;协议&lt;/a&gt;&lt;/span&gt;，比较常用的是 SNMP 协议，大部分路由器等&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%bd%91%e7%bb%9c&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;网络&lt;/a&gt;&lt;/span&gt;设备都支持该协议。&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E6%9C%8D%E5%8A%A1&quot; title=&quot;Tag 了 15 篇文章&quot;&gt;服务&lt;/a&gt;&lt;/span&gt;器只需要安装一个 &lt;a href=&quot;http://www.net-snmp.org/&quot; target=&quot;_blank&quot;&gt;snmpd&lt;/a&gt; 监控即可。&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://image-001.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-1.jpg&quot; title=&quot;综合监控界面&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-001.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-1.thumbnail.jpg&quot; alt=&quot;综合监控界面&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;以下介绍如何使用 PRTG 工具来监控服务器的资源、网络状态 ：&lt;/p&gt;

&lt;p&gt;第一、必须在服务器上安装 snmpd 工具&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;Linux: yum -y install snmpd &amp;amp;&amp;amp; yum -y install net-snmp&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;第二、配置 snmpd 工具以提供 CPU、RAM、Disk和网络状态的监控&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;请编辑 /etc/snmp/snmpd.conf&lt;/p&gt;

&lt;p&gt;加入配置内容：&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;access notConfigGroup &quot;&quot; any noauth exact mib2 none none&lt;br&gt;

view mib2&amp;nbsp;&amp;nbsp; included&amp;nbsp; .iso.org.dod.internet.mgmt.mib-2 fc&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;如需要监控 CPU 和disk等状态，请加入以下配置内容：&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;com2sec adminUser&amp;nbsp; default&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color=&quot;#FF0000&quot;&gt;admin&lt;/font&gt;&lt;br&gt;

group&amp;nbsp;&amp;nbsp; adminGroup v1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; adminUser&lt;br&gt;

view adminview included&amp;nbsp; .1.3.6&lt;br&gt;

access adminGroup &quot;&quot; any noauth exact adminview none none&lt;/p&gt;

&lt;p&gt;load 12 14 14&lt;br&gt;

&lt;font color=&quot;#0000FF&quot;&gt;disk / 10000&lt;/font&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;红色部分是设置只允许 admin 用户才能获取 CPU 和disk等状态数据，如果服务器的状态数据敏感，可使用 v2 协议，并加上密码 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;蓝色部分是设置监控某分区，当然也可以设置多个，以监控多个分区&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;第三、配置 PRTG 客户端监控服务器状态&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;&amp;nbsp;&lt;a href=&quot;http://image-001.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-2.jpg&quot; title=&quot;PRTG 添加监控项目&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-001.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-2.thumbnail.jpg&quot; alt=&quot;PRTG 添加监控项目&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;blockquote&gt;

&lt;p&gt;添加网络监控：&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-3.jpg&quot; title=&quot;添加网络监控1&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-3.thumbnail.jpg&quot; alt=&quot;添加网络监控1&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-4.jpg&quot; title=&quot;添加网络监控2&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-4.thumbnail.jpg&quot; alt=&quot;添加网络监控2&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-5.jpg&quot; title=&quot;添加网络监控3&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-5.thumbnail.jpg&quot; alt=&quot;添加网络监控3&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-6.jpg&quot; title=&quot;添加网络监控4&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-6.thumbnail.jpg&quot; alt=&quot;添加网络监控4&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-7.jpg&quot; title=&quot;添加网络监控5&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-7.thumbnail.jpg&quot; alt=&quot;添加网络监控5&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-8.jpg&quot; title=&quot;添加网络监控6&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-8.thumbnail.jpg&quot; alt=&quot;添加网络监控6&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;添加CPU、磁盘等的监控：&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#FF6600&quot;&gt;跟添加网络监控的步骤有些区别，在第三步选择协议的时候不选择Standard Traffic Sensor 而选择 Custom SNMP Sensor。&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;在输入服务器信息时，如果 snmpd 配置文件中设置 CPU、磁盘等监控信息不为 public 默认访问可读取时，SNMP Community String 需要输入你在配置文件中设置的用户名&lt;/p&gt;

&lt;p&gt;第五步需要输入正确的 OID (&lt;a href=&quot;#oid-table&quot;&gt;附表&lt;/a&gt;)，并设置数据类型为 Gauge ；如是磁盘、内存等数据可设置 Scale 为 1024&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://image-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-9.jpg&quot; title=&quot;添加CPU、磁盘等的监控1&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-9.thumbnail.jpg&quot; alt=&quot;添加CPU、磁盘等的监控1&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-10.jpg&quot; title=&quot;添加CPU、磁盘等的监控2&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-10.thumbnail.jpg&quot; alt=&quot;添加CPU、磁盘等的监控2&quot;&gt;&lt;/a&gt; &lt;a href=&quot;http://image-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-11.jpg&quot; title=&quot;添加CPU、磁盘等的监控3&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-003.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-11.thumbnail.jpg&quot; alt=&quot;添加CPU、磁盘等的监控3&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;设置综合监控界面&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;&lt;a href=&quot;http://image-001.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-12.jpg&quot; title=&quot;设置综合监控界面&quot; rel=&quot;lightbox[E4BDBFE794A8+PRTG+E8BDAFE4BBB6E79B91E68EA7E69C8DE58AA1E599A8E38081E7BD91E7BB9CE78AB6E68081]&quot;&gt;&lt;img src=&quot;http://image-001.yo2cdn.com/wp-content/uploads/1/151/2008/06/prtg-12.thumbnail.jpg&quot; alt=&quot;设置综合监控界面&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;还可以针对某项监控数据加上报警设置，如高亮显示，甚至可以自动执行某程序和发送 email 通知。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OID 对照表：&lt;/strong&gt;&lt;a title=&quot;oid-table&quot; name=&quot;oid-table&quot; id=&quot;oid-table&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;1.3.6.1.4.1.2021.10.1.3.1&amp;nbsp; //CPU 每分钟的 Load&lt;br&gt;

1.3.6.1.4.1.2021.4.6.0&amp;nbsp; //已使用内存空间大小&lt;/p&gt;

&lt;/blockquote&gt;

&lt;blockquote&gt;

&lt;p&gt;1.3.6.1.2.1.6.9.0 //系统的 TCP 端口连接数&lt;/p&gt;

&lt;/blockquote&gt;

&lt;blockquote&gt;

&lt;p&gt;1.3.6.1.4.1.2021.9.1.6.1 //第一个监测 Disk 的总空间大小&lt;br&gt;

1.3.6.1.4.1.2021.9.1.8.1 //第一个监测 Disk 的已使用空间大小&lt;br&gt;

1.3.6.1.4.1.2021.9.1.9.1 //第一个监测 Disk 的使用比率&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;更详细的 OID 可使用 snmptranslate -Tp 1.3.6.1.4.1.2021 命令获取&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/prtg-software-monitoring-the-use-of-servers-network-status.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=f9a0d45a7107f523baaa3ec2e63015ad&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=f9a0d45a7107f523baaa3ec2e63015ad&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=dde296026255f8e101882929995f0456&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=dde296026255f8e101882929995f0456&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=5dafeb1eadfffaf3ab7bdc423b6246ed&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=5dafeb1eadfffaf3ab7bdc423b6246ed&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2b50b702acc0563c05b948964261d7b2&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2b50b702acc0563c05b948964261d7b2&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c34c3e119761ea5142cc6e8f727c33c0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c34c3e119761ea5142cc6e8f727c33c0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e6089b1acfb35260306d1f903edce11a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e6089b1acfb35260306d1f903edce11a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=aa91299f0fcfe20777011728e2774567&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=aa91299f0fcfe20777011728e2774567&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=f6b95d757a6d28d7e8833609dc0d39e2&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=f6b95d757a6d28d7e8833609dc0d39e2&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/prtg-software-monitoring-the-use-of-servers-network-status.html/feed</wfw:commentRss><description>PRTG 是一个 For Windows 的服务器远程监控工具，它可支持多种监控协议，比较常用的是 SNMP 协议，大部分路由器等网络设备都支持该协议。服务器只需要安装一个 snmpd 监控即可。



以下介绍如何使用 PRTG 工具来监控服务器的资源、网络状态 ：

第一、必须在服务器上安装 snmpd 工具



Linux: yum -y install snmpd &amp;#38;&amp;#38; yum -y install net-snmp



第二、配置 snmpd 工具以提供 CPU、RAM、Disk和网络状态的监控



请编辑 /etc/snmp/snmpd.conf

加入配置内容：



access notConfigGroup &quot;&quot; any noauth exact mib2 none none

view mib2&amp;#160;&amp;#160; included&amp;#160; .iso.org.dod.internet.mgmt.mib-2 fc



如需要监控 CPU 和disk等状态，请加入以下配置内容：



com2sec adminUser&amp;#160; default&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; admin

group&amp;#160;&amp;#160; adminGroup v1&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; adminUser

view adminview included&amp;#160; .1.3.6

access adminGroup &quot;&quot; any noauth exact [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=f9a0d45a7107f523baaa3ec2e63015ad&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=f9a0d45a7107f523baaa3ec2e63015ad&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=dde296026255f8e101882929995f0456&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=dde296026255f8e101882929995f0456&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=5dafeb1eadfffaf3ab7bdc423b6246ed&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=5dafeb1eadfffaf3ab7bdc423b6246ed&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2b50b702acc0563c05b948964261d7b2&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2b50b702acc0563c05b948964261d7b2&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c34c3e119761ea5142cc6e8f727c33c0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c34c3e119761ea5142cc6e8f727c33c0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e6089b1acfb35260306d1f903edce11a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e6089b1acfb35260306d1f903edce11a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=aa91299f0fcfe20777011728e2774567&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=aa91299f0fcfe20777011728e2774567&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=f6b95d757a6d28d7e8833609dc0d39e2&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=f6b95d757a6d28d7e8833609dc0d39e2&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>监控</category><category>服务器</category><category>Develop</category><pubDate>Tue, 03 Jun 2008 04:27:28 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/prtg-software-monitoring-the-use-of-servers-network-status.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/prtg-software-monitoring-the-use-of-servers-network-status.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/prtg-software-monitoring-the-use-of-servers-network-status.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964821/3372955</fs:itemid></item><item><title>httperf 一个高性能的压力测试工具</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964822/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;a href=&quot;http://www.hpl.hp.com/research/linux/httperf/&quot; target=&quot;_blank&quot;&gt;&lt;div id=&quot;fp&quot;&gt;H&lt;/div&gt;ttperf&lt;/a&gt; is a tool for measuring &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/web-server&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;web server&lt;/a&gt;&lt;/span&gt; performance. It provides a flexible facility for generating various &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/http&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;HTTP&lt;/a&gt;&lt;/span&gt; workloads and for measuring &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/server&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;server&lt;/a&gt;&lt;/span&gt; performance. The focus of &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/httperf&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;httperf&lt;/a&gt;&lt;/span&gt; is not on implementing one particular benchmark but on providing a robust, high-performance tool that facilitates the construction of both micro- and macro-level benchmarks. The three distinguishing characteristics of httperf are its robustness, which includes the ability to generate and sustain server overload, support for the HTTP/1.1 and SSL protocols, and its extensibility to new workload generators and performance measurements.&lt;/p&gt;

&lt;p&gt;Httperf 是一个高效的 http 压力&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e6%b5%8b%e8%af%95&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;测试&lt;/a&gt;&lt;/span&gt;工具，使用它可以模拟出超过1千的并发访问，能充分测试出 web server 的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e6%80%a7%e8%83%bd&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;性能&lt;/a&gt;&lt;/span&gt;。而之前使用的 siege 测试工具则未能突破 500 个并发测试（如果您知道如何可以实现，请告诉我）&lt;/p&gt;

&lt;p&gt;使用 httperf 应该能了解到自己编写 yo2cache 软件性能极限如何了 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;以下是 gzip 格式访问的测试数据（因缓存文件以 gzip 格式保存，所以性能是最高的）&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;oneoo@oneoo-pc:~/Desktop$ httperf --server oneoo.com --num-conns 2000 --add-header &quot;accept-encoding: gzip&quot;&lt;br&gt;

httperf --client=0/1 --server=oneoo.com --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --add-header='accept-encoding: gzip' --num-conns=2000 --num-calls=1&lt;br&gt;

Maximum connect burst length: 1&lt;/p&gt;

&lt;p&gt;Total: connections 2000 requests 2000 replies 2000 test-duration 1.304 s&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#FF6600&quot;&gt;Connection rate: 1533.7 conn/s (0.7 ms/conn, &amp;lt;=1 concurrent connections)&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;

Connection time [ms]: min 0.6 avg 0.7 max 6.3 median 0.5 stddev 0.2&lt;br&gt;

Connection time [ms]: connect 0.0&lt;br&gt;

Connection length [replies/conn]: 1.000&lt;/p&gt;

&lt;p&gt;Request rate: 1533.7 req/s (0.7 ms/req)&lt;br&gt;

Request size [B]: 81.0&lt;/p&gt;

&lt;p&gt;Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)&lt;br&gt;

Reply time [ms]: response 0.6 transfer 0.0&lt;br&gt;

Reply size [B]: header 302.0 content 10482.0 footer 0.0 (total 10784.0)&lt;br&gt;

Reply status: 1xx=0 2xx=2000 3xx=0 4xx=0 5xx=0&lt;/p&gt;

&lt;p&gt;CPU time [s]: user 0.29 system 1.01 (user 22.4% system 77.6% total 100.0%)&lt;br&gt;

Net I/O: 16273.4 KB/s (133.3*10^6 bps)&lt;/p&gt;

&lt;p&gt;Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0&lt;br&gt;

Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;以下是 deflate (2级压缩率)格式访问的统计数据（需要从 gzip 解压，再压缩为 deflate 的数据处理）&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;oneoo@oneoo-pc:~/Desktop$ httperf --server oneoo.com --num-conns 2000 --add-header &quot;accept-encoding: deflate&quot;&lt;br&gt;

httperf --client=0/1 --server=oneoo.com --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --add-header='accept-encoding: deflate' --num-conns=2000 --num-calls=1&lt;br&gt;

Maximum connect burst length: 1&lt;/p&gt;

&lt;p&gt;Total: connections 2000 requests 2000 replies 2000 test-duration 4.113 s&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#FF6600&quot;&gt;Connection rate: 486.2 conn/s (2.1 ms/conn, &amp;lt;=1 concurrent connections)&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;

Connection time [ms]: min 2.0 avg 2.1 max 11.8 median 2.5 stddev 0.3&lt;br&gt;

Connection time [ms]: connect 0.0&lt;br&gt;

Connection length [replies/conn]: 1.000&lt;/p&gt;

&lt;p&gt;Request rate: 486.2 req/s (2.1 ms/req)&lt;br&gt;

Request size [B]: 84.0&lt;/p&gt;

&lt;p&gt;Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)&lt;br&gt;

Reply time [ms]: response 0.6 transfer 1.5&lt;br&gt;

Reply size [B]: header 305.0 content 11014.0 footer 0.0 (total 11319.0)&lt;br&gt;

Reply status: 1xx=0 2xx=2000 3xx=0 4xx=0 5xx=0&lt;/p&gt;

&lt;p&gt;CPU time [s]: user 0.91 system 3.20 (user 22.2% system 77.8% total 100.0%)&lt;br&gt;

&lt;font color=&quot;#FF6600&quot;&gt;Net I/O: 5414.3 KB/s (44.4*10^6 bps)&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0&lt;br&gt;

Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;以下是 deflate (4级压缩率)格式访问的统计数据&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;oneoo@oneoo-pc:~/Desktop$ httperf --server oneoo.com --num-conns 2000 --add-header &quot;accept-encoding: deflate&quot;&lt;br&gt;

httperf --client=0/1 --server=oneoo.com --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --add-header='accept-encoding: deflate' --num-conns=2000 --num-calls=1&lt;br&gt;

Maximum connect burst length: 1&lt;/p&gt;

&lt;p&gt;Total: connections 2000 requests 2000 replies 2000 test-duration 5.329 s&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#FF6600&quot;&gt;Connection rate: 375.3 conn/s (2.7 ms/conn, &amp;lt;=1 concurrent connections)&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;

Connection time [ms]: min 2.6 avg 2.7 max 32.8 median 2.5 stddev 0.7&lt;br&gt;

Connection time [ms]: connect 0.0&lt;br&gt;

Connection length [replies/conn]: 1.000&lt;/p&gt;

&lt;p&gt;Request rate: 375.3 req/s (2.7 ms/req)&lt;br&gt;

Request size [B]: 84.0&lt;/p&gt;

&lt;p&gt;Reply rate [replies/s]: min 374.8 avg 374.8 max 374.8 stddev 0.0 (1 samples)&lt;br&gt;

Reply time [ms]: response 0.6 transfer 2.0&lt;br&gt;

Reply size [B]: header 305.0 content 10457.0 footer 0.0 (total 10762.0)&lt;br&gt;

Reply status: 1xx=0 2xx=2000 3xx=0 4xx=0 5xx=0&lt;/p&gt;

&lt;p&gt;CPU time [s]: user 1.29 system 4.01 (user 24.2% system 75.2% total 99.4%)&lt;br&gt;

&lt;font color=&quot;#FF6600&quot;&gt;Net I/O: 3975.4 KB/s (32.6*10^6 bps)&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0&lt;br&gt;

Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;以下是文本格式访问的统计数据&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;oneoo@oneoo-pc:~/Desktop$ httperf --server oneoo.com --num-conns 2000 --add-header &quot;accept-encoding: normal&quot;&lt;br&gt;

httperf --client=0/1 --server=oneoo.com --port=80 --uri=/ --send-buffer=4096 --recv-buffer=16384 --add-header='accept-encoding: normal' --num-conns=2000 --num-calls=1&lt;br&gt;

Maximum connect burst length: 1&lt;/p&gt;

&lt;p&gt;Total: connections 2000 requests 2000 replies 2000 test-duration 2.349 s&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#FF6600&quot;&gt;Connection rate: 851.3 conn/s (1.2 ms/conn, &amp;lt;=1 concurrent connections)&lt;/font&gt;&lt;/strong&gt;&lt;br&gt;

Connection time [ms]: min 1.1 avg 1.2 max 5.8 median 1.5 stddev 0.2&lt;br&gt;

Connection time [ms]: connect 0.0&lt;br&gt;

Connection length [replies/conn]: 1.000&lt;/p&gt;

&lt;p&gt;Request rate: 851.3 req/s (1.2 ms/req)&lt;br&gt;

Request size [B]: 83.0&lt;/p&gt;

&lt;p&gt;Reply rate [replies/s]: min 0.0 avg 0.0 max 0.0 stddev 0.0 (0 samples)&lt;br&gt;

Reply time [ms]: response 0.6 transfer 0.6&lt;br&gt;

Reply size [B]: header 278.0 content 42562.0 footer 0.0 (total 42840.0)&lt;br&gt;

Reply status: 1xx=0 2xx=2000 3xx=0 4xx=0 5xx=0&lt;/p&gt;

&lt;p&gt;CPU time [s]: user 0.62 system 1.73 (user 26.2% system 73.7% total 99.9%)&lt;br&gt;

&lt;font color=&quot;#FF6600&quot;&gt;Net I/O: 35683.0 KB/s (292.3*10^6 bps)&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;Errors: total 0 client-timo 0 socket-timo 0 connrefused 0 connreset 0&lt;br&gt;

Errors: fd-unavail 0 addrunavail 0 ftab-full 0 other 0&lt;/p&gt;

&lt;/blockquote&gt;

&lt;p&gt;从以上数据可以看到 yo2cache 性能挺好的，最高能达到每秒 1500 个并发处理。性能瓶颈是出现在缓存数据的解压与压缩处理上，如果缓存空间足够大的话，可以考虑保存多种格式的缓存数据，就能解决这个瓶颈问题。&lt;/p&gt;

&lt;p&gt;而在 deflate 数据压缩方面，因为2级压缩率与4级压缩率所产生的数据量差距不大，但并发性能有一定差距，可以考虑使用 2 级压缩率。&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/httperf-the-pressure-of-a-high-performance-test-tools.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=571b059b76aee95b57b05ed18096ef08&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=571b059b76aee95b57b05ed18096ef08&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fdd16f49dbff1982f49328f36d694ff6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fdd16f49dbff1982f49328f36d694ff6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=53805b5c175adeffb7bb9f45f1d2bab0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=53805b5c175adeffb7bb9f45f1d2bab0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=a1353815831af568d31d9eb2f4bc0f28&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=a1353815831af568d31d9eb2f4bc0f28&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2827c8d9ad695e15d415924634e82f1e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2827c8d9ad695e15d415924634e82f1e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c1681f44c6d3da9a90aafb993c964212&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c1681f44c6d3da9a90aafb993c964212&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=781de54f0de7d079a798ca313b33b0bd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=781de54f0de7d079a798ca313b33b0bd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=86d0517cc01af3e5b05aa44145cd6934&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=86d0517cc01af3e5b05aa44145cd6934&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/httperf-the-pressure-of-a-high-performance-test-tools.html/feed</wfw:commentRss><description>Httperf is a tool for measuring web server performance. It provides a flexible facility for generating various HTTP workloads and for measuring server performance. The focus of httperf is not on implementing one particular benchmark but on providing a robust, high-performance tool that facilitates the construction of both micro- and macro-level benchmarks. The three distinguishing [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=571b059b76aee95b57b05ed18096ef08&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=571b059b76aee95b57b05ed18096ef08&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fdd16f49dbff1982f49328f36d694ff6&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fdd16f49dbff1982f49328f36d694ff6&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=53805b5c175adeffb7bb9f45f1d2bab0&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=53805b5c175adeffb7bb9f45f1d2bab0&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=a1353815831af568d31d9eb2f4bc0f28&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=a1353815831af568d31d9eb2f4bc0f28&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2827c8d9ad695e15d415924634e82f1e&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2827c8d9ad695e15d415924634e82f1e&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c1681f44c6d3da9a90aafb993c964212&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c1681f44c6d3da9a90aafb993c964212&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=781de54f0de7d079a798ca313b33b0bd&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=781de54f0de7d079a798ca313b33b0bd&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=86d0517cc01af3e5b05aa44145cd6934&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=86d0517cc01af3e5b05aa44145cd6934&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>httperf</category><category>性能</category><category>yo2</category><category>测试</category><category>服务器</category><category>server</category><category>Develop</category><pubDate>Wed, 14 May 2008 04:06:06 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/httperf-the-pressure-of-a-high-performance-test-tools.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/httperf-the-pressure-of-a-high-performance-test-tools.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/httperf-the-pressure-of-a-high-performance-test-tools.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964822/3372955</fs:itemid></item><item><title>关于3月的相片销售业绩总结</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964823/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;大&lt;/div&gt;家还记得3月的时候我曾经发表过文章，要在&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%bd%91%e7%bb%9c&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;网络&lt;/a&gt;&lt;/span&gt;上&lt;a target=&quot;_blank&quot; href=&quot;chrome://performancing/content/scribefire.xul&quot;&gt;销售自己的生活照&lt;/a&gt;吧 &lt;img src='http://image-002.yo2cdn.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'&gt;&lt;/p&gt;

&lt;p&gt;现在两个月过去了，共有3个网友购买了我的照片，收入是3块钱人民币 _-!! 因为我不是什么名人，并且是个大男人。照片的吸引力确实不怎么样，能卖出去已经算是&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e6%88%90%e5%8a%9f&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;成功&lt;/a&gt;&lt;/span&gt;了。如果你是 mm ，估计你的销售业绩肯定比我好多了。这个收入跟放个&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E5%B9%BF%E5%91%8A&quot; title=&quot;Tag 了 2 篇文章&quot;&gt;广告&lt;/a&gt;&lt;/span&gt;差距不大 _-!!&lt;/p&gt;

&lt;p&gt;还是原始的欲望所带来的商机大啊，好比做（合法）&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E7%BD%91%E7%AB%99&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;网站&lt;/a&gt;&lt;/span&gt;的，就算网站怎么个出色，也很难在一年内实现盈利，但人家做色·情·站的不用一个月就能开宝马了。呵呵，对比就是这么大。&lt;/p&gt;

&lt;p&gt;&lt;b&gt;注意：照片销售正式停止 &lt;img src='http://image-002.yo2cdn.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley'&gt;&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/http&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;http&lt;/a&gt;&lt;/span&gt;://oneoo.com/articles/the-photo-on-the-march-sales-summary.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=9b5d0912040e64d881897c4c7c4ca53b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=9b5d0912040e64d881897c4c7c4ca53b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=75f6f5fab37dc903710e57cc882631a9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=75f6f5fab37dc903710e57cc882631a9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=43a393105eb0968d169b1a7d211b3bab&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=43a393105eb0968d169b1a7d211b3bab&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fb5c31fb40954e1e759e04ef9a4512f1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fb5c31fb40954e1e759e04ef9a4512f1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=1687ea90f16e2725c340fedbbf3c07f1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=1687ea90f16e2725c340fedbbf3c07f1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=a03aecc27501b588d4454876d440250f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=a03aecc27501b588d4454876d440250f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c5f223105b94ddefa3ec5aaf611b1d2c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c5f223105b94ddefa3ec5aaf611b1d2c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=ce5c2cf834bcc16cb67f688250301568&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=ce5c2cf834bcc16cb67f688250301568&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/the-photo-on-the-march-sales-summary.html/feed</wfw:commentRss><description>大家还记得3月的时候我曾经发表过文章，要在网络上销售自己的生活照吧 

现在两个月过去了，共有3个网友购买了我的照片，收入是3块钱人民币 _-!! 因为我不是什么名人，并且是个大男人。照片的吸引力确实不怎么样，能卖出去已经算是成功了。如果你是 mm ，估计你的销售业绩肯定比我好多了。这个收入跟放个广告差距不大 _-!!

还是原始的欲望所带来的商机大啊，好比做（合法）网站的，就算网站怎么个出色，也很难在一年内实现盈利，但人家做色·情·站的不用一个月就能开宝马了。呵呵，对比就是这么大。

注意：照片销售正式停止 

文章来源 oneoo's 私家花园 : http://oneoo.com/articles/the-photo-on-the-march-sales-summary.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=9b5d0912040e64d881897c4c7c4ca53b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=9b5d0912040e64d881897c4c7c4ca53b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=75f6f5fab37dc903710e57cc882631a9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=75f6f5fab37dc903710e57cc882631a9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=43a393105eb0968d169b1a7d211b3bab&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=43a393105eb0968d169b1a7d211b3bab&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fb5c31fb40954e1e759e04ef9a4512f1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fb5c31fb40954e1e759e04ef9a4512f1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=1687ea90f16e2725c340fedbbf3c07f1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=1687ea90f16e2725c340fedbbf3c07f1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=a03aecc27501b588d4454876d440250f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=a03aecc27501b588d4454876d440250f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=c5f223105b94ddefa3ec5aaf611b1d2c&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=c5f223105b94ddefa3ec5aaf611b1d2c&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=ce5c2cf834bcc16cb67f688250301568&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=ce5c2cf834bcc16cb67f688250301568&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>Feels</category><pubDate>Mon, 12 May 2008 15:46:28 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/the-photo-on-the-march-sales-summary.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/the-photo-on-the-march-sales-summary.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/the-photo-on-the-march-sales-summary.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964823/3372955</fs:itemid></item><item><title>Yes! 是 Yo2messenger</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964824/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;很&lt;/div&gt;早以前，一个老伯伯就发过一个 Yo2messenger 的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e6%88%aa%e5%9b%be&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;截图&lt;/a&gt;&lt;/span&gt;，但此老伯伯当时只做了个非常简陋的登录界面，就没有回事。并未继续&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%E5%BC%80%E5%8F%91&quot; title=&quot;Tag 了 3 篇文章&quot;&gt;开发&lt;/a&gt;&lt;/span&gt;下去。&lt;/p&gt;

&lt;p&gt;现在这个老伯伯终于下定决心要把它给“生”下来的 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt; 并且制作了更好的界面，剩下的&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e5%b7%a5%e4%bd%9c&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;工作&lt;/a&gt;&lt;/span&gt;就是加入实际功能。&lt;/p&gt;

&lt;p&gt;程序是基于网页 AJAX 的形式进行开发，当然对于 Windows 平台就提供一个简单的框架，更方便使用。而 Linux 等其他使用 FireFox 浏览器的用户则可以在浏览器的侧栏加载此程序 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt; 界面已定型，现在给大家放个图&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/04/sc.gif&quot; title=&quot;sc.gif&quot; rel=&quot;lightbox[Yes21+E698AF+Yo2messenger]&quot;&gt;&lt;img src=&quot;http://image-002.yo2cdn.com/wp-content/uploads/1/151/2008/04/sc.thumbnail.gif&quot; alt=&quot;sc.gif&quot;&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : &lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/http&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;http&lt;/a&gt;&lt;/span&gt;://oneoo.com/articles/yes-is-yo2messenger.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=6639c38ba381c453b9730de042cf4e81&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=6639c38ba381c453b9730de042cf4e81&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=cb0a65c472c59450c87b9acb2cc7b2f7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=cb0a65c472c59450c87b9acb2cc7b2f7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=b16c47e4f1b636447f2b614a3cf1ed30&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=b16c47e4f1b636447f2b614a3cf1ed30&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=129978f8796b29b0857e45d7f81da30f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=129978f8796b29b0857e45d7f81da30f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=b1cda74a77ed403b59cbe933e439ab5b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=b1cda74a77ed403b59cbe933e439ab5b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=f091a89fb60f2e4963e24ab3076441e9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=f091a89fb60f2e4963e24ab3076441e9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=035a0b9d01079817245a630d95b1af54&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=035a0b9d01079817245a630d95b1af54&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=7a2087a05a8b36f57e26e4dbceebeda1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=7a2087a05a8b36f57e26e4dbceebeda1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/yes-is-yo2messenger.html/feed</wfw:commentRss><description>很早以前，一个老伯伯就发过一个 Yo2messenger 的截图，但此老伯伯当时只做了个非常简陋的登录界面，就没有回事。并未继续开发下去。

现在这个老伯伯终于下定决心要把它给“生”下来的  并且制作了更好的界面，剩下的工作就是加入实际功能。

程序是基于网页 AJAX 的形式进行开发，当然对于 Windows 平台就提供一个简单的框架，更方便使用。而 Linux 等其他使用 FireFox 浏览器的用户则可以在浏览器的侧栏加载此程序  界面已定型，现在给大家放个图



文章来源 oneoo's 私家花园 : http://oneoo.com/articles/yes-is-yo2messenger.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=6639c38ba381c453b9730de042cf4e81&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=6639c38ba381c453b9730de042cf4e81&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=cb0a65c472c59450c87b9acb2cc7b2f7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=cb0a65c472c59450c87b9acb2cc7b2f7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=b16c47e4f1b636447f2b614a3cf1ed30&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=b16c47e4f1b636447f2b614a3cf1ed30&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=129978f8796b29b0857e45d7f81da30f&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=129978f8796b29b0857e45d7f81da30f&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=b1cda74a77ed403b59cbe933e439ab5b&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=b1cda74a77ed403b59cbe933e439ab5b&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=f091a89fb60f2e4963e24ab3076441e9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=f091a89fb60f2e4963e24ab3076441e9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=035a0b9d01079817245a630d95b1af54&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=035a0b9d01079817245a630d95b1af54&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=7a2087a05a8b36f57e26e4dbceebeda1&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=7a2087a05a8b36f57e26e4dbceebeda1&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>Develop</category><pubDate>Mon, 21 Apr 2008 07:13:30 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/yes-is-yo2messenger.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/yes-is-yo2messenger.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/yes-is-yo2messenger.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964824/3372955</fs:itemid></item><item><title>你的理想是什么?</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964825/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;理&lt;/div&gt;想-是人生的奋斗目标，是人们对未来的一种有可能实现的想象。&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%90%86%e6%83%b3&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;理想&lt;/a&gt;&lt;/span&gt;是一种对未来的想象，但是，并不是任何想象都是理想。&lt;/p&gt;

&lt;p&gt;如果没有理想，你只能平庸的度过了自己短暂的一生。当然各&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e4%b8%aa%e4%ba%ba&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;个人&lt;/a&gt;&lt;/span&gt;的理想都不同，比如有的女人理想就是嫁一好老公，能过上安稳的日子，而有的则是希望嫁个有权势的老公，享尽荣华富贵。更有的理想是成为&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%8b%ac%e7%ab%8b&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;独立&lt;/a&gt;&lt;/span&gt;的女强人 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt; 不知道你的理想是什么？&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;不同的理想所造就出来的人生差距是非常大的。&lt;/strong&gt;拥有好老公的不可能成为人群中的亮点，而拥有权势的也不可能进出菜市场一样。 可以说理想决定了你的一生，你怎样选择就得好好想想咯。&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;不同的生活环境造就不同的理想。&lt;/strong&gt;生活在贫困当中的人，估计他所想到的理想也就只会局限在物质方面了，连自己的生活都未过得安稳，他如何去想更大的理想，并能够实现自己的理想呢？出身于富裕家庭的人，他的理想会只需要过上安稳的生活吗？他已经拥有安稳生活了啊！&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;安稳的生活成为理想定位的最大敌人！&lt;/strong&gt;如果你生活在一个安稳的环境下， 那么你的理想很可能被现在已拥有的生活而局限起来。你会觉得自己已经拥有一些其他人都没有物质，也就没有了强大的动力推使你去实现更大的理想，可能你已经觉得反正自己已经比人家优秀，没必要花费更大的力气了。&lt;strong&gt;安稳&lt;/strong&gt;&lt;strong&gt;的生活也会使人生过得平庸！&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#FF6600&quot;&gt;&lt;strong&gt;我的理想是 Yo2 能够建立起一个品牌，成为互联网上一颗闪亮的星星 &lt;img src='http://image-003.yo2cdn.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font color=&quot;#FF6600&quot;&gt;我为实现自己的理想，放弃了一直以来的安稳生活，全心全意的付出着，等待着···&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/what-is-your-ideal.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e69822623a9bd5b71ce2ed1ac60baa7d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e69822623a9bd5b71ce2ed1ac60baa7d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e842d2919719ddf307f92079df2574f7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e842d2919719ddf307f92079df2574f7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e5ee03ddbb58b2c7bbee1d11ad2d67ed&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e5ee03ddbb58b2c7bbee1d11ad2d67ed&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=16bfb8ecc70361af7f5ccf5c2941a684&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=16bfb8ecc70361af7f5ccf5c2941a684&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=5c727fa79e300c99d89a1f82b55fa121&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=5c727fa79e300c99d89a1f82b55fa121&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fa35bc591ac8ee0de1404b24ad00ca17&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fa35bc591ac8ee0de1404b24ad00ca17&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=3e56ababe8e678bd93ca46c5416bd2d5&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=3e56ababe8e678bd93ca46c5416bd2d5&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=3eb988b689af84eabf05601d053d7ce9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=3eb988b689af84eabf05601d053d7ce9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/what-is-your-ideal.html/feed</wfw:commentRss><description>理想-是人生的奋斗目标，是人们对未来的一种有可能实现的想象。理想是一种对未来的想象，但是，并不是任何想象都是理想。

如果没有理想，你只能平庸的度过了自己短暂的一生。当然各个人的理想都不同，比如有的女人理想就是嫁一好老公，能过上安稳的日子，而有的则是希望嫁个有权势的老公，享尽荣华富贵。更有的理想是成为独立的女强人  不知道你的理想是什么？

不同的理想所造就出来的人生差距是非常大的。拥有好老公的不可能成为人群中的亮点，而拥有权势的也不可能进出菜市场一样。 可以说理想决定了你的一生，你怎样选择就得好好想想咯。

不同的生活环境造就不同的理想。生活在贫困当中的人，估计他所想到的理想也就只会局限在物质方面了，连自己的生活都未过得安稳，他如何去想更大的理想，并能够实现自己的理想呢？出身于富裕家庭的人，他的理想会只需要过上安稳的生活吗？他已经拥有安稳生活了啊！

安稳的生活成为理想定位的最大敌人！如果你生活在一个安稳的环境下， 那么你的理想很可能被现在已拥有的生活而局限起来。你会觉得自己已经拥有一些其他人都没有物质，也就没有了强大的动力推使你去实现更大的理想，可能你已经觉得反正自己已经比人家优秀，没必要花费更大的力气了。安稳的生活也会使人生过得平庸！

我的理想是 Yo2 能够建立起一个品牌，成为互联网上一颗闪亮的星星 

我为实现自己的理想，放弃了一直以来的安稳生活，全心全意的付出着，等待着···

文章来源 oneoo's 私家花园 : http://oneoo.com/articles/what-is-your-ideal.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e69822623a9bd5b71ce2ed1ac60baa7d&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e69822623a9bd5b71ce2ed1ac60baa7d&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e842d2919719ddf307f92079df2574f7&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e842d2919719ddf307f92079df2574f7&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=e5ee03ddbb58b2c7bbee1d11ad2d67ed&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=e5ee03ddbb58b2c7bbee1d11ad2d67ed&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=16bfb8ecc70361af7f5ccf5c2941a684&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=16bfb8ecc70361af7f5ccf5c2941a684&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=5c727fa79e300c99d89a1f82b55fa121&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=5c727fa79e300c99d89a1f82b55fa121&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fa35bc591ac8ee0de1404b24ad00ca17&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fa35bc591ac8ee0de1404b24ad00ca17&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=3e56ababe8e678bd93ca46c5416bd2d5&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=3e56ababe8e678bd93ca46c5416bd2d5&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=3eb988b689af84eabf05601d053d7ce9&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=3eb988b689af84eabf05601d053d7ce9&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>理想</category><category>Think</category><category>个人</category><category>Feels</category><pubDate>Sat, 12 Apr 2008 00:18:35 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/what-is-your-ideal.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/what-is-your-ideal.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/what-is-your-ideal.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964825/3372955</fs:itemid></item><item><title>完美实现垂直水平居中的 DIV</title><link>http://item.feedsky.com/~feedsky/oneoo/~5263818/107964826/3372955/1/item.html</link><content:encoded>&lt;p&gt;&lt;div id=&quot;fp&quot;&gt;这&lt;/div&gt;个问题，估计很多网页&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e8%ae%be%e8%ae%a1&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;设计&lt;/a&gt;&lt;/span&gt;员都会遇到过，如何在页面中建立出一个垂直水平居中的 DIV 呢？&lt;/p&gt;

&lt;p&gt;我在 &lt;span class=&quot;yo2keyword&quot;&gt;&lt;a href=&quot;http://www.google.com&quot; target=&quot;new&quot;&gt;google&lt;/a&gt;&lt;/span&gt; 搜索了一下&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e5%85%b3%e9%94%ae%e5%ad%97&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;关键字&lt;/a&gt;&lt;/span&gt;“&lt;a href=&quot;http://www.google.cn/search?q=div+%E5%9E%82%E7%9B%B4%E5%B1%85%E4%B8%AD&amp;amp;ie=utf-8&amp;amp;oe=utf-8&amp;amp;aq=t&amp;amp;rls=org.mozilla:zh-CN:official&amp;amp;client=firefox-a&quot; target=&quot;_blank&quot;&gt;div 垂直居中&lt;/a&gt;” ,约有&lt;strong&gt;71,900&lt;/strong&gt;项符合的查询。但并未能找到一个正确的，符合 XHTML和&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/css&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;CSS&lt;/a&gt;&lt;/span&gt;规范的办法。自己就&lt;span class=&quot;yo2keyword yo2keyword_tag&quot;&gt;&lt;a href=&quot;http://oneoo.com/articles/tag/%e7%90%a2%e7%a3%a8&quot; title=&quot;Tag 了 1 篇文章&quot;&gt;琢磨&lt;/a&gt;&lt;/span&gt;了一下，其实也不难，虽然DIV不支持未明确高度的垂直居中，但这个是可以变通的。&lt;/p&gt;

&lt;p&gt;我们知道 div 的 position 属性是支持百分比数值来进行定位的，有了这个定位能力，我们就可以把 div 的显示坐标定位在网页的绝对中心了，再通过 margin 属性把 div 设置为我们需要的宽度和高度就可以。当然我们的 margin-top 和 margin-left 属性需要使用到负数，把DIV的定位从中心分别向上和向左移动到合适的地方。下面这个例子可以在页面上建立一个垂直水平居中的 DIV:&lt;/p&gt;

&lt;p&gt;&lt;textarea name=&quot;code&quot; class=&quot;php&quot; rows=&quot;15&quot; cols=&quot;50&quot;&gt;&amp;lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;gt;

&amp;lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;gt;

&amp;lt;head&amp;gt;

&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;gt;

&amp;lt;title&amp;gt;垂直水平居中的 DIV&amp;lt;/title&amp;gt;

&amp;lt;style type=&quot;text/css&quot;&amp;gt;

&amp;lt;!--

#pageFrame {

position: absolute; // 设置为绝对定位

left: 50%; // 设置显示坐标 X

top: 50%; // 设置显示坐标 Y

width:760px; // 设置 DIV 宽度

height:460px; // 设置 DIV 高度

margin-left:-380px; // 根据 DIV 的宽度，设置此值

margin-top:-230px; // 根据 DIV 的宽度，设置此值

background:#EEE;

}

--&amp;gt;

&amp;lt;/style&amp;gt;

&amp;lt;/head&amp;gt;

&amp;lt;body&amp;gt;

&amp;lt;div id=&quot;pageFrame&quot;&amp;gt;垂直水平居中的 DIV&amp;lt;/div&amp;gt;

&amp;lt;/body&amp;gt;

&amp;lt;/html&amp;gt;&lt;/textarea&gt;&lt;/p&gt;

&lt;p&gt;使用此方法，既不需要书写不标准的 css 代码，使用各浏览器的Hack，更不需要使用 JavaScript 来实现。&lt;/p&gt;

&lt;p&gt;文章来源 &lt;a href=&quot;http://oneoo.com&quot;&gt;oneoo's 私家花园&lt;/a&gt; : http://oneoo.com/articles/perfect-realization-of-the-level-of-intermediate-vertical-div.html, 数字验证: b96690767bb506e0257e9532a7888dc4&lt;/p&gt;&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2681ed2c4ac385c43f1d0f40864c6183&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2681ed2c4ac385c43f1d0f40864c6183&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=28ba181fbf1f22298b76a1385cecea65&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=28ba181fbf1f22298b76a1385cecea65&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=4ba01b595642aebbfb83742249cf3539&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=4ba01b595642aebbfb83742249cf3539&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=93c6a6c6e9adfdace080a77d6c4fff7a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=93c6a6c6e9adfdace080a77d6c4fff7a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=3f2df63eef142548d24f996b69a4c6cb&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=3f2df63eef142548d24f996b69a4c6cb&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=6964cdace867b008ac9d170522658260&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=6964cdace867b008ac9d170522658260&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=ffa95469e97959b4e6a19fb775351b08&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=ffa95469e97959b4e6a19fb775351b08&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fb121e63275b4dd4c3fc711615257a05&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fb121e63275b4dd4c3fc711615257a05&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</content:encoded><wfw:commentRss>http://oneoo.com/articles/perfect-realization-of-the-level-of-intermediate-vertical-div.html/feed</wfw:commentRss><description>这个问题，估计很多网页设计员都会遇到过，如何在页面中建立出一个垂直水平居中的 DIV 呢？

我在 google 搜索了一下关键字“div 垂直居中” ,约有71,900项符合的查询。但并未能找到一个正确的，符合 XHTML和CSS规范的办法。自己就琢磨了一下，其实也不难，虽然DIV不支持未明确高度的垂直居中，但这个是可以变通的。

我们知道 div 的 position 属性是支持百分比数值来进行定位的，有了这个定位能力，我们就可以把 div 的显示坐标定位在网页的绝对中心了，再通过 margin 属性把 div 设置为我们需要的宽度和高度就可以。当然我们的 margin-top 和 margin-left 属性需要使用到负数，把DIV的定位从中心分别向上和向左移动到合适的地方。下面这个例子可以在页面上建立一个垂直水平居中的 DIV:

&amp;#60;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&amp;#62;

&amp;#60;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&amp;#62;

&amp;#60;head&amp;#62;

&amp;#60;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&amp;#62;

&amp;#60;title&amp;#62;垂直水平居中的 DIV&amp;#60;/title&amp;#62;

&amp;#60;style type=&quot;text/css&quot;&amp;#62;

&amp;#60;!--

#pageFrame {

position: absolute; // 设置为绝对定位

left: 50%; // 设置显示坐标 X

top: 50%; // 设置显示坐标 Y

width:760px; // 设置 DIV 宽度

height:460px; // 设置 [...]&lt;br /&gt;&lt;!-- Feedsky flare --&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=2681ed2c4ac385c43f1d0f40864c6183&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=2681ed2c4ac385c43f1d0f40864c6183&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=28ba181fbf1f22298b76a1385cecea65&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=28ba181fbf1f22298b76a1385cecea65&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=4ba01b595642aebbfb83742249cf3539&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=4ba01b595642aebbfb83742249cf3539&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=93c6a6c6e9adfdace080a77d6c4fff7a&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=93c6a6c6e9adfdace080a77d6c4fff7a&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=3f2df63eef142548d24f996b69a4c6cb&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=3f2df63eef142548d24f996b69a4c6cb&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=6964cdace867b008ac9d170522658260&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=6964cdace867b008ac9d170522658260&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=ffa95469e97959b4e6a19fb775351b08&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=ffa95469e97959b4e6a19fb775351b08&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;a href=&quot;http://feed.feedsky.com/~flare/oneoo?a=fb121e63275b4dd4c3fc711615257a05&quot; target=&quot;_blank&quot;&gt;&lt;img src=&quot;http://feed.feedsky.com/~flare/oneoo?i=fb121e63275b4dd4c3fc711615257a05&quot; border=&quot;0&quot;&gt;&lt;/a&gt;&lt;!-- /Feedsky flare --&gt;</description><category>html</category><category>设计</category><category>css</category><category>Develop</category><pubDate>Sat, 05 Apr 2008 05:16:05 +0800</pubDate><author>oneoo</author><comments>http://oneoo.com/articles/perfect-realization-of-the-level-of-intermediate-vertical-div.html#comments</comments><guid isPermaLink="false">http://oneoo.com/articles/perfect-realization-of-the-level-of-intermediate-vertical-div.html</guid><dc:creator>oneoo</dc:creator><fs:srclink>http://oneoo.com/articles/perfect-realization-of-the-level-of-intermediate-vertical-div.html</fs:srclink><fs:srcfeed>http://oneoo.com/feed/</fs:srcfeed><fs:itemid>feedsky/oneoo/~5263818/107964826/3372955</fs:itemid></item></channel></rss>