<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Holmesian's]]></title> 
<link>http://holmesian.org/index.php</link> 
<description><![CDATA[不能则学，不知则问，耻于问人，决无长进。]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Holmesian's]]></copyright>
<item>
<link>http://holmesian.org/twitter_fuck_G_F_W/</link>
<title><![CDATA[[转贴]新开源项目BoTwi.无视oAuth验证]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[个人天空]]></category>
<pubDate>Thu, 02 Sep 2010 06:14:01 +0000</pubDate> 
<guid>http://holmesian.org/twitter_fuck_G_F_W/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">Twitter完全不顾中国人民的强烈谴责，正式关闭了Http Basic Auth，只好建这个开源项目叫BoTwi：Break OAuth Twitter&mdash;&mdash;帮你自建一个继续使用Basic方式的代理API。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); "><strong>怎么使用：</strong></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">需要一个支持curl/.htaccess/无广告的PHP5空间，可以不做任何设置，上传即可用，API地址指向上传目录下的/t。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">可以运行check.php检查一下主机是否支持。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); "><strong>为啥要用：</strong></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">如果你的Twitter客户端可以自定义API，可以试试自己搭建一个，这个东西相当于自动代理oAuth的Twip，<span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; ">效果等于Twitter没有关闭Basic</span>，无视oAuth，直接发送用户密码就可以获得Twitter内容。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">Twip也有oAuth版本，但只支持有限的几个用户，设置麻烦，所以自己写一下。感谢Twip的作者@yegle，同时也借鉴了dabr的代码。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); "></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; "><strong>折腾说明：</strong></span></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); "><span style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; ">如果你不想折腾，下面的内容可以不看&mdash;&mdash;</span></p>
<blockquote style="margin-top: 10px; margin-right: 30px; margin-bottom: 10px; margin-left: 30px; padding-top: 10px; padding-right: 10px; padding-bottom: 3px; padding-left: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 16px; font-family: inherit; vertical-align: baseline; background-color: rgb(244, 244, 244); ">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">自定义API名称：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">比如你上传到了http://www.abc.com/botwi/下面，那么你在http://dev.twitter.com申请的应用的OAUTH_CALLBACK_URL要指向http://www.abc.com/botwi/oauth，在botwi/t/config.php里定义这个值，并按申请应用时给你的值修改OAUTH_CONSUMER_KEY和OAUTH_CONSUMER_SECRET。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">更快地连接：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">如果传给API的是用户名密码，那么除了几个不需要认证的search之类，一般都要自动运算一次获得oAuth授权，但如果你能让客户端发来oauth_token和oauth_token_secret，那就可以省下这一步自动运算的时间。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">我自己定义了一个/takeoAuth.json，向/botwi/t/takeoAuth.json发送用户密码，你就可以得到一个json格式的oauth_token和oauth_token_secret，然后你就可以接下来都用这两个东西发送请求了。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">Godaddy免费空间：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">大概6块人民币可以在Godaddy买个info域名，送免费空间，用来做API性能很好，可惜json输出后面都带广告，如果你能够在客户端处理掉这个广告，比如PHP的用strip_tags可以完美去除。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">其它免费空间：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">Google&ldquo;php免费空间&rdquo;试试，目前只测过alwaysdata，在Environment的PHP配置里加上extension = curl.so就行了。</p>
</blockquote>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">项目地址：<a style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; text-decoration: none; cursor: pointer; color: rgb(0, 51, 153); " href="http://code.google.com/p/botwi/">http://code.google.com/p/botwi/</a></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">测试API：<a title="http://iamzzm.alwaysdata.net/botwi/t" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; text-decoration: none; cursor: pointer; color: rgb(0, 51, 153); " href="denied:javascript:void(0);">http://iamzzm.alwaysdata.net/botwi/t</a></p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">PS.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); "><a title="http://iamzzm.alwaysdata.net/botwi/t" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; text-decoration: none; cursor: pointer; color: rgb(0, 51, 153); " href="denied:javascript:void(0);">http://iamzzm.alwaysdata.net</a> 是使用这个API的真理部内参，原来的nc.alwaysdata.net被光荣牺牲了，但搭建一个不过几分钟的事，真不知道有关部门费这个劲干嘛，白白增加了GFW黑名单的维护成本&mdash;&mdash;话说这个成本里也包含了我交的税呀。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">PS.PS.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">杯具，刚发完Twitter就维护了~在这回答点问题：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">这个项目首先是鼓励迅速搭建公开可用的API，如果是私用，最新版的Twip已经满足要求，可以无视路过。</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">当然，如果你要让这个API也私用，很简单，在/t/index.php里的if ($type == &lsquo;oauth&rsquo;)前面加两行：</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">$add = (strpos ( $request_api, &lsquo;?&rsquo; ) &gt; 0) ? &lsquo;&amp;&rsquo; : &lsquo;?&rsquo;;</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">$request_api .= $add.&rsquo;oauth_token=xxxxxxxx&amp;oauth_token_secret=xxxxxxx&rsquo;;</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 15px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit; vertical-align: baseline; color: rgb(102, 102, 102); ">这里的xxxxxxx是你账号私有的token和secret。不过不鼓励这样，共享没什么不好。</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/botwi/" rel="tag">botwi</a> , <a href="http://holmesian.org/tags/oauth/" rel="tag">oauth</a> , <a href="http://holmesian.org/tags/%25E9%25A1%25B9%25E7%259B%25AE/" rel="tag">项目</a> , <a href="http://holmesian.org/tags/%25E5%25BC%2580%25E6%25BA%2590/" rel="tag">开源</a> , <a href="http://holmesian.org/tags/%25E9%25AA%258C%25E8%25AF%2581/" rel="tag">验证</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/ECJTU_IT_II/</link>
<title><![CDATA[日新技术部总结——服务器+网站]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Sat, 28 Aug 2010 05:37:06 +0000</pubDate> 
<guid>http://holmesian.org/ECJTU_IT_II/</guid> 
<description>
<![CDATA[ 
	<div>
<h2 style="text-align: center; ">服务器+网站</h2>
<p>35服务器：目前是日新的主服务器，日新的绝大部分应用在35服务器上：</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>Filesystem         Used   Mounted on</span></span></li>
    <li><span>/dev/da0s1a        3.0G      /</span></li>
    <li class="alt"><span>devfs              1.0K      /dev</span></li>
    <li><span>/dev/da0s1d         81M      /<span class="keyword">var</span></span></li>
    <li class="alt"><span>/dev/da1s1g         21G      /data</span></li>
    <li><span>/dev/da1s1d         19G      /usr/home</span></li>
    <li class="alt"><span>/dev/da1s1e        6.3G      /<span class="keyword">var</span><span>/log</span></span></li>
    <li><span>/dev/da1s1f         28G      /www</span></li>
    <li class="alt"><span>/dev/da2s1d         53G      /backup</span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/da0s1a     16G    3.0G     11G    21%    /
devfs          1.0K    1.0K      0B   100%    /dev
/dev/da0s1d    4.7G     81M    4.3G     2%    /var
/dev/da1s1g     40G     21G     16G    57%    /data
/dev/da1s1d     29G     19G    7.9G    71%    /usr/home
/dev/da1s1e     28G    6.3G     20G    24%    /var/log
/dev/da1s1f     58G     28G     25G    52%    /www
/dev/da2s1d     71G     53G     12G    82%    /backup
</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p>网站程序建议放在/www或者相应帐号的home目录；mysql数据都在/data中；备份文件在/backup中，数据库是每天会自动备份一次的；日志文件在/var/log中，已经给每个网站设置好了日志定时切割。</p>
<p>Web服务方面35服务器很畸形地用了Nginx+FastCGI+Apache共存的方式，Nginx占80端口，php-cgi占139端口，Apache占888端口，相对稳定和不常修改的程序在Nginx+FastCGI下跑着，一些老成员的站点在Apache下跑着并由Nginx反向代理。由于在PHP 5.2以上启用safe_mode or an open_basedir会导致CURLOPT_FOLLOWLOCATION失败，所以在Apache下的php是没有打开open_basedir的，需要使用相应功能的站点可以放在Apache下跑，而FastCGI下相应的限制更严格。</p>
<p>35服务器使用ipf防火墙，对公网仅开放80端口，对办公室所处的网段全端口开放，另外对部分IP段开放22、8081端口。SSH占用22端口，Webmin占用8081端口。外网登录服务器需要使用90服务器的代理服务。</p>
<p>登录服务器后提示如下：</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>You can edit your website configure in following files:</span></span></li>
    <li>&nbsp;</li>
    <li class="alt"><span>/usr/local/etc/apache22/extra/httpd-vhosts.conf (apache)</span></li>
    <li><span>/usr/local/etc/nginx/vhost.conf                 (nginx)</span></li>
    <li class="alt">&nbsp;</li>
    <li><span>Then you can <span class="keyword">use</span><span> this to apply your settings:</span></span></li>
    <li class="alt"><span><span class="string">&quot;nginx -s reload&quot;</span></span></li>
    <li><span><span class="string">&quot;apchectl restart&quot;</span></span></li>
    <li class="alt">&nbsp;</li>
    <li><span>And you can modify the website files in /www all!</span></li>
    <li class="alt">&nbsp;</li>
    <li><span>BUT YOU MUST BACKUP IT BEFORE YOU DO ANYTHING!</span></li>
    <li class="alt">&nbsp;</li>
    <li><span>PS:The old data is still in the /usr/home/oldhome/.</span></li>
    <li class="alt"><span>   Now the Nginx+FastCGI is working on ecjtu.net,try it in the files:</span></li>
    <li><span>   /usr/local/etc/nginx/ecjtu.conf.</span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
You can edit your website configure in following files:

/usr/local/etc/apache22/extra/httpd-vhosts.conf (apache)
/usr/local/etc/nginx/vhost.conf                 (nginx)

Then you can use this to apply your settings:
&quot;nginx -s reload&quot;
&quot;apchectl restart&quot;

And you can modify the website files in /www all!

BUT YOU MUST BACKUP IT BEFORE YOU DO ANYTHING!

PS:The old data is still in the /usr/home/oldhome/.
   Now the Nginx+FastCGI is working on ecjtu.net,try it in the files:
   /usr/local/etc/nginx/ecjtu.conf.
</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p>35服务器一般只给成员开放www组和ftp组权限，如何添加自己的网站以及相应的权限如上，已经解释得很清楚，需要注意的是如果使用日新的域名务必以{yourname}.u.ecjtu.net格式，如果是使用自己的域名必须先备案才可以绑定到日新服务器，<span style="background-color: rgb(255, 0, 0); ">严禁绑定未备案的域名到日新的服务器上</span>！</p>
<p>&nbsp;</p>
<p>90服务器：日新唯一一台Windows服务器，主要运行着一些ASP站点和日新投稿系统。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>未完待续&hellip;&hellip;</p>
</div>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E6%258A%2580%25E6%259C%25AF%25E9%2583%25A8/" rel="tag">技术部</a> , <a href="http://holmesian.org/tags/%25E6%2597%25A5%25E6%2596%25B0/" rel="tag">日新</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/ECJTU_IT/</link>
<title><![CDATA[日新技术部总结]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Fri, 27 Aug 2010 05:14:14 +0000</pubDate> 
<guid>http://holmesian.org/ECJTU_IT/</guid> 
<description>
<![CDATA[ 
	<p>马上要准备彻底闭关备战考研，可能就目前的情况有必要对目前日新技术部的整体工作进行一下总结并交付给接下来的TX们了。</p>
<p>日新的基础是整个好几代前辈一起不断努力的结晶，这其中包括新闻部、技术部、互动社区的诸多前辈之心血。首先技术部的TX们需要明确：<span style="color: rgb(255, 0, 0); ">技术一种工具</span>&mdash;&mdash;或是达到目标的工具，或是展示你能力的工具等，技术的存在终究是为了能够更好地工作，如果以纯技术为全部的话结果可能会是自己最终沦为&ldquo;工具&rdquo;。在技术部的TX可能更多的是以磨练技术的想法为主，以学习和研究技术为主固然是好事，在此之外建议大家适当地去关注一下非技术的因子，比如找到自己真正合适的爱好、关注关注互联网大事记、在日新多交一些合适的朋友、多了解非技术人士的想法等。此外大家应该明白日新是一个整体，技术部是日新的一部分，与其他非技术部门的TX更多地交流可以让你的视野和思维更加的广阔：不同圈子的人有不同的大学经历，不同圈子的人交流往往更能碰撞出火花。</p>
<p><a href="http://hemon.cn">好梦网</a>的创始人ZhangWei前辈一直是技术部里的神话，我们一直在期待技术部可以出更多的zhangwei，更多的&ldquo;好梦网&rdquo;，但说实话就目前技术部的整体实力还是有些令人无奈的。虽然说除了努力之外学技术多少还是要讲究一些天份，但是绝大部分你需要掌握的技术内容都是更需要你付出努力和时间的，走过之前给TX们各式各样填鸭式培训的探索之路后我最终还是觉得应该：&ldquo;师傅领进门，修行在个人&rdquo;。加油吧！ TX们！</p>
<p></p>
<p>不知不觉就说了那么多，我不太喜欢矫情，接下来就把日新技术部目前运作的一些具体内容说明一下，方便接下来的TX工作和更新。</p>
<p>&nbsp;</p>
<h2 style="text-align: center; ">办公室</h2>
<p>技术部现在有32#409和1411两间办公室可用：网建组和硬件组暂共用32#409（等408的空调到位之后硬件组根据情况可以搬至408，主要是方便维修工作以），1411是硬件组在南区的驻点。全体开会和技术讲座等人数相对较多的活动可以使用北区的3604办公室或者南区的7#的会议室，使用之前记得在论坛工作室板块发帖占用办公室。开学之后在办公室的同学务必注意以下几点：</p>
<p>1、<span style="color: rgb(255, 0, 0); ">工作时间（上午8:00-12:00，下午2:00-5:00）</span>请注意形象，并保持办公室的卫生，在办公室请不要穿拖鞋或者过于清凉的穿着，如背心等。</p>
<p>2、常驻办公室的同学每天请保证自己桌上相对干净，若有朋友到办公室来自己本人务必在场。</p>
<p>3、非节假日、节假日的工作时间请勿在办公室玩游戏。（开学了，多花点时间在学习上吧。）</p>
<p>4、禁止带非技术部成员在办公室留宿。</p>
<h2 style="text-align: center; ">网络环境</h2>
<p>办公室网络：32#408-411使用的是学校的电信网络，无线+有线覆盖，无线与有线桥接，处于同一网段，客户机的IP需要手动设置，单IP带宽限制是20Mbps，<span style="color: rgb(255, 0, 0); ">需要使用学校的查成绩、图书馆、在线OA等服务的话请务必将DNS设置成202.101.208.3</span>，或者是在hosts文件中添加一些特殊域名的转向。3604也是使用学校网络，但带宽更低，无线+有线覆盖。1411网络暂时没通，痛了之后估计是铁通（或者叫移动）的光纤。</p>
<p>服务器网络：日新四台服务器现在在原陈老板办公室7#212，由于一些特殊的原因，在服务器所处的交换机上日新可以使用的IP尾数为35、90、95，将IP尾数设置成除此之外的IP将无法上网，为解决VPS上网的问题我用一套ISP路由系统做了一个比较稳定的软路由，新增的VPS需要上网务必将网关改成202.101.208.91。此外95IP全端口被封，这个问题还在解决当中。</p>
<p>&nbsp;</p>
<p><a href="http://holmesian.org/ECJTU_IT_II/">（未完待续&hellip;&hellip;）</a></p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E6%258A%2580%25E6%259C%25AF%25E9%2583%25A8/" rel="tag">技术部</a> , <a href="http://holmesian.org/tags/%25E6%2597%25A5%25E6%2596%25B0/" rel="tag">日新</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/post/712/</link>
<title><![CDATA[明天(8月27日)出四六级成绩]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[生活随笔]]></category>
<pubDate>Thu, 26 Aug 2010 10:01:30 +0000</pubDate> 
<guid>http://holmesian.org/post/712/</guid> 
<description>
<![CDATA[ 
	<p>明天，2010年8月27日，将公布2010年6月大学英语四六级考试成绩。</p>
<p>可登陆 http://9911.ms/9OvA 查询成绩。  印象中上次六级考得还可以，虽然没有任何准备。看结果吧，过没过还不知道&hellip;&hellip; </p>
<p>&nbsp;</p>
<p>&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
<p>&ldquo;教科书培育简单的头脑，所有复杂的背景、复杂的人物、复杂的事件，全部做了简单化处理，先遵循一种必须遵循的规律，再划分一好一坏两个阵营，好的特别好，一尘不染，坏的特别坏，一无是处，然后颂扬好人，鞭挞坏人。</p>
<p>&nbsp;</p>
<p>&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
<p>RT mark @duck_1984 :迟来的暑假档，9月内地电影排片表：9.2 盗梦空间IMAX、9.9 魔法师的学徒、9.15 双重身份、9.16 山楂树之恋+山生、9.21 精武风云、9.29 查理曼大帝的密码+狄仁杰之通天帝国+天降美食IMAX</p>
<p>&nbsp;</p>
<p>&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
<p>&nbsp;</p>
<p>短信增值业务_中国移动通信 的地址彻底被kill了 几个不错的功能全部都没有啦 而且很可能 短信仓库、短信转移、短信签名之类的免费服务开始要收费了&hellip;&hellip; [ @ D F RT ]</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;&mdash;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>之前天天在这附近转悠 1680000块的东东呢&hellip;&hellip; http://okok.org/forum/viewthread.php?tid=169919&amp; ;extra=page%3D1 [ @ D F RT ]</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E5%259B%259B%25E5%2585%25AD%25E7%25BA%25A7/" rel="tag">四六级</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/FreeBSD_Screen/</link>
<title><![CDATA[FreeBSD下使用Screen优化SSH体验]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[转战FreeBSD]]></category>
<pubDate>Thu, 26 Aug 2010 02:46:43 +0000</pubDate> 
<guid>http://holmesian.org/FreeBSD_Screen/</guid> 
<description>
<![CDATA[ 
	<p>因为安全原因一般对服务器的访问都是有非常严格的IP限制的，但是为了方便随时随地的迅速响应我在防火墙上开放了通过手机CMNET网段访问服务器SSH的权限。这么一来由PPC上的PoketPutty直接访问和操作服务器或者是通过手机CMNET带动笔记本访问服务器都要方便很多。<br />
<br />
由于以前在freebsd下使用SSH远程登录时基本上都是良好的网络环境，很少出现非正常中断的现象。但是使用CMNET访问服务器之后，由于CMNET的带宽和不稳定性（瞬时带宽不足或者基站切换都可能会导致导致CMNET连接IP更换）连接非正常中断的概率要大大提高。而如果一旦连接非正常中断，重新连接时，系统将开一个新的session，无法恢复原来的 session，最终将导致服务器系统上遗留了不少失效的Session。<br />
&nbsp;</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>Holmesian&nbsp;pts/0&nbsp;Aug&nbsp;26&nbsp;09:42&nbsp;(117.136.21.200)&nbsp;</span></span></li>
    <li><span>Holmesian&nbsp;pts/1&nbsp;Aug&nbsp;26&nbsp;09:45&nbsp;(117.136.21.219)&nbsp;</span></li>
    <li class="alt"><span>liaux&nbsp;pts/3&nbsp;Aug&nbsp;25&nbsp;12:43&nbsp;(202.101.208.90)&nbsp;</span></li>
    <li><span>Holmesian&nbsp;pts/7&nbsp;Aug&nbsp;26&nbsp;10:17&nbsp;(117.136.21.162:S)&nbsp;</span></li>
    <li class="alt"><span>Holmesian&nbsp;pts/8&nbsp;Aug&nbsp;26&nbsp;10:18&nbsp;(117.136.21.162:S)</span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
Holmesian pts/0 Aug 26 09:42 (117.136.21.200) 
Holmesian pts/1 Aug 26 09:45 (117.136.21.219) 
liaux pts/3 Aug 25 12:43 (202.101.208.90) 
Holmesian pts/7 Aug 26 10:17 (117.136.21.162:S) 
Holmesian pts/8 Aug 26 10:18 (117.136.21.162:S)</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p><br />
<br />
虽然可以通过设置SSH的超时来自动清理这些无效的Seesion，但是无效的Session遗留在系统上总会感觉不爽。这个时候screen命令就华丽丽地登场了：Screen工具是一个终端多路转接器，在本质上，这意味着你能够使用一个单一的终端窗口运行多终端的应用。<br />
<br />
<br />
<br />
通过Screen工具在ssh搞东西时，就不需要以前那样额外多增加一个终端来保持登录状态了。<br />
<br />
通过PORTS安装Screen<br />
# cd /usr/ports/sysutils/screen<br />
# make install clean<br />
<br />
使用简述<br />
# screen<br />
//以下^A表示同按&ldquo;Ctrl + A&rdquo;键<br />
&nbsp;</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>#&nbsp;^A&nbsp;c&nbsp;</span><span class="comment">//Create，开出新的&nbsp;window</span><span></span></span></li>
    <li><span>#&nbsp;^A&nbsp;n&nbsp;<span class="comment">//Next，切换到下个&nbsp;window</span><span></span></span></li>
    <li class="alt"><span>#&nbsp;^A&nbsp;p&nbsp;<span class="comment">//Previous，前一个&nbsp;window</span><span></span></span></li>
    <li><span>#&nbsp;^A&nbsp;^A&nbsp;<span class="comment">//在两个&nbsp;window&nbsp;间切换</span><span></span></span></li>
    <li class="alt"><span>#&nbsp;^A&nbsp;w&nbsp;<span class="comment">//Windows，列出已开启的&nbsp;windows&nbsp;有那些</span><span></span></span></li>
    <li><span>#&nbsp;^A&nbsp;0&hellip;9&nbsp;<span class="comment">//切换到第&nbsp;0..9&nbsp;个&nbsp;window</span><span></span></span></li>
    <li class="alt"><span>#&nbsp;^A&nbsp;t&nbsp;<span class="comment">//Time，显示目前的时间，与系统的&nbsp;load</span><span></span></span></li>
    <li><span>#&nbsp;^A&nbsp;K&nbsp;<span class="comment">//kill&nbsp;window，强制关掉目前的&nbsp;window</span><span></span></span></li>
    <li class="alt"><span>#&nbsp;^A&nbsp;?&nbsp;<span class="comment">//Help，显示简单说明</span><span></span></span></li>
    <li><span>#&nbsp;^A&nbsp;d&nbsp;<span class="comment">//detach，将目前的&nbsp;screen&nbsp;session&nbsp;(可能含有多个&nbsp;windows)&nbsp;丢到背景执行</span></span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
# ^A c //Create，开出新的 window
# ^A n //Next，切换到下个 window
# ^A p //Previous，前一个 window
# ^A ^A //在两个 window 间切换
# ^A w //Windows，列出已开启的 windows 有那些
# ^A 0&hellip;9 //切换到第 0..9 个 window
# ^A t //Time，显示目前的时间，与系统的 load
# ^A K //kill window，强制关掉目前的 window
# ^A ? //Help，显示简单说明
# ^A d //detach，将目前的 screen session (可能含有多个 windows) 丢到背景执行</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p><br />
<br />
<br />
# screen -ls //显示所有的 screen sessions<br />
# screen -r [keyword] //选择一个 screen session 回来 (捡回来) , 恢复离线的screen作业, 单独输入 screen -r 也行的，通过这个功能就可以捡回之前断线的Session<br />
<br />
&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/ssh/" rel="tag">ssh</a> , <a href="http://holmesian.org/tags/freebsd/" rel="tag">freebsd</a> , <a href="http://holmesian.org/tags/screen/" rel="tag">screen</a> , <a href="http://holmesian.org/tags/%25E4%25BD%2593%25E9%25AA%258C/" rel="tag">体验</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Nginx_resolver/</link>
<title><![CDATA[Nginx出现“no resolver defined to resolve xxx.xxx”的解决办法]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Wed, 25 Aug 2010 02:31:51 +0000</pubDate> 
<guid>http://holmesian.org/Nginx_resolver/</guid> 
<description>
<![CDATA[ 
	<p>在Ngnix中如果用变量作为反向代理的地址时，容易出现&ldquo;no resolver defined to resolve xxx.xxx&rdquo;的问题，例如：</p>
<p><br />
&nbsp;</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>server</span></span></li>
    <li><span>&nbsp;{</span></li>
    <li class="alt"><span>&nbsp;listen&nbsp;80;</span></li>
    <li><span>&nbsp;server_name&nbsp;~^(.*).lib.ecjtu.net$;</span></li>
    <li class="alt"><span>&nbsp;access_log&nbsp;/<span class="keyword">var</span><span>/log/nginx/access-lib_ecjtu.log;</span></span></li>
    <li><span>&nbsp;set&nbsp;<span class="vars">$key</span><span>&nbsp;</span><span class="vars">$1</span><span>;</span></span></li>
    <li class="alt"><span>&nbsp;location&nbsp;/{</span></li>
    <li><span>&nbsp;auth_basic&nbsp;<span class="string">&quot;What's&nbsp;your&nbsp;password?&quot;</span><span>;</span></span></li>
    <li class="alt"><span>&nbsp;auth_basic_user_file&nbsp;/www/lib_ecjtu_net/htpasswd;</span></li>
    <li><span>&nbsp;proxy_pass&nbsp;http:<span class="comment">//$key;</span><span></span></span></li>
    <li class="alt"><span>&nbsp;}</span></li>
    <li><span>&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
server
 {
 listen 80;
 server_name ~^(.*).lib.ecjtu.net$;
 access_log /var/log/nginx/access-lib_ecjtu.log;
 set $key $1;
 location /{
 auth_basic &quot;What's your password?&quot;;
 auth_basic_user_file /www/lib_ecjtu_net/htpasswd;
 proxy_pass http://$key;
 }
 }		</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p><br />
<br />
&nbsp;</p>
<p>以上配置的作用是将泛解析到服务器的***.lib.ecjtu.net访问呢的***部分存入变量$key并用于反向代理的地址，换言之如果我使用www.holmesian.org.lib.ecjtu.net访问的话就是通过服务器反向代理访问我的Blog。</p>
<p>但是如果是这样将变量作为反向代理的地址的话会在Nginx0.6.18以后的版本中都会提示&ldquo; no resolver defined to resolve &rdquo;的类似错误，而在proxy_pass 中直接设置地址却不会。</p>
<p>原因是Nginx0.6.18以后的版本中启用了一个resolver指令，在使用变量来构造某个server地址的时候一定要用resolver指令来制定DNS服务器的地址，所以解决这个问题的方法很简单：</p>
<p>在nginx的配置文件中的http{}部分添加一行resolver 8.8.8.8;即可</p>
<p><br />
&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/resolver/" rel="tag">resolver</a> , <a href="http://holmesian.org/tags/nginx/" rel="tag">nginx</a> , <a href="http://holmesian.org/tags/defined/" rel="tag">defined</a> , <a href="http://holmesian.org/tags/%25E6%258F%2590%25E7%25A4%25BA/" rel="tag">提示</a> , <a href="http://holmesian.org/tags/%25E5%258A%259E%25E6%25B3%2595/" rel="tag">办法</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Summer_End/</link>
<title><![CDATA[暑假即将结束]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[生活随笔]]></category>
<pubDate>Tue, 24 Aug 2010 04:49:48 +0000</pubDate> 
<guid>http://holmesian.org/Summer_End/</guid> 
<description>
<![CDATA[ 
	<p>回到学校的TX越来越多，一小撮人独霸学校的日子即将结束&hellip;&hellip;<br />
<br />
近来发觉越来越自己越来越有&ldquo;返璞归真&rdquo;的倾向，重操起了中学时代那种不愿近人不愿交流的思想，直到前几天在S.H的同事面前爆发才知道现在已经不是中学时代有太多的事情是不得不做的。<br />
<br />
都是些个人碎碎念，赶时间的TX就别耽误时间了<br />
<br />
<br />
前几天老想着给服务器调优调优，给服务器做了N多设置但是因为整台服务器的性能瓶颈并不在这里，而且就目前ECJTU全站的流量还远远不能够达到服务器的硬件瓶颈，所以外部看来并不会有多大的变化，但是相对而言整台服务器要比之前耐抗耐打击多了多了。无论如何，每天花上几个小时做些设置工作也让自己对一些之前不是太扎实的基础部分有了更多更深刻的了解，也打破了之前的一些疑惑与错误的理念：比如说ESXi的资源分配设置并不是想象中必须的，kernel提示内存不足和分页数不足是确实是因为日志轮转导致的；ESXi中除非必要使用多核心，否则使用单核心的效果小更好而且更省内存（平均每减少一个核心可以节省将近100MB的内存）；之前分配三个虚拟硬盘中两个独立的做法会给客户机做快照带来一些不便，因为存在独立于快照的虚拟硬盘所以做快照的时候不能快照内存，所以必须无论是制作或者读取快照都必须在关机状态下，强行读取开机状态下制作的快照相当于对工作中的客户机断电，对数据盘的危害相当大&hellip;&hellip;<br />
<br />
写着写着就写成技术总结了&hellip;&hellip;F.T.，老想着在走之前多做一点，把一切都考虑完善一些，能优化的都尽量做免维护脚本，能监控的地方都监控了&hellip;&hellip;但是这么工作貌似就没法停止，就像PORTS几乎每天都更新一样，想法和认知也是一天天更新的。所以还是&ldquo;合适就是最好的吧&rdquo;。<br />
<br />
<br />
每天都是李永乐李正元的数学、徐绽的英语词汇、还有那万恶的钢结构。上周在学校偶遇WY学姐和ZZD，不得不感叹他们的状态真好，当然还有汤YG他们，现在都快无敌了吧。   想着自己的目标和现在的实力  压力丛生&hellip;&hellip;<br />
<br />
也不知道选择考研这条路究竟结果会如何，天朝的体制和现实让我看不到这条路上比较靠谱的道标，一些自身的束缚又让我不能像其他人那样去IT的圈子里追逐。总之现在既然选择了就要坚持努力下去，每次听到S.H说没有安全感的时候其实我自己何尝不是缺乏&ldquo;安全感&rdquo;的人呢。<br />
<br />
当年博客出现的时候对上一代的信息传播方式是何其的冲击，就像现在微博对博客的冲击一样。但是虽然迷了一段时间的<a href="http://tiwtter.com/sholmesian" target="_blank">Twitter</a>，但是现在回来还是感觉博客更靠谱，过载的信息和缺失的思考的背后依旧是不少人空虚的慰藉。老老实实学点东西，踏踏实实做点东西才是王道，信息什么的总归是别人的。<br />
<br />
嗯，对了今天是鬼节。<br />
<br />
&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E6%259A%2591%25E5%2581%2587/" rel="tag">暑假</a> , <a href="http://holmesian.org/tags/%25E7%25BB%2593%25E6%259D%259F/" rel="tag">结束</a> , <a href="http://holmesian.org/tags/%25E9%25AC%25BC%25E8%258A%2582/" rel="tag">鬼节</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/PORTS_FreeBSD/</link>
<title><![CDATA[升级PORTS以及通过PORTS升级已安装的软件]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[转战FreeBSD]]></category>
<pubDate>Sun, 22 Aug 2010 14:31:07 +0000</pubDate> 
<guid>http://holmesian.org/PORTS_FreeBSD/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;升级ports用portsnap(CVSUP已成历史)</p>
<blockquote>
<p>portsnap fetch update &nbsp;升级PORTS &nbsp; &nbsp;#如果是第一次使用portsnap来升级，则输入：portsnap fetch extract</p>
</blockquote>
<p>通过portmaster升级FreeBSD下所有已安装软件相当方便 (portupgrade已成历史)</p>
<blockquote>
<p>安装好portmaster之后运行/usr/local/sbin/portmaster -Da即可</p>
</blockquote>
<p>&nbsp;</p>
<p>不过需要注意的是看看是不是所有的软件都需要升级，是不是都合适升级。一般来说没有多大的问题</p>
<p>&nbsp;</p>
<p>此外上次提到一个open_basedir不能与PHP一些参数共存的问题找到一个解决方法，因为是Nginx+FastCGI+Apache的环境</p>
<p>把不能打开Open_basedir的PHP程序放在Apache下跑，在php.ini中注释掉open_basedir部分</p>
<p>再在启动FastCGI的后添加<span class="Apple-style-span" style="font-family: sans-serif; font-size: medium; border-collapse: collapse; color: rgb(17, 17, 17); -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">-d open_basedir=/www:/tmp:/var/tmp:/usr/home，如下：</span></p>
<blockquote>
<p><span class="Apple-style-span" style="font-family: sans-serif; font-size: medium; border-collapse: collapse; color: rgb(17, 17, 17); -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">/usr/local/bin/spawn-fcgi -a 127.0.0.1 -p 139 -u www -C 20 -f &quot;/usr/local/bin/php-cgi -d open_basedir=/www:/tmp:/var/tmp:/usr/home&quot;</span></p>
</blockquote>
<p>这样在Nginx+FastCGI下跑的程序就会受到open_basedir的限制，而Apache下跑的PHP不受此限制。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/ports/" rel="tag">ports</a> , <a href="http://holmesian.org/tags/%25E8%25BD%25AF%25E4%25BB%25B6/" rel="tag">软件</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/FreeBSD_SNMP_MRTG/</link>
<title><![CDATA[FreeBSD8下Nginx+SNMP+MRTG监控服务器网络]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[转战FreeBSD]]></category>
<pubDate>Sat, 21 Aug 2010 11:46:52 +0000</pubDate> 
<guid>http://holmesian.org/FreeBSD_SNMP_MRTG/</guid> 
<description>
<![CDATA[ 
	<p>FREEBSD8上安装nginx+snmp+mrtg还是比较简单的，因为有PORTS的帮助让很多工作都简化了。但是网络上的教程要么太老，要么显得安装过程过于顺利，下面贴出我的安装过程供需要的TX参考。</p>
<p>Nginx的安装就不再赘述了，最终用到Nginx的地方只是将所有的监测结果展示出来，相当于在Nginx下添加一个新的虚拟主机而已。</p>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2><span style="background-color: lime; ">首先安装SNMP</span></h2>
<p>通过PORTS安装</p>
<p>&nbsp;</p>
<div class="run">
<p>&nbsp;</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">cd /usr/ports/net-mgmt/net-snmp</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">make install</p>
</blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">装好后在/etc/rc.conf中添加如下内容，使得开机启动SNMP服务</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">snmpd_enable=&quot;YES&quot;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">snmpd_flags=&quot;-a &quot;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">snmpd_pidfile=&quot;/var/run/snmpd.pid&quot;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">snmptrapd_enable=&quot;YES&quot;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">snmptrapd_flags=&quot;-a -p /var/run/snmptrapd.pid&quot;</p>
</blockquote>
<p>&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">用你擅长的文本编辑器修改文件/usr/local/share/snmp/snmpd.conf 添加以下内容（如果没有就新建，<span style="background-color: rgb(255, 0, 0); ">非常重要！</span>）</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">rocommunity public</p>
</blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">这是为了让SNMP能够通过public用户进行读取相应的信息，确认添加完毕后启动服务/usr/local/etc/rc.d/snmpd start</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">到这里SNMP就简单的安装完成了，SNMP是监控系统的最基本支持，如果SNMP没有安装好那么更高层的MRTG、Nagios等等软件就不能够通过SNMP来获取相应的系统信息，也就达不到监控的目的了。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<h2><span style="background-color: lime; ">安装MRTG</span></h2>
<p>依旧是通过PORTS安装</p>
<p>&nbsp;</p>
<blockquote>
<p>cd /usr/ports/net-mgmt/mrtg</p>
<p>make install</p>
</blockquote>
<p>&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">安装好了之后先建立一个用来存放信息文件生成的目录，也就是要在Nginx下新添加的虚拟主机的根目录，我这里新建的是是/www/mrtg。在Nginx的配置文件中添加如下内容：（红色部分就是以后你访问监控状态的域名）</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">server</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">{</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">listen 80;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">server_name <span style="color: rgb(255, 0, 0); ">info.net</span>;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">access_log  /var/log/nginx/access-info_net.log;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">location /{</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">root /www/mrtg;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">index index.html;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">}</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">}</p>
</blockquote>
<p>&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">保存之后运行Nginx -s reload重新加载配置。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">至此，MRTG的安装和Nginx的配置就完成了，现在我们开始来配置MRTG：</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">首先cd到MRTG的配置目录/usr/local/etc/mrtg，用以下命令新建一个配置文件(红色部分可以改成你服务器相应的IP)</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">cfgmaker public@<span style="color: rgb(255, 0, 0); ">127.0.0.1</span> &gt; mrtg.cfg</p>
</blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">这里public是访问SNMP的用户名，如果是照我前面的rocommunity public的话就是public，如果改了的话就是你设置的用户名；127.0.0.1是你本机的地址，可以用域名，但推荐使用一个固定IP，好处你用多了就知道了；mrtg.cfg是生成配置保存的文件</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">注意：<span style="background-color: rgb(255, 0, 0); ">如果你的SNMP配置正常的话，那么创建新配置文件的过程是不会报错的</span>，如果出现了错误请根据提示修改你的语句尤其是SNMP的配置。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">如果你成功地生成了mrtg.cfg，那么恭喜到目前为止你的配置没有任何问题，不过别着急，再在mrtg.cfg中添加一下如下内容：</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">LoadMIBs: /usr/local/share/snmp/mibs/UCD-SNMP-MIB.txt</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">WorkDir: /www/mrtg</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">Language: chinese</p>
</blockquote>
<p>&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">LoadMIBs不解释，WorkDir就是之前设置Nginx虚拟机主机的目录，Language改成中文是让监控结果以中文显示。当然还有不少网友在mrtg.cfg中添加更多的内容来强大监控的功能（比如CPU、磁盘、进程、uptime等等），就我的理解：如果把SNMP+MRTG看作是一个PHP+MySQL程序的话，mrtg.cfg相当于一个模板，MRTG是一整套模板引擎，SNMP就是MySQL数据库。MRTG通过解析mrfg.cfg调用SNMP数据生成相应的前台页面展现出来。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">废话不多说，接下来生成首页：</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">indexmaker --title &quot;Ecjtu.net&quot; --output=/www/mrtg/index.html mrtg.cfg</p>
</blockquote>
<p>&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">--title后面的tittle的内容，--output=的值是生成的目录所在位置，mrtg.cfg就是刚才生成并修改过的配置文件了。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">接下来测试一下生成适时数据：</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">/usr/local/bin/mrtg  /usr/local/etc/mrtg/mrtg.cfg</p>
</blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">实际上每次执行这个命令都是MRTG从SNMP中读取一次数据并将数据组织到工作目录中。貌似因为权限的问题，这个命令执行的前三次都会报错，执行第四次之后如果不会再报错了就恭喜你，MRTG配置完成。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">最后将生成实时数据的命令放在crontab里去，每隔五分钟运行一次。在/etc/crontab中添加</p>
<blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">*/5 * * * * root /usr/local/bin/mrtg /usr/local/etc/mrtg/mrtg.cfg</p>
</blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">至此FreeBSD8下Nginx+SNMP+MRTG监控服务就配置完成了。</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">打开配置好的虚拟主机就可以看到相应的图表了&hellip;&hellip;<img alt="" src="attachment.php?fid=150" /></p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p>&nbsp;</p>
</div>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E7%25BD%2591%25E7%25BB%259C/" rel="tag">网络</a> , <a href="http://holmesian.org/tags/snmp/" rel="tag">snmp</a> , <a href="http://holmesian.org/tags/freebsd/" rel="tag">freebsd</a> , <a href="http://holmesian.org/tags/%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8/" rel="tag">服务器</a> , <a href="http://holmesian.org/tags/mrtg/" rel="tag">mrtg</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/PHP_IPF_SYSLOG/</link>
<title><![CDATA[总结几个这几天解决的问题（与PHP、IPF、日志轮转相关）]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Thu, 19 Aug 2010 13:40:43 +0000</pubDate> 
<guid>http://holmesian.org/PHP_IPF_SYSLOG/</guid> 
<description>
<![CDATA[ 
	<p>首先是关于PHP在PHP 5.2以上启用safe_mode or an open_basedir会导致CURLOPT_FOLLOWLOCATION失败，再导致curl_setopt/curl_setopt_array失败。</p>
<p>官方对此有声明如下：</p>
<blockquote>
<p>Starting in PHP 5.2.0, CURLOPT_FOLLOWLOCATION can't be set via curl_setopt_array() (or curl_setopt()) when either safe_mode is enabled or open_basedir is set.  In these cases, the order of CURLOPT_* settings in the array can be important.</p>
</blockquote>
<p><br style="word-wrap: break-word; line-height: normal; " />
1.CURLOPT_FOLLOWLOCATION<br style="word-wrap: break-word; line-height: normal; " />
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set<br style="word-wrap: break-word; line-height: normal; " />
2.curl_setopt_array()<br style="word-wrap: break-word; line-height: normal; " />
如果curl_setopt_array中包含CURLOPT_FOLLOWLOCATION键值，会导致所有options设置失败，让你感觉curl_setopt_array有问题，其实这个函数本身是没问题的。</p>
<p></p>
<p>对此我尝试用这种方法：</p>
<p>在php.ini中设置open_basedir或者safe_mode,再在Apache（或者Nginx的FastCGI）中&lt;Directory&gt;、&lt;VirtualHost&gt;设置 php_admin_value open_basedir Off。结果是相应的虚拟主机整个PHP跑不了了，不知道为何。</p>
<p>所以目前来看<span style="color: rgb(0, 0, 255); ">对于需要使用curl_setopt_array()的环境应该就不能打开safe_mode和设置open_basedir值了。</span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>第二个是关于ipf的IPF.conf设置的。</p>
<p>网上看似有不少关于ipf的文档，包括man ipf看上去也把ipf的设置讲解得十分的详细，但是实际上有一些非常细节的内容让人相当纠结。可能是由于我从一开始在概念上的理解就存在问题，在此总结一下；首先看我之前一直在用的一个ipf.conf规则</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>#&nbsp;allow&nbsp;22</span></span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;in&nbsp;quick&nbsp;from&nbsp;any&nbsp;to&nbsp;202.101.208.35&nbsp;mask&nbsp;255.255.255.255&nbsp;port&nbsp;=&nbsp;22</span></li>
    <li><span></span></li>
    <li class="alt"><span>#&nbsp;allow&nbsp;80</span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;in&nbsp;quick&nbsp;from&nbsp;any&nbsp;to&nbsp;202.101.208.35&nbsp;mask&nbsp;255.255.255.255&nbsp;port&nbsp;=&nbsp;80</span></li>
    <li><span></span></li>
    <li class="alt"><span>#&nbsp;Allow&nbsp;443</span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;in&nbsp;quick&nbsp;from&nbsp;any&nbsp;to&nbsp;202.101.208.35&nbsp;mask&nbsp;255.255.255.255&nbsp;port&nbsp;=&nbsp;443</span></li>
    <li><span></span></li>
    <li class="alt"><span>#&nbsp;Out&nbsp;going</span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;out&nbsp;all</span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
# allow 22

pass in quick from any to 202.101.208.35 mask 255.255.255.255 port = 22

# allow 80

pass in quick from any to 202.101.208.35 mask 255.255.255.255 port = 80

# Allow 443

pass in quick from any to 202.101.208.35 mask 255.255.255.255 port = 443

# Out going

pass out all</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p>&nbsp;</p>
<blockquote> </blockquote>
<div>该规则的本意是开放主机的22端口、80端口、443端口的入站连接，允许主机的所有出站数据连接。乍看上去没有问题，ipf -Fa -f ipf.conf也提示没有语法错误，运行起来一段时间也没有问题。但是过了一段时间之后就会出现一些非常纠结的问题：间歇性地访问动态内容(比如经过rewrite的PHP文件访问，其他动态文件访问)的时候客户端反应奇慢，但是最终还是会访问成功，而如果是访问纯静态内容（html页面、css文件、图片文件等）就非常的快；在服务器上ping其他域名的时候时而可以成功，时而不能成功，同一个域名这一秒用nslookup可以查询到下一秒就不一定可以查询到了。</div>
<div>后来将规则改成这样：</div>
<div>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<div class="HighLighter" contenteditable="false">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>#&nbsp;allow&nbsp;22</span></span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;in&nbsp;quick&nbsp;from&nbsp;any&nbsp;to&nbsp;202.101.208.35&nbsp;mask&nbsp;255.255.255.255&nbsp;port&nbsp;=&nbsp;22&nbsp;keep&nbsp;state</span></li>
    <li><span></span></li>
    <li class="alt"><span>#&nbsp;allow&nbsp;80</span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;in&nbsp;quick&nbsp;from&nbsp;any&nbsp;to&nbsp;202.101.208.35&nbsp;mask&nbsp;255.255.255.255&nbsp;port&nbsp;=&nbsp;80&nbsp;keep&nbsp;state</span></li>
    <li><span></span></li>
    <li class="alt"><span>#&nbsp;Allow&nbsp;443</span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;in&nbsp;quick&nbsp;from&nbsp;any&nbsp;to&nbsp;202.101.208.35&nbsp;mask&nbsp;255.255.255.255&nbsp;port&nbsp;=&nbsp;443&nbsp;keep&nbsp;state</span></li>
    <li><span></span></li>
    <li class="alt"><span>#&nbsp;Out&nbsp;going</span></li>
    <li><span></span></li>
    <li class="alt"><span>pass&nbsp;out&nbsp;all&nbsp;keep&nbsp;state</span></li>
</ol>
</div>
<div contenteditable="false" class="php" style="display:none">
<pre>
# allow 22

pass in quick from any to 202.101.208.35 mask 255.255.255.255 port = 22 keep state

# allow 80

pass in quick from any to 202.101.208.35 mask 255.255.255.255 port = 80 keep state

# Allow 443

pass in quick from any to 202.101.208.35 mask 255.255.255.255 port = 443 keep state

# Out going

pass out all keep state</pre>
</div>
<div contenteditable="false">
<link href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" type="text/css" rel="stylesheet" /></div>
</div>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<blockquote> </blockquote>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">即在每条规则后面添加keep state问题就解决了&hellip;&hellip;   一开始老认为都pass out all了，干嘛还要特别在in的部分申明keep state&hellip;&hellip;现在才终于知道为什么</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">接下来这个是关于日志轮转的&hellip;&hellip;用/etc/newsyslog.conf的设置来定期切割过大的日志，这个问题相当尴尬：由于需要轮转的日志有一定数量，所以添加的时候有些偷懒，基本上都是写好一条规则其他大部分都是照着一条复制只改前面的部分，/var/log/nginx/access-web_net.log      600  4  *        $W0D23 JC，结果问题就出在这个$W0D23上，有些好多个几百MB上几GB的日志文件同时在一个时刻开始切割&hellip;&hellip;导致的后果是硬盘I/O达到瓶颈，Kernel提示错误也就不用说了&hellip;&hellip;。解决方法自然是岔开较大日志文件的切割轮转时间&hellip;&hellip;</p>
<div>&nbsp;</div>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
<p style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 1.1em; margin-left: 0px; ">&nbsp;</p>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/ipf/" rel="tag">ipf</a> , <a href="http://holmesian.org/tags/%25E6%2597%25A5%25E5%25BF%2597/" rel="tag">日志</a> , <a href="http://holmesian.org/tags/php/" rel="tag">php</a> , <a href="http://holmesian.org/tags/%25E8%25BD%25AE%25E8%25BD%25AC/" rel="tag">轮转</a> , <a href="http://holmesian.org/tags/%25E8%25A7%25A3%25E5%2586%25B3/" rel="tag">解决</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/FreeBSD8_Install/</link>
<title><![CDATA[FreeBSD8.1安装笔记]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[转战FreeBSD]]></category>
<pubDate>Mon, 02 Aug 2010 09:04:27 +0000</pubDate> 
<guid>http://holmesian.org/FreeBSD8_Install/</guid> 
<description>
<![CDATA[ 
	<p>这是之前给35服务器装完ESXi之后给虚拟机安装FreeBSD8的过程，整理一下放到这里存档吧。</p>
<p>分区划分（对/和/var有较大的冗余，因为/usr/home、/var/log都已经独立出来，所以16G的根分区显得非常多）：</p>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">Filesystem     Size    Used   Avail Capacity  Mounted on</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da0s1a     16G    2.7G     12G    19%    /</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da0s1d    4.7G     10M    4.3G     0%    /var</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da1s1g     40G     20G     16G    56%    /data</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da1s1d     29G     17G    9.6G    64%    /usr/home</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da1s1e     28G    610M     26G     2%    /var/log</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da1s1f     58G     27G     26G    51%    /www</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/dev/da2s1d     71G    345M     65G     1%    /backup</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装的FB8.1虚拟机使用了三块虚拟硬盘：da0纯安装系统和软件，受快照系统影响；da1和da2是日常数据和备份数据，都为独立属性不受快照系统影响。出任何系统问题只需要恢复系统快照即可恢复网站访问。/www中存放网站程序文件以及附件，/data 中存放MySQL数据，/var/log中存放所有日志文件，/usr/home存放用户数据，/backup为备份内容。</span></p>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"></span></p>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;">&nbsp;</p>
<hr />
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;">补发一些当时重装FreeBSD8.1的笔记。</p>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;">先最小化安装FreeBSD8</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">再由FreeBSD8.1通过PORTS安装Apache、Nginx、PHP、MySQL、Memcache等软件</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">下载Ports  </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">portsnap fetch</span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">更新Ports  </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">portsnap update</span></p>
</blockquote>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;">&nbsp;</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">更改当前用户使用的Shell </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'arial, sans-serif'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">chsh命令永久的将你的</span><span style="color: rgb(0, 0, 0); font-style: italic; font-size: 10pt; font-family: 'arial, sans-serif'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">shell换</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'arial, sans-serif'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">为tcsh</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">改用bash: chsh -s /usr/local/bin/bash</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">复原csh：chsh -s /bin/csh</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">一个tcsh配置文件示例 </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">alias h history 25</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">alias ls ls -FG</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">umask 22</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin /usr/X11R6/bin $HOME/bin)</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set prompt='%B%n%b@%U%m%u %S%/%s %#'</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set prompt2='%R?'</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set prompt3='CORRECT&gt; %B%R%b (y&#124;n&#124;e)?'</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set autolist</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set history=2048</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">set savehist = 2048 merge</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">setenv LANG en_US.ISO8859-1</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">setenv LC_ALL en_US.ISO8859-1</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">setenv EDITOR vi</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">setenv PAGER more</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">setenv BLOCKSIZE K</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">设置SSHD </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/etc/ssh/sshd_config </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">UseDNS no </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">Protocol 2 </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 0pt; margin-top: 0pt;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">Port 2</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span></p>
</blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装axel </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/ftp/axel/</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">修改/etc/make.conf (找不到这个文件，就新建) ，加入以下内容换成多线程下载</span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">FETCH_CMD=axel </span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">FETCH_BEFORE_ARGS= -n 5 -a </span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">FETCH_AFTER_ARGS= </span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 7.5pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">DISABLE_SIZE=yes</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装sudo </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/security/sudo</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">sudo的配置文件在/usr/local/etc/sudoers里面。sudo的配置文件不应直接编辑，而应使用 visudo 来进行修改</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">%wheel ALL=(ALL) ALL</span><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">这个命令指定了wheel这个组的所有者可以使用全部的权限。</span><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">Defaults:M-gtuiw     timestamp_timeout=0, runaspw, passwd_tries=1</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(51, 51, 51); font-size: 7.5pt; font-family: 'verdana, arial, tahoma'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">这个命令设置密码在一段时间后自动退出</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装Apache</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/www/apache22 </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(51, 51, 51); font-size: 10pt; font-family: 'song, verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cd /usr/src/sys/modules/accf_data;make clean;make;make install;make clean;kldload accf_data</span><span style="color: rgb(51, 51, 51); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">   （解决可能出现的内核模块问题）</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'song, verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cd /usr/src/sys/modules/accf_http;make clean;make;make install;make clean;kldload accf_http</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">   </span><span style="color: rgb(51, 51, 51); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">（解决可能出现的内核模块问题）</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">echo 'apache22_enable =&quot;YES&quot;' &gt;&gt; /etc/rc.conf</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt;">echo 'accf_http_load=&quot;YES&quot;' &gt;&gt; /boot/loader.conf</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">  </span><span style="color: rgb(51, 51, 51); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">（解决可能出现的内核模块问题）</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装PHP52</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/lang/php52 </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">echo 'AddType application/x-httpd-php .php' &gt;&gt; /usr/local/etc/apache22/httpd.conf</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt;">修改php.ini</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">open_basedir = /www:/tmp</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">disable_functions =passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsock</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">open,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">display_errors = Off</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">output_buffering = On </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: '宋体'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">php</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: '宋体'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">扩展模块以及安装</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Verdana'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/lang/php52-extensions </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cd /usr/ports/www/eaccelerator</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">make install clean</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">在php.ini中添加</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">zend_extension=&quot;/usr/local/lib/php/extensions/no-debug-non-zts-</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">20060613/eaccelerator.so&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.shm_size=&quot;32&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.cache_dir=&quot;/data/cache/ea&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.enable=&quot;1&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.optimizer=&quot;1&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.check_mtime=&quot;1&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.debug=&quot;0&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.filter=&quot;&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.shm_max=&quot;0&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.shm_ttl=&quot;0&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.shm_prune_period=&quot;0&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.shm_only=&quot;0&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.compress=&quot;1&quot;</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; background: none repeat scroll 0% 0% rgb(255, 255, 255);">eaccelerator.compress_level=&quot;9&quot; </span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装MySQL</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/databases/mysql50-server/</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">make WITH_XCHARSET=all </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cp /usr/local/share/mysql/my-small.cnf /etc/my.cnf </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/local/bin/mysql_install_db --user=mysql </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">chown -R mysql:mysql /var/db/mysql/</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/local/bin/mysqld_safe -u mysql &amp;</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">mysqladmin -u root password tobethepassword</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">   （修改密码）<br />
</span><span style="color: rgb(17, 0, 0); font-size: 10pt; font-family: 'Courier New'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">echo 'mysql_enable=&quot;YES&quot;' &gt;&gt; /etc/rc.conf</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装ProFTPD</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装webmin</span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装CVSUP</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/net/cvsup</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ee /usr/share/examples/cvsup/stable-supfile </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">更新src 一些更新服务器地址</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cvsup.freebsdchina.org  </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cvsup2.freebsdchina.org  </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cvsup3.freebsdchina.org  </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cvsup.scivoid.com  </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cvsup.cn.freebsd.org</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">更新源码：  cvsup -g -L 2  /usr/share/examples/cvsup/stable-supfile </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<br />
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">内核配置文件中添加IPF支持  重新编译内核 </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">options IPFILTER </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">options IPFILTER_LOG </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">options IPFILTER_DEFAULT_BLOCK </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">rc.conf中添加 </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ipfilter_enable=&quot;YES&quot; </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ipfilter_rules=&quot;/etc/ipf/ipf.conf&quot; </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ipmon_enable=&quot;YES&quot; </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ipmon_flags=&quot;-Ds&quot;   </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ipnat_enable=&quot;YES&quot; </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">ipnat_rules=&quot;/etc/ipf/ipnat.conf&quot; </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><br />
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装memcache</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">cd /usr/ports/databases/pecl-memcache</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><br />
</span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">make install clean</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">安装Squid 并选择  </span><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'verdana, 宋体'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">[X] SQUID_PF Enable transparent proxying with PF</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'verdana, 宋体'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">/usr/ports/www/squid </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
</blockquote>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p><br />
</o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">差不多到这里需要安装的软件全部装完了，这个时候推荐对/www执行一下</span></p>
<blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">find ./ -type f -print0 &#124; xargs -0 chmod u-x,g-x,o-x</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
</blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">这样就可以去除掉所有网站文件的执行权限，并且可以依照情况去除所有网站目录的r权限，这样即使被取得webshell别人也不能对相应的目录进行列表。（推荐将不需要写入的文件夹的写入权限去除，不需要写入的网站文件夹给x权限，需要写入的网站文件夹给wx权限）</span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;">&nbsp;</p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">至于</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'verdana, arial, helvetica, 宋体, sans-serif'; background: none repeat scroll 0% 0% rgb(255, 255, 255);">通过修改/etc/sysctl.conf</span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"> </span><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p>和</o:p></span><span style="font-size: 12pt; font-family: 'verdana, arial, helvetica, 宋体, sans-serif';">/boot/loader.conf文件调优，实际效果并不明显，但多少还是有些效果的。 不过网上一份流传得很广的sysctl.conf文件是有问题的，连FB的大大都专门逐条解释了相应的错误，下一页贴上我现在用的sysctl.conf文件。</span></p>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="font-size: 12pt; font-family: 'verdana, arial, helvetica, 宋体, sans-serif';"></span></p>
<p>&nbsp;</p>
<p>相应的意义可以在网上搜索一下</p>
<blockquote>
<p># $FreeBSD: src/etc/sysctl.conf,v 1.8.34.1.2.1 2009/10/25 01:10:29 kensmith Exp $<br />
#<br />
#  This file is read when going to multi-user and its contents piped thru<br />
#  ``sysctl'' to adjust kernel values.  ``man 5 sysctl.conf'' for details.<br />
#<br />
<br />
# Uncomment this to prevent users from seeing information about processes that<br />
# are being run under another UID.<br />
#security.bsd.see_other_uids=0<br />
net.inet.ip.sourceroute=0<br />
net.inet.ip.accept_sourceroute=0<br />
kern.ipc.nmbclusters=32768<br />
net.inet.tcp.drop_synfin=1<br />
kern.maxvnodes=8446<br />
<br />
security.bsd.see_other_uids=0 <br />
kern.ipc.maxsockbuf=262144 <br />
net.inet.icmp.drop_redirect=1 <br />
net.inet.icmp.log_redirect=1 <br />
net.inet.ip.redirect=0 <br />
net.inet.icmp.icmplim=200 <br />
net.inet.icmp.icmplim_output=0 <br />
net.inet.tcp.always_keepalive=1 <br />
net.inet.tcp.msl=2000<br />
net.inet.tcp.blackhole=2 <br />
kern.ipc.somaxconn=1024 <br />
kern.coredump=0 </p>
</blockquote>
<p>其实IPF配置也是一个大头内容，临时写了一个配置文件，非常简单的内容。需要的可以参考一下，放在下页</p>
<p></p>
<p>&nbsp;</p>
<blockquote>
<p>默认只开80和443端口</p>
<p># allow 21<br />
#pass in quick from any to 202.101.208.xx mask 255.255.255.255 port = 21<br />
# allow 22<br />
#pass in quick from any to 202.101.208.xx mask 255.255.255.255 port = 22<br />
# allow 80<br />
pass in quick from any to 202.101.208.xx mask 255.255.255.255 port = 80<br />
# Allow 443<br />
pass in quick from any to 202.101.208.xx mask 255.255.255.255 port = 443<br />
# FTP PASV<br />
pass in quick from any to 202.101.208.xx mask 255.255.255.255 port 2000 &gt;&lt; 2030<br />
# Allow 8081<br />
#pass in quick from any to 202.101.208.xx mask 255.255.255.255 port = 8081<br />
# Allow ECJTU<br />
pass in quick from 202.101.208.aa mask 255.255.255.255 to 202.101.208.xx mask 255.255.255.255<br />
# Allow ECJTU2<br />
pass in quick from 172.16.86.0 mask 255.255.255.0 to 202.101.208.xx mask 255.255.255.255<br />
<br />
#pass in all<br />
<br />
# Out going<br />
pass out quick from 202.101.208.xx mask 255.255.255.255 to any keep state<br />
pass out all<br />
<br />
# ################################################################ <br />
# Loopback Interface <br />
# ################################################################ <br />
# ---------------------------------------------------------------- <br />
# Allow everything to/from your loopback interface so you <br />
# can ping yourself (e.g. ping localhost) <br />
# ---------------------------------------------------------------- <br />
pass in quick on lo0 all<br />
pass out quick on lo0 all<br />
<br />
# ################################################################ <br />
# Inside Interface <br />
# ################################################################ <br />
# ---------------------------------------------------------------- <br />
# Allow out all TCP, UDP, and ICMP traffic &amp; keep state <br />
# ---------------------------------------------------------------- <br />
# pass out quick on le0 all head 1<br />
# pass out quick on le0 proto tcp from any to any keep state group 1<br />
# pass out quick on le0 proto udp from any to any keep state group 1<br />
# pass out quick on le0 proto icmp from any to any keep state group 1<br />
<br />
########################################################################<br />
#Allow in all TCP , UDP and ICMP traffic &amp; keep state<br />
########################################################################<br />
#pass in quick on le0 proto tcp from any to any keep state<br />
#pass in quick on le0 proto udp from any to any keep state<br />
pass in quick on le0 proto icmp from any to any keep state</p>
</blockquote>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>再来一个内核配置文件好了  同样在下页</p>
<p></p>
<p>&nbsp;</p>
<div style="page-break-after: always;"><span style="display: none;"> </span></div>
<p>&nbsp;</p>
<blockquote>
<pre>
只有需要的硬件和支持


cpu		I686_CPU
ident		Holmesian

#Holmesian add this to make the kernel better!
#IPF
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK

options 	SCHED_ULE		# ULE scheduler
options 	PREEMPTION		# Enable kernel thread preemption
options 	INET			# InterNETworking
#options 	INET6			# IPv6 communications protocols
options 	SCTP			# Stream Control Transmission Protocol
options 	FFS			# Berkeley Fast Filesystem
options 	SOFTUPDATES		# Enable FFS soft updates support
options 	UFS_ACL			# Support for access control lists
options 	UFS_DIRHASH		# Improve performance on big directories
options 	UFS_GJOURNAL		# Enable gjournal-based UFS journaling
options 	MD_ROOT			# MD is a potential root device
#options 	NFSCLIENT		# Network Filesystem Client
#options 	NFSSERVER		# Network Filesystem Server
#options 	NFSLOCKD		# Network Lock Manager
#options 	NFS_ROOT		# NFS usable as /, requires NFSCLIENT
options 	MSDOSFS			# MSDOS Filesystem
options 	CD9660			# ISO 9660 Filesystem
options 	PROCFS			# Process filesystem (requires PSEUDOFS)
options 	PSEUDOFS		# Pseudo-filesystem framework
options 	GEOM_PART_GPT		# GUID Partition Tables.
options 	GEOM_LABEL		# Provides labelization
options 	COMPAT_43TTY		# BSD 4.3 TTY compat (sgtty)
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5
options 	COMPAT_FREEBSD6		# Compatible with FreeBSD6
options 	COMPAT_FREEBSD7		# Compatible with FreeBSD7
options 	SCSI_DELAY=5000		# Delay (in ms) before probing SCSI
options 	KTRACE			# ktrace(1) support
options 	STACK			# stack(9) support
options 	SYSVSHM			# SYSV-style shared memory
options 	SYSVMSG			# SYSV-style message queues
options 	SYSVSEM			# SYSV-style semaphores
options 	P1003_1B_SEMAPHORES	# POSIX-style semaphores
options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
options 	AUDIT			# Security event auditing
options 	MAC			# TrustedBSD MAC Framework
options		FLOWTABLE		# per-cpu routing cache
#options 	KDTRACE_HOOKS		# Kernel DTrace hooks
options 	INCLUDE_CONFIG_FILE     # Include this file in kernel

# To make an SMP kernel, the next two lines are needed
options 	SMP			# Symmetric MultiProcessor Kernel
device		apic			# I/O APIC

# CPU frequency control
device		cpufreq

# Bus support.
device		acpi
device		eisa
device		pci

# Floppy drives
#device		fdc

# ATA and ATAPI devices
device		ata
device		atadisk		# ATA disk drives
#device		ataraid		# ATA RAID drives
device		atapicd		# ATAPI CDROM drives
#device		atapifd		# ATAPI floppy drives
#device		atapist		# ATAPI tape drives
options 	ATA_STATIC_ID	# Static device numbering

# SCSI Controllers
device		ahb		# EISA AHA1742 family
device		ahc		# AHA2940 and onboard AIC7xxx devices
options 	AHC_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~128k to driver.
device		ahd		# AHA39320/29320 and onboard AIC79xx devices
options 	AHD_REG_PRETTY_PRINT	# Print register bitfields in debug
					# output.  Adds ~215k to driver.
device		amd		# AMD 53C974 (Tekram DC-390(T))
device		hptiop		# Highpoint RocketRaid 3xxx series
device		isp		# Qlogic family
#device		ispfw		# Firmware for QLogic HBAs- normally a module
device		mpt		# LSI-Logic MPT-Fusion
#device		ncr		# NCR/Symbios Logic
device		sym		# NCR/Symbios Logic (newer chipsets + those of `ncr')
device		trm		# Tekram DC395U/UW/F DC315U adapters

device		adv		# Advansys SCSI adapters
device		adw		# Advansys wide SCSI adapters
device		aha		# Adaptec 154x SCSI adapters
device		aic		# Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
device		bt		# Buslogic/Mylex MultiMaster SCSI adapters

device		ncv		# NCR 53C500
device		nsp		# Workbit Ninja SCSI-3
device		stg		# TMC 18C30/18C50

# SCSI peripherals
device		scbus		# SCSI bus (required for SCSI)
device		ch		# SCSI media changers
device		da		# Direct Access (disks)
device		sa		# Sequential Access (tape etc)
device		cd		# CD
device		pass		# Passthrough device (direct SCSI access)
device		ses		# SCSI Environmental Services (and SAF-TE)

# RAID controllers interfaced to the SCSI subsystem
device		amr		# AMI MegaRAID
device		arcmsr		# Areca SATA II RAID
device		asr		# DPT SmartRAID V, VI and Adaptec SCSI RAID
device		ciss		# Compaq Smart RAID 5*
device		dpt		# DPT Smartcache III, IV - See NOTES for options
device		hptmv		# Highpoint RocketRAID 182x
device		hptrr		# Highpoint RocketRAID 17xx, 22xx, 23xx, 25xx
device		iir		# Intel Integrated RAID
device		ips		# IBM (Adaptec) ServeRAID
device		mly		# Mylex AcceleRAID/eXtremeRAID
device		twa		# 3ware 9000 series PATA/SATA RAID

# RAID controllers
#device		aac		# Adaptec FSA RAID
#device		aacp		# SCSI passthrough for aac (requires CAM)
#device		ida		# Compaq Smart RAID
#device		mfi		# LSI MegaRAID SAS
#device		mlx		# Mylex DAC960 family
#device		pst		# Promise Supertrak SX6000
#device		twe		# 3ware ATA RAID

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc		# AT keyboard controller
device		atkbd		# AT keyboard
device		psm		# PS/2 mouse

device		kbdmux		# keyboard multiplexer

device		vga		# VGA video card driver

device		splash		# Splash screen and screen saver support

# syscons is the default console driver, resembling an SCO console
device		sc

device		agp		# support several AGP chipsets

# Power management support (see NOTES for more options)
#device		apm
# Add suspend/resume support for the i8254.
device		pmtimer

# PCCARD (PCMCIA) support
# PCMCIA and cardbus bridge support
#device		cbb		# cardbus (yenta) bridge
#device		pccard		# PC Card (16-bit) bus
#device		cardbus		# CardBus (32-bit) bus

# Serial (COM) ports
device		uart		# Generic UART driver

# Parallel port
device		ppc
device		ppbus		# Parallel port bus (required)
device		lpt		# Printer
device		plip		# TCP/IP over parallel
device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da

# If you've got a &quot;dumb&quot; serial or parallel PCI card that is
# supported by the puc(4) glue driver, uncomment the following
# line to enable it (connects to sio, uart and/or ppc drivers):
#device		puc

# PCI Ethernet NICs.
#device		de		# DEC/Intel DC21x4x (``Tulip'')
#device		em		# Intel PRO/1000 Gigabit Ethernet Family
#device		igb		# Intel PRO/1000 PCIE Server Gigabit Family
#device		ixgb		# Intel PRO/10GbE Ethernet Card
device		le		# AMD Am7900 LANCE and Am79C9xx PCnet
#device		ti		# Alteon Networks Tigon I/II gigabit Ethernet
#device		txp		# 3Com 3cR990 (``Typhoon'')
#device		vx		# 3Com 3c590, 3c595 (``Vortex'')

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
#device		ae		# Attansic/Atheros L2 FastEthernet
#device		age		# Attansic/Atheros L1 Gigabit Ethernet
#device		alc		# Atheros AR8131/AR8132 Ethernet
#device		ale		# Atheros AR8121/AR8113/AR8114 Ethernet
#device		bce		# Broadcom BCM5706/BCM5708 Gigabit Ethernet
#device		bfe		# Broadcom BCM440x 10/100 Ethernet
#device		bge		# Broadcom BCM570xx Gigabit Ethernet
#device		dc		# DEC/Intel 21143 and various workalikes
#device		et		# Agere ET1310 10/100/Gigabit Ethernet
#device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
#device		jme		# JMicron JMC250 Gigabit/JMC260 Fast Ethernet
#device		lge		# Level 1 LXT1001 gigabit Ethernet
#device		msk		# Marvell/SysKonnect Yukon II Gigabit Ethernet
#device		nfe		# nVidia nForce MCP on-board Ethernet
#device		nge		# NatSemi DP83820 gigabit Ethernet
#device		nve		# nVidia nForce MCP on-board Ethernet Networking
#device		pcn		# AMD Am79C97x PCI 10/100 (precedence over 'le')
#device		re		# RealTek 8139C+/8169/8169S/8110S
#device		rl		# RealTek 8129/8139
#device		sf		# Adaptec AIC-6915 (``Starfire'')
#device		sge		# Silicon Integrated Systems SiS190/191
#device		sis		# Silicon Integrated Systems SiS 900/SiS 7016
#device		sk		# SysKonnect SK-984x &amp; SK-982x gigabit Ethernet
#device		ste		# Sundance ST201 (D-Link DFE-550TX)
#device		stge		# Sundance/Tamarack TC9021 gigabit Ethernet
#device		tl		# Texas Instruments ThunderLAN
#device		tx		# SMC EtherPower II (83c170 ``EPIC'')
#device		vge		# VIA VT612x gigabit Ethernet
#device		vr		# VIA Rhine, Rhine II
#device		wb		# Winbond W89C840F
#device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')

# ISA Ethernet NICs.  pccard NICs included.
device		cs		# Crystal Semiconductor CS89x0 NIC
# 'device ed' requires 'device miibus'
#device		ed		# NE[12]000, SMC Ultra, 3c503, DS8390 cards
#device		ex		# Intel EtherExpress Pro/10 and Pro/10+
#device		ep		# Etherlink III based cards
#device		fe		# Fujitsu MB8696x based cards
#device		ie		# EtherExpress 8/16, 3C507, StarLAN 10 etc.
#device		sn		# SMC's 9000 series of Ethernet chips
#device		xe		# Xircom pccard Ethernet

# Wireless NIC cards
#device		wlan		# 802.11 support
#options 	IEEE80211_DEBUG	# enable debug msgs
#options 	IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
#options 	IEEE80211_SUPPORT_MESH	# enable 802.11s draft support
#device		wlan_wep	# 802.11 WEP support
#device		wlan_ccmp	# 802.11 CCMP support
#device		wlan_tkip	# 802.11 TKIP support
#device		wlan_amrr	# AMRR transmit rate control algorithm
#device		an		# Aironet 4500/4800 802.11 wireless NICs.
#device		ath		# Atheros pci/cardbus NIC's
#device		ath_hal		# pci/cardbus chip support
#options 	AH_SUPPORT_AR5416	# enable AR5416 tx/rx descriptors
#device		ath_rate_sample	# SampleRate tx rate control for ath
#device		ral		# Ralink Technology RT2500 wireless NICs.
#device		wi		# WaveLAN/Intersil/Symbol 802.11 wireless NICs.
#device		wl		# Older non 802.11 Wavelan wireless NIC.

# Pseudo devices.
device		loop		# Network loopback
device		random		# Entropy device
device		ether		# Ethernet support
device		vlan		# 802.1Q VLAN support
device		tun		# Packet tunnel.
device		pty		# BSD-style compatibility pseudo ttys
device		md		# Memory &quot;disks&quot;
#device		gif		# IPv6 and IPv4 tunneling
#device		faith		# IPv6-to-IPv4 relaying (translation)
device		firmware	# firmware assist module

# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device		bpf		# Berkeley packet filter

# USB support
options 	USB_DEBUG	# enable debug msgs
device		uhci		# UHCI PCI-&gt;USB interface
device		ohci		# OHCI PCI-&gt;USB interface
device		ehci		# EHCI PCI-&gt;USB interface (USB 2.0)
device		usb		# USB Bus (required)
#device		udbp		# USB Double Bulk Pipe devices
device		uhid		# &quot;Human Interface Devices&quot;
device		ukbd		# Keyboard
#device		ulpt		# Printer
device		umass		# Disks/Mass storage - Requires scbus and da
device		ums		# Mouse
#device		urio		# Diamond Rio 500 MP3 player
# USB Serial devices
device		u3g		# USB-based 3G modems (Option, Huawei, Sierra)
device		uark		# Technologies ARK3116 based serial adapters
device		ubsa		# Belkin F5U103 and compatible serial adapters
device		uftdi		# For FTDI usb serial adapters
device		uipaq		# Some WinCE based devices
device		uplcom		# Prolific PL-2303 serial adapters
device		uslcom		# SI Labs CP2101/CP2102 serial adapters
device		uvisor		# Visor and Palm devices
device		uvscom		# USB serial support for DDI pocket's PHS
# USB Ethernet, requires miibus
#device		aue		# ADMtek USB Ethernet
#device		axe		# ASIX Electronics USB Ethernet
#device		cdce		# Generic USB over Ethernet
#device		cue		# CATC USB Ethernet
#device		kue		# Kawasaki LSI USB Ethernet
#device		rue		# RealTek RTL8150 USB Ethernet
#device		udav		# Davicom DM9601E USB
# USB Wireless
#device		rum		# Ralink Technology RT2501USB wireless NICs
#device		uath		# Atheros AR5523 wireless NICs
#device		ural		# Ralink Technology RT2500USB wireless NICs
#device		zyd		# ZyDAS zb1211/zb1211b wireless NICs

# FireWire support
device		firewire	# FireWire bus code
#device		sbp		# SCSI over FireWire (Requires scbus and da)
device		fwe		# Ethernet over FireWire (non-standard!)
device		fwip		# IP over FireWire (RFC 2734,3146)
device		dcons		# Dumb console driver
device		dcons_crom	# Configuration ROM for dcons
</pre>
</blockquote>
<p class="p15" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 10pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p>
<p class="p0" style="margin-bottom: 5pt; margin-top: 0pt; text-align: left;"><span style="color: rgb(0, 0, 0); font-size: 12pt; font-family: 'Times New Roman'; background: none repeat scroll 0% 0% rgb(255, 255, 255);"><o:p></o:p></span></p><br/>Tags - <a href="http://holmesian.org/tags/freebsd/" rel="tag">freebsd</a> , <a href="http://holmesian.org/tags/ports/" rel="tag">ports</a> , <a href="http://holmesian.org/tags/%25E5%25AE%2589%25E8%25A3%2585/" rel="tag">安装</a> , <a href="http://holmesian.org/tags/%25E7%25AC%2594%25E8%25AE%25B0/" rel="tag">笔记</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/last_summer/</link>
<title><![CDATA[大学里最后的暑假]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[生活随笔]]></category>
<pubDate>Mon, 02 Aug 2010 08:19:00 +0000</pubDate> 
<guid>http://holmesian.org/last_summer/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 连续两个多月没有管博客的生死，现在想到给一下自己的这一片小田地来拓荒。两个多月本来有许许多多值得记录甚至深究的点滴或者大事，但因为大都是非技术类的不开心内容，所以就不准备再赘述，过去的就都让其过去吧。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://lightory.net/junior-second/518/">LiGht</a>和<a href="http://huangming.ecjtu.net/">HM</a>暑假都去了腾讯实习，虽然腾讯的风言风语很多，但是就中国来说还是相对比较靠谱的公司。这是我大学的最后一个暑假，因为已经确定以后不会走纯互联网或者计算机相关的IT行业道路，所以安安稳稳地留在学校准备考研。过去的一个月在学校和技术部大一的孩子们待了很长的时间，虽然多少教了一些东西给他们但是终究还是杯水车薪。不过看着这些日新的技术接班人在不断地成长也多少有些欣慰，确实现在纯技术爱好者越来越少：往上了走是因为利益的诱惑和生活的压力，往下了走是因为稚嫩和贪玩。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 因为S.H外婆出车祸，我陪S.H回了一趟家，71岁的老人被飞驰的电动车撞倒之后能基本完全恢复真是不幸中的万幸，或许真的是因为外婆终日信佛向善之福。回家之前将ecjtu.net的主服务器换了一次构架，模仿ilo式的远程管理将极大地方便远程管理，或许这是为ecjtu.net作出了最后几个技术上的贡献之一了吧。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 回家之后的这几天不可避免的去见了小学和中学的同学，毕竟是最后一个暑假，以后大家都各奔东西，再会的机会就少之又少了。按理说最后几次难得的见面应当是难舍难分抑或至少是好言相赠，但一些昔日挚友的蜕变还是让我不得不心有余悸，好端端的聚会变成了奢侈的煎熬，或许因为我思考问题过于理想化，对好恶判断过于个人主观了吧，现实的社会和世故的力量真的能让人蜕变得如此厉害？&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 好在这趟回乡我还能够找到曾经的感觉，一直的好友。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; XWX在Q上提示我说即将到来了10级新生有技术底子比较好的，只不过不少已经被CERT招了去了。其实我不再像之前那样对所谓的&ldquo;苗子&rdquo;有什么期待，就跟也不再与陈老板纠结&ldquo;土壤问题&rdquo;一样，其实从一开ECJTU.NEt和CERT在技术和非技术上的明争暗斗就显得那么的幼稚，尤其是非技术上的。&nbsp; 一切应当顺其自然。</p>
<p>&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; S.H已经回去开始辛勤地工作，我也要继续好好地准备，为了自己，也为了我们。</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E6%259A%2591%25E5%2581%2587/" rel="tag">暑假</a> , <a href="http://holmesian.org/tags/%25E5%25A4%25A7%25E5%25AD%25A6/" rel="tag">大学</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/LLFL_QRSY/</link>
<title><![CDATA[莉莉发廊与秋日の私语]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[生活随笔]]></category>
<pubDate>Mon, 02 Aug 2010 07:26:37 +0000</pubDate> 
<guid>http://holmesian.org/LLFL_QRSY/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 莉莉发廊与秋日の私语分别是我小学和初中包含记忆比较多的两个店铺：莉莉发廊在我去小学上课的一条必经之路旁边，是一家每天上下课都要被挤爆专门出售各类小玩意的小品店；秋日の私语是我所在的初中附近&ldquo;地理位置最优越&rdquo;的一所网吧，几乎是当时我们班所有男生临近周末的聚集地。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;可以毫不夸张地说，莉莉发廊当时完全是靠着我们这群不谙世事的小学生存活下来甚至大赚了一笔的，虽然现在想想他们有骗小朋友零花钱之嫌但是在当时确实是大家发掘新奇玩意的窗口。记得那家小品店由一个30多岁阿姨打理着，其实小店究竟叫什么我们并不知道，只是所租的店面可能之前是一家发廊且转租的时候没来得及擦掉属于自己的标志，而之后来来往往的小客户都习惯性地认为店名是&ldquo;莉莉发廊&rdquo;再加之店主的沉默性导向，于是就将错就错了五年多，将错就错出了一个小品牌。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 至于&ldquo;秋日の私语&rdquo;这名字，同&ldquo;莉莉发廊&rdquo;一样也是被我们这些客户给按上的名字且店家最后默许的。说白了秋日の私语就是一个&ldquo;地下网吧&rdquo;，具有离学校不远却又相当隐蔽之优越的地理位置条件。一方面机器配置不差上网费用不高，另一方面由于学校严家长严防，所以跟莉莉发廊比起来秋日の私语显得更为邪恶，但是无论如何&ldquo;秋日&rdquo;都是当时咱们那一伙人不可磨灭的记忆。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 这两家都是&ldquo;挂羊头，卖狗肉&rdquo;&nbsp;且生意都相当的火爆。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p><br/>Tags - <a href="http://holmesian.org/tags/%25E8%258E%2589%25E8%258E%2589/" rel="tag">莉莉</a> , <a href="http://holmesian.org/tags/%25E5%258F%2591%25E5%25BB%258A/" rel="tag">发廊</a> , <a href="http://holmesian.org/tags/%25E7%25A7%2581%25E8%25AF%25AD/" rel="tag">私语</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/jay_donotfly/</link>
<title><![CDATA[周董周杰伦新歌《超人不会飞》 下载]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[个人天空]]></category>
<pubDate>Mon, 26 Apr 2010 05:21:59 +0000</pubDate> 
<guid>http://holmesian.org/jay_donotfly/</guid> 
<description>
<![CDATA[ 
	【Jay〗【超人不会飞】高品质完整版+来电铃声+短信铃声 需要的TX邮箱留下

周董的新歌终于出来了，正准备听  不知道是不是像@51isoft说的那样 越听越失望……

新歌「超人不会飞」，由周杰伦填词谱曲兼制作，以抒情曲风缓缓唱出出道十年心路历程与感慨。歌词中谈到自己带来的社会以及音乐现象，更自嘲自己成为好人好事代表，需接受众人检视，自然散发出独特的周式幽默风格，令人会心一笑，周杰伦表示「一般带有批判意味的歌词都会用重节奏或饶舌曲风包装，但我就是要用抒情曲风带给大家全新感受！」<br/>............<br/><br/>Tags - <a href="http://holmesian.org/tags/%25E8%25B6%2585%25E4%25BA%25BA%25E4%25B8%258D%25E4%25BC%259A%25E9%25A3%259E/" rel="tag">超人不会飞</a> , <a href="http://holmesian.org/tags/%25E5%2591%25A8%25E8%2591%25A3/" rel="tag">周董</a> , <a href="http://holmesian.org/tags/%25E5%2591%25A8%25E6%259D%25B0%25E4%25BC%25A6/" rel="tag">周杰伦</a> , <a href="http://holmesian.org/tags/%25E4%25B8%258B%25E8%25BD%25BD/" rel="tag">下载</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/DELL_Boot_failed/</link>
<title><![CDATA[DELL服务器“strike the f1 to continue f2 to run the setup utility”问题解决方法]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Thu, 22 Apr 2010 00:16:01 +0000</pubDate> 
<guid>http://holmesian.org/DELL_Boot_failed/</guid> 
<description>
<![CDATA[ 
	<p>昨天晚上涛哥发短信过来说服务器reboot一下就起不来了，刚才看到机柜前看了一下原来是服务器重启的时候卡在了POST之后一个&ldquo;strike the f1 to continue f2 to run the setup utility&rdquo;错误提示的地方。</p>
<p>初步判断是BIOS设置的问题，遂按f2进BIOS检查&hellip;&hellip;发现无一异常。</p>
<p>最终通过下面的方法解决这个问题：</p>
<p>按f2进bios按numlock scrolllock capslock三个键点亮键盘灯，然后按alt+e，alt+f，alt+b然后保存退出。</p>
<p>&nbsp;</p>
<p>PS：其实就是恢复BIOS默认设置&hellip;&hellip; </p>
<p>我始终觉得这&ldquo;strike the f1 to continue f2 to run the setup utility&rdquo;的错误提示跟启动设备有关，不知道为啥</p><br/>Tags - <a href="http://holmesian.org/tags/dell/" rel="tag">dell</a> , <a href="http://holmesian.org/tags/utility/" rel="tag">utility</a> , <a href="http://holmesian.org/tags/strike/" rel="tag">strike</a> , <a href="http://holmesian.org/tags/continue/" rel="tag">continue</a> , <a href="http://holmesian.org/tags/%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8/" rel="tag">服务器</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/post/700/</link>
<title><![CDATA[本文仅用于认领博客]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[个人天空]]></category>
<pubDate>Wed, 21 Apr 2010 05:59:08 +0000</pubDate> 
<guid>http://holmesian.org/post/700/</guid> 
<description>
<![CDATA[ 
	<p>QQREADERC7D38E65D09AB6E7</p><br/>Tags - <a href="http://holmesian.org/tags/%25E5%258D%259A%25E5%25AE%25A2/" rel="tag">博客</a> , <a href="http://holmesian.org/tags/%25E8%25AE%25A4%25E9%25A2%2586/" rel="tag">认领</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Godaddy_Saving/</link>
<title><![CDATA[关于Godaddy]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[网海宝藏]]></category>
<pubDate>Tue, 20 Apr 2010 04:46:12 +0000</pubDate> 
<guid>http://holmesian.org/Godaddy_Saving/</guid> 
<description>
<![CDATA[ 
	好象前段时间关于 godaddy的新闻特别多，一会骂，一会捧，让人感觉很迷惘。但事实上，更多的人还是愿意接受godaddy，而并不是排斥。网上的一些骂文也很多。无 非就是指什么godaddy根本就没有进入过中国市场，所以也不算是退出中国市场，还说什么非法敛财之类的，但论据啥的都其实并不充分，相反还有一点欲盖 弥彰。five jiao们不停的在攻击这些运营商，不知道会给自己带来什么样的好处。或许是工资的上升或许是奖金的增加？但对于用户来说，适合自己的才是最好的。要知 道，对于一个商务网站来说，如果哪天域名解析权也不在自己手里的时候，会有多痛苦。<br/>............<br/><br/>Tags - <a href="http://holmesian.org/tags/godaddy/" rel="tag">godaddy</a> , <a href="http://holmesian.org/tags/%25E8%25B5%2584%25E6%25BA%2590/" rel="tag">资源</a> , <a href="http://holmesian.org/tags/%25E5%2585%258D%25E8%25B4%25B9/" rel="tag">免费</a> , <a href="http://holmesian.org/tags/%25E8%2599%259A%25E6%258B%259F%25E4%25B8%25BB%25E6%259C%25BA/" rel="tag">虚拟主机</a> , <a href="http://holmesian.org/tags/vps/" rel="tag">vps</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Ubuntu-cairo-dock/</link>
<title><![CDATA[在1000He上折腾了一下Ubuntu]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[EeePC系列]]></category>
<pubDate>Fri, 09 Apr 2010 03:48:21 +0000</pubDate> 
<guid>http://holmesian.org/Ubuntu-cairo-dock/</guid> 
<description>
<![CDATA[ 
	昨天帮一个很“有气质”的TX把一台Mac本装成了Win7，我发现我也不是很习惯使用Mac OS。尤其是吸附式的光驱，弹出的方式让人很无语，触摸板右键的表现方式也让人琢磨了半天，还有切换引导设备的方式……好了，废话不说了，开始正题：<br/>............<br/><br/>Tags - <a href="http://holmesian.org/tags/ubuntu/" rel="tag">ubuntu</a> , <a href="http://holmesian.org/tags/%25E6%258A%2598%25E8%2585%25BE/" rel="tag">折腾</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/W910_ReInstall/</link>
<title><![CDATA[W910刷机工具、刷机驱动、闭合文件及刷机包]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[实用工具]]></category>
<pubDate>Wed, 07 Apr 2010 05:55:00 +0000</pubDate> 
<guid>http://holmesian.org/W910_ReInstall/</guid> 
<description>
<![CDATA[ 
	<p><span class="sub_title " id="subject">昨天一个TX的手机索爱W910</span><span class="sub_title " id="subject">坏了，找手机维修店换排线未果之后找我刷机。</span></p>
<p><span class="sub_title ">稍微花了一点时间到网上搜集了一些关于W910/W910i的刷机资源和资料，有不少论坛有足够多的资源，但是都是需要这个积分那个积分的，真的很烦人。其实很简单的一件事却要花费他人大量的时间去回帖发帖来完成所谓的提升浏览权限。</span></p>
<p>&nbsp;</p>
<p>简单的刷机流程如下（用到的刷机驱动、刷机工具、港版刷机包、大陆刷机包以及闭合文件可以留言我发给你）：</p>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>一、<br />
下载后全部解压到同一个文件夹下方便调用！<br />
开始前请先安装好刷机驱动(ggsetup-2.2.0.1)！</p>
<p><a href="/attachment/image/2010040713544069612.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic2.esqimg.com/5053407/159_4245_482cc7b9cc6c4c8.jpg" alt="" /></a></p>
<p><br />
<br />
<br />
二、<br />
把闭合文件压缩成标准ZIP文件，要在&quot;TPA&quot;目录压缩！</p>
<p><a href="/attachment/image/2010040713544147254.jpg" target="blank" title="查看原图"><img src="http://dstatic.esqimg.com/5053408/159_4245_f102e7bda992f57.jpg" alt="" /></a></p>
<p><br />
<br />
<br />
三、<br />
1.运行A2Uploader，数据线先连接电脑，再点&quot;Identify&quot;开始连接手机！</p>
<p><a href="/attachment/image/2010040713544156474.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic2.esqimg.com/5053409/159_4245_3a5a2fdfe980360.jpg" alt="" /></a></p>
<p><br />
<br />
2.手机关机拔下电池10秒再装上，看到提示后按着手机的&quot;C&quot;或&quot;2&amp;5&quot;键同时把数据线接收手机！</p>
<p><a href="/attachment/image/2010040713544115534.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic.esqimg.com/5053410/159_4245_0aca42f8c135dcf.jpg" alt="" /></a></p>
<p><br />
<br />
连接后检查出的手机信息</p>
<p><a href="/attachment/image/2010040713544168094.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic2.esqimg.com/5053411/159_4245_b393c17ab424c64.jpg" alt="" /></a></p>
<p><br />
<br />
<br />
四、<br />
如下图数字顺序先按&quot;Add&quot;添加固件到目录，再按&quot;...&quot;添加刚才压缩好的闭合文件，最后按&quot;Flash&quot;！</p>
<p><a href="/attachment/image/2010040713544194707.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic.esqimg.com/5053412/159_4245_3f317660424dfc9.jpg" alt="" /></a></p>
<p><br />
<br />
按了&quot;Flash&quot;后还要重新插拔一下手机，先拔下手机，卸下电池等10秒再装上，再按着手机的&quot;C&quot;或&quot;2&amp;5&quot;键同时把数据线接收手机！</p>
<p><a href="/attachment/image/2010040713544118591.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic2.esqimg.com/5053413/159_4245_2aeff1359ec637f.jpg" alt="" /></a></p>
<p><br />
<br />
连接成功后软件自动开始刷机！</p>
<p><a href="/attachment/image/2010040713544139738.jpg" target="blank" title="查看原图"><img width="640" src="http://dstatic.esqimg.com/5053414/159_4245_7746fc8cd3e5579.jpg" alt="" /></a></p>
<p><br />
<br />
等待大概15分钟左右刷机过程完成！</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>上面提到的所有工具和刷机包下载地址：</p>
<h2 class="nowrap file-name zip">W910闭合文件tpa.zip http://u.115.com/file/f9a254bd6a</h2>
<h2 class="nowrap file-name zip">jjpatcher_update_W910刷机补丁.zip http://u.115.com/file/f9d27af1fa</h2>
<h2 class="nowrap file-name zip">W910亚太版刷机包.zip http://u.115.com/file/f9bdb00c00</h2>
<h2 class="nowrap file-name zip">W910港版刷机包.zip http://u.115.com/file/f9c8f1aeb8</h2>
<h2 class="nowrap file-name zip">W910刷机工具 http://u.115.com/file/f97b15ad02</h2>
<p>&nbsp;</p>
<p>如果不能下载了请留言</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/%25E5%25B7%25A5%25E5%2585%25B7/" rel="tag">工具</a> , <a href="http://holmesian.org/tags/%25E6%2596%2587%25E4%25BB%25B6/" rel="tag">文件</a> , <a href="http://holmesian.org/tags/%25E9%2597%25AD%25E5%2590%2588/" rel="tag">闭合</a> , <a href="http://holmesian.org/tags/%25E9%25A9%25B1%25E5%258A%25A8/" rel="tag">驱动</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Jack_Bauer_24/</link>
<title><![CDATA[24小时之Jack Bauer]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[个人天空]]></category>
<pubDate>Thu, 01 Apr 2010 04:48:19 +0000</pubDate> 
<guid>http://holmesian.org/Jack_Bauer_24/</guid> 
<description>
<![CDATA[ 
	<p>在Twitter上看到第八季是《24》的最后一季了  蛮喜欢这部剧集的</p>
<p></p>
<p><img alt="" src="attachment.php?fid=147" /></p>
<p>Jack Bauer doesn&rsquo;t have a firewall on his PC. He has a Bauerwall.  It&rsquo;s basically just a JPEG of Jack Bauer.<br />
No virus has ever attacked Jack Bauer&rsquo;s PC. Ever.<br />
杰克&middot;鲍尔的电脑没有防火墙，他用的是鲍尔墙。其实那只是一张杰克&middot;鲍尔的jpeg图片。从来没有病毒攻击杰克的电脑，从来。&nbsp;</p>
<p>Jack Bauer broke into the Russian Consulate and got captured because  he thought it would be fun to compare Russian prisons<br />
with Chinese prisons.</p>
<p>There are two hands that can beat a royal flush. Jack Bauer&rsquo;s right  hand and Jack Bauer&rsquo;s left hand.<br />
<br />
Most people would need months to recover From 20 months of Chinese  interrogation. Jack Bauer needs a shower, a shave and a<br />
change of clothes.<br />
通常，人们需要20个月从有中国特色的审讯中恢复过来。杰克&middot;鲍尔只需要洗个澡，挂胡子，然后换套衣服<br />
<br />
If Jack Bauer had been a Spartan the movie would have been called &ldquo;1&Prime;.<br />
如果 杰克&middot;鲍尔 是斯巴达人，那么那部《300》电影就被称为《1》<br />
<br />
The city of Los Angeles once named a street after Jack Bauer in  gratitude for his saving the city several times. They had to rename</p>
<p>it after people kept dying when they tried to cross the street. No  one crosses Jack Bauer and lives.<br />
洛杉矶曾因为杰克鲍尔数次拯救该市于危难存亡之中而命名一条街道为杰克鲍尔街。最后被迫取消，因为过街的人往往横死。没有任何人能够欺负杰克鲍尔之后还好 好活着。<br />
过街Cross street， 同时 cross 口语里就是放倒，欺负或者欺骗</p>
<p>When a convicted terrorist was sentenced to face Jack Bauer, he  appealed to have the sentence reduced to death.<br />
当一个定罪的恐怖分子被判面对杰克鲍尔，他的判决被直接缩短为死刑。</p>
<p>Some people see the glass as half full. Others see it as half empty.  Jack Bauer see the glass as a deadly weapon.</p>
<p>Professor Charles Xavier From X-Men once tried to read Jack Bauer&rsquo;s  mind. Now he&rsquo;s sitting in a wheel chair.<br />
《X战警》中的Charles Xavier教授曾经试图读取杰克&middot;鲍尔的精神。目前他坐在轮椅上</p>
<p>When bad things happen to good people, its probably fate. When bad  things happen to bad people, it&rsquo;s probably Jack Bauer.<br />
当噩耗降临在好人身上，这也许是命运。当噩耗降临在恐怖分子身上，这通常是因为杰克鲍尔。</p>
<p>There are three leading causes of death among terrorists. The first  two are Jack Bauer, and the third one is heart attack From hearing Jack <br />
Bauer is coming for them.<br />
恐怖分子有三种主要的死法。前两种是被杰克鲍尔干掉，第三种是听说杰克鲍尔找上门来引发的心脏病发作。</p>
<p>Jack Bauer never retreats, he just attacks in the opposite direction.</p>
<p>Passed out, surrounded by terrorists and nerve gas, and handcuffed to  a table leg, Jack Bauer laughed to himself and said,</p>
<p>&ldquo;I have them right Where I want them.&rdquo;</p>
<p>If Jack Bauer was in a room with Hitler, Stalin, and Nina Meyers, and  he had a gun with 2 bullets, he&rsquo;d shoot Nina twice.<br />
如果杰克&middot;鲍尔和希特勒、斯大林、Nina Meyers在同一个房间，杰克&middot;鲍尔有一把枪和2发子弹，他会对Nina连开两枪。</p>
<p>If everyone on &ldquo;24&Prime; followed Jack Bauer&rsquo;s instructions, it would be  called &ldquo;12&Prime;.<br />
Jack Bauer doesn&rsquo;t laugh in the face of danger; Jack Bauer is the face  of danger.<br />
杰克&middot;鲍尔面对危险的时候不会笑，因为杰克&middot;鲍尔就是危险本身</p>
<p>There&rsquo;s one only shift when Jack Bauer works for CTU: the graveyard  shift. <br />
Jack Bauer signs his autograph with bullets. So don&rsquo;t ask him to sign  any part of your body.<br />
杰克&middot;鲍尔用子弹为自传签名，所以千万不要让杰克&middot;鲍尔在你身上签名&hellip;&hellip;</p>
<p>If Jack Bauer was president, he would protect the secret service.<br />
如果杰克&middot;鲍尔是总统，他的职责就是保护特勤队</p>
<p>Jack Bauer is the only human in the world with the ability to make  Chloe O&rsquo;Brien drop the personality disorder and patch him through.</p>
<p>On a high school math test, Jack Bauer put down &ldquo;Violence&rdquo; as every  one of the answers. He got an A+ on the test because<br />
Jack Bauer solves all his problems with Violence.<br />
在一次学校的数学测验里，杰克&middot;鲍尔在对每道题的答案都是：暴力。最后他得到了A+的成绩，因为杰克&middot;鲍尔用暴力解决了所有问题。</p>
<p>Jack Bauers calender goes From March 31st to April 2nd, no one fools  Jack Bauer.<br />
杰克鲍尔的日历从3月31号直接跳到4月2号。没有任何人能耍到杰克鲍尔。</p>
<p>Jack Bauer does not get taken prisoner. He puts himself in a  disadvantageous position so as to make his next several killings more  dramatic.<br />
杰克鲍尔从来不会被人活捉。他把自己放到逆境来使紧跟的杀戮变的更加戏剧性。</p>
<p>Chained to a chair, tortured, and with the threat of death hanging  over him, Jack just wanted something to eat.<br />
被铁链锁在椅子上，收紧折磨，被威胁死亡，杰克&middot;鲍尔只是想要点吃的</p>
<p>Jack Bauer once forgot Where he put his keys. He then spent the next  half-hour torturing himself until he gave up the location of the keys.<br />
杰克鲍尔有次忘了带钥匙。他用了半个小时拷打自己以得到钥匙的确切位置。</p>
<p>Jack Bauer was nominated for an Emmy for playing Kiefer Sutherland.<br />
杰克&middot;鲍尔被艾米尔奖提名，因为他扮演了Kiefer Sutherland</p>
<p>There have been no terrorist attacks in United States since Jack  Bauer has appeared on television.<br />
自从杰克&middot;鲍尔在电视上露面之后，美国从未发生过恐怖袭击事件</p>
<p>The only reason Jack gave Nina mouth to mouth in Season 2 was because  he had to kill her himself.<br />
杰克鲍尔在第二季给Nina人工呼吸的唯一原因是因为他要亲手毙了Nina</p>
<p>Jack Bauer can torture you into giving up information you do not  possess.<br />
杰克&middot;鲍尔可以折磨你招出你不知道的信息。</p>
<p>When Jack Bauer says, &ldquo;I don&rsquo;t know if I can do this anymore&rdquo;, the  statement must be loosely translated as, &ldquo;I can still rip off your head,<br />
I just don&rsquo;t know if I feel like I can shit down your neck at this  time.&rdquo;<br />
当杰克&middot;鲍尔说&ldquo;我不知道我还能做这个不&rdquo;，他的意思其实是：&ldquo;我还可以把你头拎下来，只是我不知道这个时候我愿意把你头拎下来吗&rdquo;</p>
<p>Upon hearing that he was played by Kiefer Sutherland, Jack Bauer  killed Sutherland. Jack Bauer gets played by no man.<br />
杰克鲍尔听说Kiefer Sutherland扮演了他，他把这家伙给杀了。没有人能耍杰克鲍尔。<br />
英文 扮演 和 玩，甩 同词 &ldquo;play&rdquo; <br />
Jack Bauer always tests positive for steroids. Not that he uses  steroids. It&rsquo;s because steroids are made From Jack Bauer.<br />
杰克&middot;鲍尔的类固醇检测总是呈阳性，不是因为他用类固醇，是因为类固醇是从杰克&middot;鲍尔提炼的</p>
<p>Jack Bauer could strangle you with a cordless phone.<br />
杰克&middot;鲍尔可以用无绳电话勒死你</p>
<p>If it tastes like chicken, looks like chicken, and feels like  chicken, but Jack Bauer says its beef. Then it&rsquo;s fucking beef.<br />
如果它尝起来像鸡肉，看起来像鸡肉，摸起来也像鸡肉，但是杰克&middot;鲍尔说那是牛肉。那么它就是该死的牛肉。</p>
<p>1.6 billion Chinese are angry with Jack Bauer. Sounds like a fair  fight.<br />
16亿中国人不爽杰克鲍尔。嗯，看起来是个比较公平的战斗。</p>
<p>The state of California plans to reduce violent crime by changing the  method of capital punishment From lethal injection to Jack Bauer.<br />
加里福尼亚州为减少暴力案件，计划把执行死刑方法由注射改为面对杰克鲍尔。</p>
<p>Jack Bauer thinks the word mercy just means &ldquo;quick interrogation.&rdquo;<br />
杰克鲍尔认为&ldquo;宽恕&rdquo;这个词意味着&ldquo;快速审讯&rdquo;</p>
<p>Superman wears Jack Bauer pajamas.<br />
超人穿着带有Jack.Bauer标志的睡衣。</p>
<p>When Santa Claus asked Jack Bauer what he wanted for Christmas, he  snapped his neck. No one interrogates Jack Bauer and gets away<br />
with it.<br />
当圣诞老人问杰克&middot;鲍尔要什么圣诞节礼物的时候，他的脖子被折断了。因为没有人能审问杰克&middot;鲍尔。</p>
<p>Jack Bauer sleeps with a pillow under his gun.<br />
杰克&middot;鲍尔睡觉的时候枪下面放一个枕头</p>
<p>When Kim Bauer lost her virginity, Jack Bauer found it and put it  back.<br />
当金贝贝失去了贞操，小强找到了它， 并把它放了回去。</p>
<p>If you wake up in the morning, it&rsquo;s because Jack Bauer spared your  life.<br />
如果你早上醒来了，那是因为杰克&middot;鲍尔饶了你</p>
<p>&hellip;and on the seventh day Jack Bauer said, &ldquo;I&rsquo;ll take it From here.&rdquo;<br />
第七天 杰克鲍尔说：下面我来搞定。</p>
<p>When life gave Jack Bauer lemons, he used them to kill terrorists.  Jack Bauer fucking hates lemonade.<br />
生活给了杰克&middot;鲍尔柠檬，杰克&middot;鲍尔用它来杀恐怖分子。杰克&middot;鲍尔及其憎恨柠檬 <br />
Bauer is not word, it is a sentence&hellip;A death sentence.<br />
杰克&middot;鲍尔不是一个单词，是一个句子，是死亡的宣判（sentence既有句子的意思也有宣判的意思）</p>
<p>After Season 6 of 24, the Chinese will be on the Endangered Species  List.<br />
24第六季过后，中国人成了珍惜种群。</p>
<p>If Jack Bauer&rsquo;s gun jams, it&rsquo;s because he wanted to beat you with it.<br />
如果小强的枪卡了膛， 那是因为他想用枪托来揍你。</p>
<p>It&rsquo;s no use crying over spilt milk&hellip; Unless that was Jack Bauer&rsquo;s  milk. Oh you are so screwed.<br />
Life doesn&rsquo;t give Jack Bauer lemons. Life asks him which fruit he wants.<br />
生活不给与杰克&middot;鲍尔柠檬。生活问杰克&middot;鲍尔：你需要什么水果？</p>
<p>来源一&ldquo;When Life Give you lemons, make lemonade&rdquo;</p>
<p>Jack Bauer let himself be drugged, beaten and captured inside a crate  on a Chinese ship heading out of the USA with no way for help</p>
<p>to find him. Now he has them right Where we wants them.<br />
杰克鲍尔让自己被人拖着，暴扁然后装在一条中国船的柳条箱子运出美国。现在他终于到了我们希望他到的地方。</p>
<p>Lets get one thing straight, the only reason you are conscious right  now is because Jack Bauer does not feel like <br />
carrying you.<br />
来搞清楚一件事，你目前依然清醒的唯一原因是小强不想背着你走。</p>
<p>Jack Bauer doesn&rsquo;t have a refresh button on his web browser. All  events take place in real time.<br />
杰克&middot;鲍尔不需要点击浏览器的刷新按钮，因为&ldquo;所有的时间都是实时发生的&rdquo;（该句为24里开场白）</p>
<p>Jack Bauer played Russian Roulette with a fully loaded gun and won. <br />
The Supreme Court ruled unanimously that Jack Bauer&rsquo;s methods were  &ldquo;cruel and unusual punishment&rdquo;. The next day the Supreme</p>
<p>Court had nine vacancies.<br />
最高法院一致同意杰克&middot;鲍尔的手段为&ldquo;残忍和非常的刑法&rdquo;。第二天，最高法院多了9个空缺职位。</p>
<p>Only Jack Bauer can fly a plane From the luggage compartment.<br />
只有小强可以在行李藏操纵一架飞机。</p>
<p>Jack Bauer has the heart of a terrorist. He keeps it in a jar on his  desk.</p>
<p>A standard deck now contains 48 cards. Too many people were getting  hurt for trying to play Jack.<br />
现在一副牌通常只有48张。 太多的人因为出了Jack 而受伤。（打牌出Jack 是play jack。字面上是玩了小强，耍了小强。）</p>
<p>Torturing terrorists is like riding a bike. Jack Bauer never  forgets.</p>
<p>Jack doesn&rsquo;t believe in Murphy&rsquo;s Law, only Bauer&rsquo;s Law: &ldquo;Whatever CAN  go wrong, WILL be resolved in a period of 24 hours.&rdquo;</p>
<p>James Bond has a license to kill. Jack Bauer was his instructor.<br />
詹姆&middot;士邦德有杀人证，杰克&middot;鲍尔是他的指导老师。<br />
<br />
The only reason the Chinese kept Jack alive is so that he could bring  down the population.<br />
中国人让小强活着的唯一理由是他可以抑止人口增长。<br />
<br />
Jack Bauer once won a game of Connect 4 in 3 moves.<br />
小强有次只动了3次就赢了&ldquo;连四&ldquo;游戏。</p>
<p>Jack Bauer doesn&rsquo;t need a receipt to return something to a store,  just a gun.<br />
杰克鲍尔退货从来不需要收据，他只需要一把枪。</p>
<p>The Berlin Wall fell because Jack Bauer needed to get to the other  side.<br />
柏林墙倒了，因为杰克&middot;鲍尔需要到另一边去。</p>
<p>Jack Bauer is the leading cause of death in Middle Eastern men.<br />
杰克&middot;鲍尔是中东人死亡的主要原因。</p>
<p>In order to control illegal immigration in the United States, the  president installed cardboard cutouts of Jack Bauer along <br />
the US/Mexico border.<br />
为控制非法偷渡， 美国总统批示大量使用 纸制小强象放在美国＆墨西哥边境。</p>
<p>If Jack Bauer gives you his word, return it immediately and run.<br />
如果小强承诺你什么(gives you his word)，还给他 然后赶快溜。</p>
<p>Jack Bauer can pronounce the name &ldquo;Ahmed&rdquo; however he fucking wants.<br />
杰克&middot;鲍尔想什么时候叫&ldquo;阿罕默德&rdquo;就什么时候叫</p>
<p>Superman&rsquo;s only weakness is Kryptonite. Jack Bauer laughs at Superman  for having a weakness.<br />
超人唯一的弱点是氪， 小强嘲笑超人有一个弱点。</p>
<p>When Jack Bauer was little, he used to tie his brother up to a chair,  put a bag on his head, and ask him,</p>
<p>&ldquo;How many cookies did you steal From MY cookie jar!?&rdquo;</p>
<p>When 24 airs on the Spanish channel everyones lines are translated  except for Jack&rsquo;s. The reason for this, nobody speaks for <br />
Jack Bauer.<br />
当《24》在西班牙频道上播出的时候，每个人的台词都翻译过了，除了杰克&middot;鲍尔的。因为没有人踢杰克&middot;鲍尔说话。</p>
<p>When someone asks him how his day is going, Jack replies,  &ldquo;Previously, on 24&hellip;&rdquo;<br />
当有人问小强他当天过的如何，小强回答：&rdquo;previously, on 24&hellip;&rdquo;（该句为《24》开场白）</p>
<p>Jack Bauer doesn&rsquo;t take fingerprints, he takes fingers.<br />
杰克&middot;鲍尔从来不收集指纹，他收集指头！</p>
<p>You don&rsquo;t know Jack&rdquo; is a blessing among terrorists.<br />
&ldquo;你不认识小强&rdquo;是恐怖分子之间的一个祝福。</p>
<p>There is the right way, the wrong way, and the Jack Bauer way. It&rsquo;s  basically the right way but faster and more deaths.<br />
界上有正确的路，错误的路。还有一条小强路。这条路基本上就是正确的路，不过更快，死人更多。 <br />
<br />
When Jack Bauer goes to the airport and the metal detector doesn&rsquo;t go  off, security gives him a gun.<br />
小强去飞机场，金属探测器没响。于是安保就给了他一把枪。 <br />
Killing Jack Bauer doesn&rsquo;t make him dead. It just makes him angry.<br />
试图杀小强从来不会让他死， 只会让他发飙。 <br />
<br />
In 96 hours, Jack Bauer has killed 93 people and saved the world 4  times. What the fuck have you done with your life?<br />
96个小时内，小强杀了93个人 拯救了世界4次。 你为你的人生做了啥呢？</p>
<p>Jack Bauer doesn&rsquo;t speak any foreign languages, but he can make any  foreigner speak English in a matter of minutes.<br />
小强不会说外语。但他能让一个外国人在几分钟内开口说英语。</p>
<p>Jack Bauer has never caught a cold. How do we know? Colds still  exist.<br />
杰克&middot;鲍尔从来不患上感冒。为什么？因为感冒仍然存在</p>
<p>Don&rsquo;t ever ask Jack Bauer what is going on. He&rsquo;ll explain in the car.<br />
不要问杰克&middot;鲍尔发生了什么事。他会在车里跟你解释。</p>
<p>Jack Bauer doesn&rsquo;t miss. If he didn&rsquo;t hit you it&rsquo;s because he was  shooting at another terrorist twelve miles away.<br />
小强从来不会射失。如果他没有命中你，那是因为他在射一个12英里以外的恐怖分子。</p><br/>Tags - <a href="http://holmesian.org/tags/24/" rel="tag">24</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/fengyangyan_down/</link>
<title><![CDATA[冯仰妍资源]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[SEO学习]]></category>
<pubDate>Fri, 19 Mar 2010 03:02:54 +0000</pubDate> 
<guid>http://holmesian.org/fengyangyan_down/</guid> 
<description>
<![CDATA[ 
	<p>冯仰妍一个自称是90后的脑殘女生。关于她的事迹在搜索一下就OK啦，这里就不再重复了。</p>
<p>纯粹赚点浏览&hellip;&hellip;&nbsp; 不好意思啦&nbsp; 呵呵</p>
<p><br />
资源信息：14.22MB  FLV媒体格式</p>
<p><br />
载点列表：这个文件只能在登入之后下载。请先 <a href="http://holmesian.org/login.php?job=register">注册</a> 或 <a href="http://holmesian.org/login.php">登入</a></p>
<p><br />
非主流女生、80后、90后、漫画动画。QQ游戏、跑跑卡丁车、QQ聊天。</p>
<p><br />
快速赚钱,qq农场,soho兼职,现代养生,健康保健。电子杂志,澜,培琳秀客,明星写真。</p>
<p>游戏天空,魔兽纳格兰,寻仙杂志,网游派,游戏装备。</p><br/>Tags - <a href="http://holmesian.org/tags/%25E5%2586%25AF%25E4%25BB%25B0%25E5%25A6%258D/" rel="tag">冯仰妍</a> , <a href="http://holmesian.org/tags/%25E8%25B5%2584%25E6%25BA%2590/" rel="tag">资源</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Nginx_separator/</link>
<title><![CDATA[解决Nginx下二级目录斜杠问题]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Sat, 13 Mar 2010 02:32:57 +0000</pubDate> 
<guid>http://holmesian.org/Nginx_separator/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 不少网站页面习惯于在URL中的目录名后不加斜杠&ldquo;/&rdquo;，这在在apache下会自动添加一个斜杠从而不会造成什么问题，但是如果URL中的二级目录名后不加斜杠的话在Nginx下就会出现403 Forbidden的问题。在网上找到的比较可靠的原因供以想深究的TX进行参考：</p>
<blockquote>
<p>&nbsp;&nbsp; 在某些情况下（具体可参考 wiki.nginx.org），Nginx 内部重定向规则会被启动，例如，当 URL  指向一个目录并且在最后没有包含&ldquo;/&rdquo;时，Nginx 内部会自动的做一个 301 重定向，这时会有两种情况：<br />
1、 server_name_in_redirect on（默认），URL 重定向为： server_name 中的第一个域名 + 目录名 + /；<br />
2、 server_name_in_redirect off，URL 重定向为： 原 URL 中的域名 + 目录名 + /。<br />
<br />
当你有多个 域名要指向同一个虚拟主机，并且你自己写 301 重定向规则把它们合并到某一个域名时，情况就更复杂了：<br />
首先，nginx 检查  URL，如果符合条件，就用该规则（你写的）做第一遍重定向，接着，检查新生成的  URL，如果符合内部自动重定向之条件，就用前面提到的规则再做一次重定向。<br />
<br />
至于 PHP 的  $_SERVER[&quot;SERVER_NAME&quot;]，在 nginx 中默认是由 nginx 的变量 $server_name  提供，这时它和重定向没有关系，始终是 server_name 设置中的第一个域名，但这是可以被改变的，在你的 nginx 配置中找到  fastcgi_param 部分，修改<br />
fastcgi_param&nbsp;&nbsp;SERVER_NAME&nbsp;&nbsp;&nbsp;&nbsp;$server_name;<br />
为<br />
fastcgi_param&nbsp;&nbsp;SERVER_NAME&nbsp;&nbsp;&nbsp;&nbsp;$host;<br />
但 现在就要注意了，此时的 $_SERVER[&quot;SERVER_NAME&quot;] 会受你写的和 nginx 自己的重定向规则所影响而变化。<br />
<br />
现 在就清楚了，如果 MediaWiki 是通过 $_SERVER[&quot;SERVER_NAME&quot;] 来自己处理 URL 的话，那么在 nginx +  php 的默认环境下，它获得的将始终是 server_name 设置中的第一个域名，所以造成了&ldquo;不管通过什么域名访问 MediaWiki  首页，都会被跳转到其中的一个域名上。&rdquo;，这不是 nginx 的重定向造成的，虽然默认 server_name_in_redirect 是  on，但这个指令的影响范围仅仅只是 nginx 自己内部的重定向规则。</p>
</blockquote>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<br />
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 目前按照网上提供的一些主流方法，比如在 conf/nginx.conf 主配置文件里面加上</p>
<div class="codeText">
<div class="codeHead"><span onclick="javascript:code_1726.style.display='none';hit2_1726.style.display='';hit_1726.style.display='none';" style="cursor: pointer;" id="hit_1726" class="zhedie">折叠</span><span onclick="javascript:code_1726.style.display='';hit_1726.style.display='';hit2_1726.style.display='none';" style="cursor: pointer; display: none;" id="hit2_1726" class="zhedie">展开</span><span onclick="copyIdText('code_1726');" style="cursor: pointer;" class="copyCodeText">复制内容到剪贴板</span></div>
<div id="code_1726">
<ol start="1" class="dp-cpp">
    <li class="alt"><span><span>optimize_server_names&nbsp;off;&nbsp;&nbsp;</span></span></li>
    <li><span>server_name_in_redirect&nbsp;off;&nbsp;&nbsp;</span></li>
</ol>
</div>
<link rel="stylesheet" type="text/css" href="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/insertcode.css" />
<script src="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/excute.js" language="javascript" type="text/javascript"></script>
</div>
<p>在FreBSD+Nginx的架构下是无效的，而且<span><span>optimize_server_names还对Nginx版本有限制。</span></span></p>
<p><span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 目前比较靠谱的方法还是使用正则来重定向</span></span>：</p>
<div class="codeText">
<div class="codeHead"><span onclick="javascript:code_7420.style.display='none';hit2_7420.style.display='';hit_7420.style.display='none';" style="cursor: pointer;" id="hit_7420" class="zhedie">折叠</span><span onclick="javascript:code_7420.style.display='';hit_7420.style.display='';hit2_7420.style.display='none';" style="cursor: pointer; display: none;" id="hit2_7420" class="zhedie">展开</span><span onclick="copyIdText('code_7420');" style="cursor: pointer;" class="copyCodeText">复制内容到剪贴板</span></div>
<div id="code_7420">
<ol start="1" class="dp-xml">
    <li class="alt"><span><span>if&nbsp;(-d&nbsp;$request_filename){&nbsp;&nbsp;</span></span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rewrite&nbsp;^/(.*)([^/])$&nbsp;http://$host/$1$2/&nbsp;permanent;&nbsp;&nbsp;</span></li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;</span></li>
</ol>
</div>
<link rel="stylesheet" type="text/css" href="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/insertcode.css" />
<script src="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/excute.js" language="javascript" type="text/javascript"></script>
</div>
<p>将上面的代码放在相应虚拟主机配置文件的  location / {}里即可。&nbsp; </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp; 这样做的缺点就是必须对每一个需要自动添加斜杠的虚拟主机都要加上相应的内容。</p><br/>Tags - <a href="http://holmesian.org/tags/nginx/" rel="tag">nginx</a> , <a href="http://holmesian.org/tags/%25E7%259B%25AE%25E5%25BD%2595/" rel="tag">目录</a> , <a href="http://holmesian.org/tags/%25E8%25A7%25A3%25E5%2586%25B3/" rel="tag">解决</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/Nginx_permanent/</link>
<title><![CDATA[Nginx下做永久重定向的简单方法]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Fri, 12 Mar 2010 09:18:05 +0000</pubDate> 
<guid>http://holmesian.org/Nginx_permanent/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 有不少TX可能因为一些原因（比如说天朝的cn域名不停政策变化等）从cn域名转换到了其他域名，但是原来使用的cn域名可能已经积攒了大量的搜索引擎亲和因子,在各大搜索引擎被收录了上万的页面，冒然的直接启用新域名会显得得不偿失。所以这个时候通过一些方法最大可能地保存原来已经有的一些网页资源是势在必行的事情。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 对于Google来说可以通过Google提供的<a href="http://www.google.com/webmasters/tools">网站管理员工具</a>来加快域名转移的速度和效果，关于Google网站管理员工具的操作这里就不赘述了，相关的介绍非常详细。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在执行完前期的网站程序和数据转移之后就需要对原网站进行301的永久重定向，在Apache 下可以通过.htaccess配置RewriteRule，Nginx则在配置文件中加上跟下面类似的一段配置就行：</p>
<div contenteditable="false" class="HighLighter">
<div contenteditable="false">
<link rel="stylesheet" type="text/css" href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" /></div>
</div>
<div contenteditable="false" class="HighLighter">
<div contenteditable="false" class="dp-highlighter">
<div class="bar">&nbsp;</div>
<ol start="1" class="dp-c">
    <li class="alt"><span><span>server&nbsp;{</span></span></li>
    <li><span>listen&nbsp;80;</span></li>
    <li class="alt"><span>server_name&nbsp;holmesian.cn&nbsp;www.holmesian.cn;</span></li>
    <li>&nbsp;</li>
    <li class="alt"><span><span class="keyword">if</span><span>&nbsp;($http_host&nbsp;!~&nbsp;~S^holmesian\.org$~T)&nbsp;{</span></span></li>
    <li>&nbsp;</li>
    <li class="alt"><span>rewrite&nbsp;&nbsp;^(.*)&nbsp;&nbsp;&nbsp;&nbsp;http:<span class="comment">//holmesian.org$1&nbsp;permanent;</span></span></li>
    <li>&nbsp;</li>
    <li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></li>
    <li><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></li>
</ol>
</div>
<div contenteditable="false" style="display: none;" class="c#">
<pre>
server {
listen 80;
server_name holmesian.cn www.holmesian.cn;

if ($http_host !~ ~S^holmesian\.org$~T) {

rewrite  ^(.*)    http://holmesian.org$1 permanent;

                                        }
       }
</pre>
</div>
<div contenteditable="false">
<link rel="stylesheet" type="text/css" href="http://holmesian.org/editor/fckeditor/editor/plugins/highlighter/dp.SyntaxHighlighter/Styles/SyntaxHighlighter.css" /></div>
</div>
<p>这里值得一提的是Nginx的 Rewrite Flags：</p>
<p>redirect &ndash; 返回临时重定向的HTTP状态302 <br />
permanent &ndash; 返回永久重定向的HTTP状态301</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 测试一下，现在从搜索引擎来的holmesian.cn和www.holmesian.cn都被直接转成holmesian.org，用户几乎没有任何察觉。接下来等待搜索引擎响应了&hellip;&hellip;估计这个会有一个周期。</p><br/>Tags - <a href="http://holmesian.org/tags/nginx/" rel="tag">nginx</a> , <a href="http://holmesian.org/tags/%25E9%2587%258D%25E5%25AE%259A%25E5%2590%2591/" rel="tag">重定向</a> , <a href="http://holmesian.org/tags/php/" rel="tag">php</a> , <a href="http://holmesian.org/tags/%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8/" rel="tag">服务器</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/DeDeCMS_key/</link>
<title><![CDATA[DeDeCMS关键字混乱的解决办法]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Thu, 04 Mar 2010 07:39:39 +0000</pubDate> 
<guid>http://holmesian.org/DeDeCMS_key/</guid> 
<description>
<![CDATA[ 
	<p>DeDe CMS是一个由PHP编写功能强大的开源CMS系统，经过了长时间不断磨合，现在已经是一款比较完善开源CMS系统。</p>
<p>最新版的DeDeCMS提供对每篇文章的关键字自动提取功能，但是经过实际使用之后发现UFT-8版的关键字自动提取功能实在是不敢恭维，所以想到用tag替换关键的办法。</p>
<p>&nbsp;</p>
<p>具体操作方法：修改相应文章模板文件，找到</p>
<div class="codeText"><span onclick="copyIdText('code_9034');" style="cursor: pointer;" class="copyCodeText">复制内容到剪贴板</span>
<div id="code_9034">
<ol start="1" class="dp-xml">
    <li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">meta</span><span>&nbsp;</span><span class="attribute">name</span><span>=</span><span class="attribute-value">&quot;keywords&quot;</span><span>&nbsp;</span><span class="attribute">content</span><span>=</span><span class="attribute-value">&quot;{dede:field.keywords/}&quot;</span><span>&nbsp;</span><span class="tag">/&gt;</span><span>&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<link rel="stylesheet" type="text/css" href="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/insertcode.css" />
<script src="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/excute.js" language="javascript" type="text/javascript"></script>
</div>
<p>改成</p>
<div class="codeText">
<div class="codeHead"><span onclick="copyIdText('code_1924');" style="cursor: pointer;" class="copyCodeText">复制内容到剪贴板</span></div>
<div id="code_1924">
<ol start="1" class="dp-xml">
    <li class="alt"><span><span class="tag">&lt;</span><span class="tag-name">meta</span><span>&nbsp;</span><span class="attribute">name</span><span>=</span><span class="attribute-value">&quot;keywords&quot;</span><span>&nbsp;</span><span class="attribute">content</span><span>=</span><span class="attribute-value">&quot;{dede:tag&nbsp;row='6'}[field:tag&nbsp;/],{/dede:tag}&quot;</span><span class="tag">&gt;</span><span>&nbsp;&nbsp;</span></span></li>
</ol>
</div>
<link rel="stylesheet" type="text/css" href="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/insertcode.css" />
<script src="http://holmesian.org/editor/fckeditor/editor/plugins/insertcode/excute.js" language="javascript" type="text/javascript"></script>
</div>
<p>&nbsp;</p>
<p>上传修改的文件后重新生成页面即可</p><br/>Tags - <a href="http://holmesian.org/tags/dedecms/" rel="tag">dedecms</a> , <a href="http://holmesian.org/tags/%25E5%2585%25B3%25E9%2594%25AE/" rel="tag">关键</a> , <a href="http://holmesian.org/tags/%25E5%258A%259E%25E6%25B3%2595/" rel="tag">办法</a> , <a href="http://holmesian.org/tags/%25E8%25A7%25A3%25E5%2586%25B3/" rel="tag">解决</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/UC_fuck_GFW/</link>
<title><![CDATA[手机穿墙利器UC_USA_V3.sis]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[实用工具]]></category>
<pubDate>Wed, 10 Feb 2010 02:29:26 +0000</pubDate> 
<guid>http://holmesian.org/UC_fuck_GFW/</guid> 
<description>
<![CDATA[ 
	<p>感谢万能的Twitter&hellip;&hellip;</p>
<p>墙裂推荐手机端浏览器&nbsp; 修改版UCweb&nbsp; S60第三版 可用</p>
<p>这个文件只能在登入之后下载。请先 <a href="http://holmesian.org/login.php?job=register">注册</a> 或 <a href="http://holmesian.org/login.php">登入</a></p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/usa/" rel="tag">usa</a> , <a href="http://holmesian.org/tags/%25E6%2589%258B%25E6%259C%25BA/" rel="tag">手机</a> , <a href="http://holmesian.org/tags/%25E7%25A9%25BF%25E5%25A2%2599/" rel="tag">穿墙</a> , <a href="http://holmesian.org/tags/%25E5%2588%25A9%25E5%2599%25A8/" rel="tag">利器</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/360_rsing/</link>
<title><![CDATA[360与瑞星之间的那些事……]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[生活随笔]]></category>
<pubDate>Wed, 03 Feb 2010 04:37:18 +0000</pubDate> 
<guid>http://holmesian.org/360_rsing/</guid> 
<description>
<![CDATA[ 
	<p>这几天360和瑞星之间发生的那些事值得关注一下  事情的大概经过我稍微整理一下放在下面 具体细节请Google之&hellip;&hellip;</p>
<p>&nbsp;</p>
<p><strong>1月29日 </strong>波兰一家安全组织ntinternals   近日公布：瑞星杀毒软件长期存在两个&ldquo;本地提权&rdquo;0day安全漏洞，<strong>使木马病毒能轻易获得瑞星用户的系统控制权</strong>。国内 安全厂商金山和  360的技术专家均已确认了这两个漏洞的存在，一旦受到黑客攻击，数千万瑞星用户将丧失对木马病毒的防御能力，并将导致国内大批政府与企业内网的信息安全  面临严重威胁。</p>
<p>&nbsp;</p>
<p><strong>2月2日</strong>   瑞星已经在其官网发布360的漏洞细节及攻击代码，尚未确认其信息及攻击代码的真实性和有效性。理论上ntinternals应该不会把漏洞细节告  知非360人士，我很好奇瑞星是如何得知相关细节及攻击代码的。如果是假的，那就是一个小忽悠，如果是真的，那么这里面故事应该就多了去了。</p>
<p><strong>2月2日</strong> 17:19 360公开致谢NT Internals ，并表示已于第一时间修复漏洞</p>
<p>&nbsp;</p>
<p><strong>2月2日 </strong><strong><span style="color: rgb(255, 0, 0);">据 瑞星安全专家分析，目前360安全卫士最新版本(6.1.5.1009)此漏洞仍然存 在，并未修复。</span></strong></p>
<p>利 用工具：http://www.friddy.cn/article.asp?id=118</p>
<p><strong>2月2日 </strong>360安全中心发表严正声明，瑞星向媒体和用户通发新闻，造谣说360软件有&ldquo;后门&rdquo;，恶意诋毁中伤360品牌。免费的360杀毒自去年 10月20日推出以来，市场份额快速上升，短短几个月超越瑞星，成为市场第一，从而招致瑞星打击报复。对瑞星这种公然造谣的行径，360将坚决提起诉讼。</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>接下来会是什么情况呢？&hellip;&hellip;</p>
<p>瑞 星不会这么简单的完结的，因为已经有用户因为360的漏洞被提权了，而且实际上漏洞的下发有一个时间差，很可能是真的还没补，这些都会被瑞星用作口实，  我觉得一定还有续集。当然，瑞星已经处于下风了，继续看戏，不过不管怎么说，作为安全软件商难免说360和瑞星的激战，也能最终对用户负责起来。</p>
<p>以 前Discuz和PHPWind打来打去的时候，逼得急了，双方的补丁推送机制和效率都大大提高了。连后台拿shell都越来越难了。</p><br/>Tags - <a href="http://holmesian.org/tags/%25E7%2591%259E%25E6%2598%259F/" rel="tag">瑞星</a> , <a href="http://holmesian.org/tags/360/" rel="tag">360</a> , <a href="http://holmesian.org/tags/bug/" rel="tag">bug</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/kill_CNNIC/</link>
<title><![CDATA[删除不值得信任的CNNIC证书]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[网海宝藏]]></category>
<pubDate>Tue, 02 Feb 2010 11:59:57 +0000</pubDate> 
<guid>http://holmesian.org/kill_CNNIC/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;</p>
<p><strong>发生了什么事</strong></p>
<p>最近，CNNIC(中国互联网络信息中心)，偷偷地获得了 CA 权限！在所有中文用户被隐瞒的情况下！</p>
<p><strong>意味着什么</strong></p>
<p><span style="color: rgb(255, 0, 0); ">意味着 CNNIC 可以随意造一个假的证书给任何网站，替换网站真正的证书，从而盗取我们的任何资料！</span></p>
<p>这就是传说中的 SSL MITM 攻击。以前这个攻击不重要是因为攻击的证书是假的，浏览器会告诉我们真相；现在，因为 CNNIC 有了 CA 权限，浏览器对它的证书完全信任，不会给我们任何警告，即使是造假的证书！</p>
<p>你信任 CNNIC (中国互联网络信息中心) 吗？你相信它有了权限，会安守本分，不会偷偷地干坏事吗？<br />
我对此有3个疑问：</p>
<p><span style="color: rgb(255, 0, 0); ">1. 某 party 对 GMail 兴趣浓厚，GFW 苦练 SSL 内功多年，无大进展。如今有了 CA，若 GFW 令下，CNNIC 敢不从否？<br />
</span>2. CNNIC 当年利用所谓官方头衔，制流氓软件祸害网民。如今有了 CA，如何相信它不会故伎重演？<br />
3. 为了得到指定网站的合法证书，其它流氓公司抛出钱权交易，面对诱惑，CNNIC 是否有足够的职业操守？</p>
<p><strong>影响范围</strong></p>
<p>基本上所有浏览器的所有用户均受影响！</p>
<p>&nbsp;</p>
<p><strong>测试</strong></p>
<p>&nbsp;</p>
<p>如果你访问下面两个网站没有弹出提示则你已经中招了。</p>
<p>https://tns-fsverify.cnnic.cn/</p>
<p>https://www.enum.cn</p>
<p><strong>解决CNNIC CA方法（IE）：</strong><br />
工具&ndash;&gt;Internet选项&ndash;&gt;内容&ndash;&gt;证书</p>
<p>先打开受信任的根证书发布机构</p>
<p>选择CNNIC ROOT和Entrust.net Secure Server Certification Authority这两个选择导出</p>
<p>导出时，一切选择默认。</p>
<p>导出完毕后，开始&ndash;&gt;运行&ndash;&gt;certmgr.msc&ndash;&gt;不受信任的证书&ndash;&gt;证书&ndash;&gt;(右键)所有任务&ndash;&gt;导入，把刚才导出的证书导入。<br />
然后对着导入证书点击右键&ndash;&gt;属性&ndash;&gt;禁用此证书所有项目</p>
<p><strong>解决CNNIC CA方法（Firefox）:</strong></p>
<p>* 菜单栏：工具/编辑-&gt;首选项-&gt;高级-&gt;加密-&gt;查看证书-&gt;证书机构(Authorites)<br />
* 这是一个很长的列表，按照字母顺序，你应该能找到一个叫着 &ldquo;CNNIC ROOT&rdquo; 的记录，就是这个东西，告诉 Firefox，我们不信任它！<br />
* 选中 CNNIC ROOT，点击下面的&ldquo;编辑&rdquo;按钮，弹出一个框，应该有3个选项，把所有选项的勾都去掉！保存。<br />
* 还没有完，狡兔有三窟。<br />
* 接着往下找，有一个叫着 Entrust.net 的组，这个组里应该有一个 &ldquo;CNNIC SSL&rdquo; (如果没有，访问一下 这个网站 就有了)<br />
* 别急着下手，这回情况不一样，这个证书是 Entrust 签名的。我们信任 Entrust，Entrust 说它信任 CNNIC，所以我们就被迫信任 CNNIC SSL 了。找到 &ldquo;Entrust.net Secure Server Certification Authority&rdquo; 这一条，同上面一样，把3个选项的勾都去掉，保存（提示：取消了对 Entrust 的信任以后，可能会没法打开它签名的某些正常网站。至于哪个网站用了它的签名，随便试了一下，没找到例子）。<br />
* 最后，让我们验证一下。重启 Firefox，打开 这个 和 这个 网站，如果Firefox 对这两个网站都给出了安全警告，而非正常浏览，恭喜，您已经摆脱了 CNNIC CA 的安全威胁！</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/cnnic/" rel="tag">cnnic</a> , <a href="http://holmesian.org/tags/%25E8%25AF%2581%25E4%25B9%25A6/" rel="tag">证书</a> , <a href="http://holmesian.org/tags/%25E5%2588%25A0%25E9%2599%25A4/" rel="tag">删除</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/FreeBSD_nginx_fastcgi_error/</link>
<title><![CDATA[FreeBSD+nginx+spawn-fcgi出错的解决]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[日积月累]]></category>
<pubDate>Mon, 01 Feb 2010 05:34:45 +0000</pubDate> 
<guid>http://holmesian.org/FreeBSD_nginx_fastcgi_error/</guid> 
<description>
<![CDATA[ 
	<p>
<p>终于解决FreeBSD下Nginx做前端 FastCGI的PHP出现问题的情况了，原因很囧</p>
<p>过程如下：</p>
<p>ecjtu# whereis php-cgi</p>
<p>php-cgi: /usr/local/bin/php-cgi</p>
<p>ecjtu# spawn-fcgi -a 127.0.0.1 -p 139 -C 64 -f /usr/local/php/bin/php-cgi &nbsp; &nbsp;&nbsp;</p>
<p>spawn-fcgi: child exited with: 127</p>
<p>ecjtu# spawn-fcgi -a 127.0.0.1 -p 139 -C 64 -u www -f /usr/local/bin/php-cgi</p>
<p>spawn-fcgi: child exited with: 13</p>
<p>ecjtu# spawn-fcgi -a 127.0.0.1 -p 139 -C 64 -U www -f /usr/local/bin/php-cgi</p>
<p>spawn-fcgi: child spawned successfully: PID: 39766</p>
<p>现在OK了</p>
<p>莫非127错误是php-cgi位置错误 &nbsp;13错误是大写U写成了小写u</p>
</p><br/>Tags - <a href="http://holmesian.org/tags/freebsd/" rel="tag">freebsd</a> , <a href="http://holmesian.org/tags/nginx/" rel="tag">nginx</a> , <a href="http://holmesian.org/tags/%25E8%25A7%25A3%25E5%2586%25B3/" rel="tag">解决</a> , <a href="http://holmesian.org/tags/fcgi/" rel="tag">fcgi</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/IE_crash/</link>
<title><![CDATA[令Internet Explorer 6、7崩溃的代码]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[网海宝藏]]></category>
<pubDate>Wed, 27 Jan 2010 11:17:19 +0000</pubDate> 
<guid>http://holmesian.org/IE_crash/</guid> 
<description>
<![CDATA[ 
	<p>&nbsp;</p>
<pre style="font-size: 12px; ">
测试环境 ie6/ie7, Win XP Pro SP3<br /></pre>
<pre style="font-size: 12px; ">
代码：<br />1、<br />===========================================================<br />&lt;script&gt;document.createElement(&quot;li&quot;).value=3&lt;/script&gt;<br />===========================================================<br /><br />2、<br />===========================================================<br />&lt;script&gt;document.createElement(&quot;html&quot;).outerHTML&lt;/script&gt;<br />===========================================================
<br type="_moz" /></pre>
<pre style="font-size: 12px; ">
感兴趣的TX可以把任意一段代码复制到记事本，另存为html再用IE打开&hellip;&hellip;
或者直接访问holmesian.org/exp/iecrash.html
<br type="_moz" /></pre>
<pre style="font-size: 12px; ">
结论：IE太那个什么了&hellip;&hellip;</pre>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/explorer/" rel="tag">explorer</a> , <a href="http://holmesian.org/tags/internet/" rel="tag">internet</a> , <a href="http://holmesian.org/tags/%25E4%25BB%25A3%25E7%25A0%2581/" rel="tag">代码</a>
]]>
</description>
</item><item>
<link>http://holmesian.org/MySQL_0Day/</link>
<title><![CDATA[最新MySQL 0day利用代码]]></title> 
<author>Holmesian &lt;Holmesian@qq.com&gt;</author>
<category><![CDATA[实用工具]]></category>
<pubDate>Wed, 27 Jan 2010 11:03:42 +0000</pubDate> 
<guid>http://holmesian.org/MySQL_0Day/</guid> 
<description>
<![CDATA[ 
	<p>python环境下使用</p>
<p><br />
RT</p>
<p>这个文件只能在登入之后下载。请先 <a href="http://holmesian.org/login.php?job=register">注册</a> 或 <a href="http://holmesian.org/login.php">登入</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p><br/>Tags - <a href="http://holmesian.org/tags/mysql/" rel="tag">mysql</a> , <a href="http://holmesian.org/tags/%25E4%25BB%25A3%25E7%25A0%2581/" rel="tag">代码</a> , <a href="http://holmesian.org/tags/0day/" rel="tag">0day</a>
]]>
</description>
</item>
</channel>
</rss>