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

<channel>
	<title>Mr. 21 &#187; 软言软语</title>
	<atom:link href="http://mr21.in/software/feed" rel="self" type="application/rss+xml" />
	<link>http://mr21.in</link>
	<description>KunMing &#124; SysAdmin &#124; Blogger &#124; G Fans</description>
	<lastBuildDate>Thu, 06 Oct 2011 09:23:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<atom:link rel='hub' href='http://mr21.in/?pushpress=hub'/>
		<item>
		<title>Convert .htaccess to nginx</title>
		<link>http://mr21.in/software/convert-htaccess-to-nginx.html</link>
		<comments>http://mr21.in/software/convert-htaccess-to-nginx.html#comments</comments>
		<pubDate>Fri, 10 Dec 2010 02:46:22 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=369</guid>
		<description><![CDATA[这篇，我稍微微博一下好了 …… 这么好的工具，不得不马克一下~ Link: http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ 不过据说有人因此Nginx起不来，大家慎用就是了…… -EOF... ]]></description>
			<content:encoded><![CDATA[<p>这篇，我稍微微博一下好了 …… 这么好的工具，不得不马克一下~</p>
<p>Link: <a href="http://www.anilcetin.com/convert-apache-htaccess-to-nginx/">http://www.anilcetin.com/convert-apache-htaccess-to-nginx/</a></p>
<p>不过据说有人因此Nginx起不来，大家慎用就是了……</p>
<p>-EOF-</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/convert-htaccess-to-nginx.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>小内存优化VPS的LNMP及fail2ban配置</title>
		<link>http://mr21.in/software/fail2ban-and-lnmp-configration-for-little-memory-vps.html</link>
		<comments>http://mr21.in/software/fail2ban-and-lnmp-configration-for-little-memory-vps.html#comments</comments>
		<pubDate>Tue, 07 Dec 2010 10:28:00 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Dropbear]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[LNMP]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=367</guid>
		<description><![CDATA[哈，大家好，21经过长时间的“沉没”，在这个寒冷的冬日怎么着也该冒泡泡以表无恙呀~ 话说，今天是二四节气中的“大雪”，够不上下雪条件的昆明便下起了稀里哗啦的雨，让21这个电动车... ]]></description>
			<content:encoded><![CDATA[<p>哈，大家好，21经过长时间的“沉没”，在这个寒冷的冬日怎么着也该冒泡泡以表无恙呀~ 话说，今天是二四节气中的“大雪”，够不上下雪条件的昆明便下起了稀里哗啦的雨，让21这个电动车男给冻的 …… 无法用言语形容的呀~</p>
<p>经过近半年时间，21手上开始掌握了一些廉价的VPS进行个人学习和实验，基本配置小至128M OpenVZ大至512M Xen都有，当然，买来以后闲置的时间稍微占多了点，不过由于<a href="http://www.Hawkhost.com">Hawkhost</a>空间12.6到期的刺激，我把<a href="http://mr21.in">Mr. 21</a>和<a href="http://75do.in">75%</a>都搬迁到其中一个512M Xen VPS上并且进行了相关的配置。本着内存能少用就少用、资源能节约就节约的原则，我进行了一些学习和模仿。</p>
<p>文中涉及到的操作基本上都需要root权限，且，21个人喜欢nano编辑器，如果你喜欢vi，稍微换一下命令就行。</p>
<h3>基础调配部分及LNMP</h3>
<p>由于21喜欢用Debian，于是参考了<a href="http://www.vpsee.com">VPSee</a>的文章《<a href="http://www.vpsee.com/2009/06/128mb-vps-optimize-centos5/">64MB VPS 上优化 Debian 5</a>》和<a href="http://www.lowendbox.com">LowEndBox</a>的《<a href="http://www.lowendbox.com/blog/wordpress-cheap-vps-lowendscript/">Bootstraping WordPress/Nginx/PHP/MySQL on a Cheap VPS with lowendscript</a>》，对VPS上的OpenSSH、 syslog-ng用Dropbear和inetutils-syslogd进行了替换，从基础上对资源占用进行了控制，大概操作如下：</p>
<ol>
OpenSSH、 syslog-ng的替换，我使用了LEB的lowendscript，在root用户下，如此操作便可：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>github.com<span style="color: #000000; font-weight: bold;">/</span>lowendbox<span style="color: #000000; font-weight: bold;">/</span>lowendscript<span style="color: #000000; font-weight: bold;">/</span>raw<span style="color: #000000; font-weight: bold;">/</span>master<span style="color: #000000; font-weight: bold;">/</span>setup-debian.sh
<span style="color: #c20cb9; font-weight: bold;">bash</span> setup-debian.sh system</pre></td></tr></table></div>

<p>如果你参考<a href="http://www.lowendbox.com/blog/wordpress-cheap-vps-lowendscript/">这里</a>，会发现LEB的这个脚本其实还可以安装LNMP里面的NMP(Nginx, MySQL, PHP)三个组件，但是我个人比较喜欢国人的<a href="http://lnmp.org">LNMP</a>，于是仅使用LES脚本进行了系统组件的替换。
</ol>
<p>之后，我安装LNMP 0.5（请参考<a href="http://lnmp.org/install.html">这里</a>）作为WEB服务器，并且进行了一些调整，这个调整请按照自己的需求就好。</p>
<ol>
<li>将Nginx的子线程调整为2个，方法如下：

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>nginx<span style="color: #000000; font-weight: bold;">/</span>conf<span style="color: #000000; font-weight: bold;">/</span>nginx.conf</pre></td></tr></table></div>

<p>找到worker_processes，将其改成下面的样子：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="text" style="font-family:monospace;">worker_processes 2;</pre></td></tr></table></div>

<p>然后按Ctrl+O保存，按Ctrl+X退出。</li>
<li>同时，我将PHP-FPM的子线程也调整为2个，方法如下：

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>php-fpm.conf</pre></td></tr></table></div>

<p>按Ctrl+W搜索max_children，改成下面这样的格式：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;value</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;max_children&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/value<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>然后按Ctrl+O保存，按Ctrl+X退出。再来重启nginx和php-fpm：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">invoke-rc.d nginx restart
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>php<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>php-fpm restart</pre></td></tr></table></div>

</li>
<li>关于这个……MYSQL的调优，这个……21表示个人水平不足，就不献丑了。</li>
</ol>
<h3>Fail2Ban调配部分</h3>
<p>这是一些比较基础的安全方面的调配。</p>
<ol>
<li>首先，是禁用root用户的ssh登录，由于我们已经用Dropbear替换了OpenSSH，所以跟一般教程针对OpenSSH的修改方式不太一样，大概方法如下：

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>xinetd.d<span style="color: #000000; font-weight: bold;">/</span>dropbear</pre></td></tr></table></div>

<p>然后把其中的server_args修改为如下样子</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;">    server_args     = -i -g</pre></td></tr></table></div>

<p>让 /etc/xinetd.d/dropbear 配置文件看起来像这样</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="conf" style="font-family:monospace;">service ssh
{
    socket_type     = stream
    only_from       = 0.0.0.0
    wait            = no
    user            = root
    protocol        = tcp
    server          = /usr/sbin/dropbear
    server_args     = -i -g
    disable         = no
}</pre></td></tr></table></div>

<p>然后按Ctrl+O保存，按Ctrl+X退出。<br />
<strong>-g</strong>的意思就是禁用root使用密码登录，但可以用公钥登录(public key)（请参考<a href="http://hostingfu.com/article/use-dropbear-ssh-to-save-memory">这里</a>）。<br />
然后重启Dropbear：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">invoke-rc.d xinetd restart</pre></td></tr></table></div>

</li>
<li>
禁用了root账户登录，但是21在某些特定的没有公钥情况下又需要登录SSH，怎么办呢？增加一个普通用户就好了，这个用户不用具备什么特殊权限，只要能登录SSH足矣，大概操作如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">useradd <span style="color: #7a0874; font-weight: bold;">&#91;</span>username<span style="color: #7a0874; font-weight: bold;">&#93;</span> <span style="color: #660033;">-p</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span>password<span style="color: #7a0874; font-weight: bold;">&#93;</span></pre></td></tr></table></div>

<p>将<strong>[username]</strong>替换为你想要的用户ID（注：不能为纯数字），<strong>[password]</strong>替换为想要的密码便可。<br />
之后我们以<strong>[username]</strong>登录系统，然后输入<strong>su root</strong>，再输入root密码便可以切换到root用户的shell。<br />
推荐不要使用太简单的ID，比如a/ab/abc什么的，为什么？后面告诉你。
</li>
</ol>
<p><span id="more-367"></span>好了，虽然21禁用了root用户的登录，但是还有个无法避免的问题：暴力猜解，如果我们使用了够简单的ID，例如a/ab/abc之类的，那么很容易被锁定为爆破目标，那我就是喜欢a这个ID怎么办呢？好吧，那只好来点稍微强硬点的措施了，21用fail2ban。fail2ban可以监视你的系统或者应用日志，然后匹配日志的错误信息（正则式匹配）执行iptables屏蔽策略，把某IP的包扔掉，fail to ban~</p>
<p>Fail2ban本身已经内置了不少应用的判断规则了</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> fail2ban <span style="color: #000000; font-weight: bold;">//</span>安装fail2ban
<span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fail2ban<span style="color: #000000; font-weight: bold;">/</span>filter.d<span style="color: #000000; font-weight: bold;">/</span>
apache-auth.conf      apache-overflows.conf  couriersmtp.conf  gssftpd.conf        postfix.conf    qmail.conf      sshd.conf         wuftpd.conf
apache-badbots.conf   common.conf            named-refused.conf  proftpd.conf    sasl.conf       vsftpd.conf       xinetd-fail.conf  apache-noscript.conf
courierlogin.conf     exim.conf              pam-generic.conf    pure-ftpd.conf  sshd-ddos.conf  webmin-auth.conf</pre></td></tr></table></div>

<p>但是我们已经把SSH服务换成了Dropbear，把日志服务换成了inetutils-syslogd，那fail2ban会不会水土不服呢？<br />
哈，这简直是必须的~</p>
<p>我们需要做点工作让fail2ban能适应我们这个精简过的系统，适应Dropbear的错误日志。</p>
<ol>
<li>
首先，Fail2ban需要监视Dropbear的用户登录日志，但是替换成inetutils-syslogd以后，21发现自己的 /var/log/auth.log.1 （没错，我的不是auth.log，是auth.log.1）停滞在某年某月某日了~ 于是稍微看了一下 /var/log/messages 发现里面有我需要的信息，我把它登录信息分离出来方便Fail2ban的读取，如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>syslog.conf</pre></td></tr></table></div>

<p>默认内容如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="config" style="font-family:monospace;">*.*;mail.none;cron.none -/var/log/messages
cron.*                  -/var/log/cron
mail.*                  -/var/log/mail</pre></td></tr></table></div>

<p>增加一个句子将登录信息分离出来，修改为</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="config" style="font-family:monospace;">*.*;mail.none;cron.none -/var/log/messages
cron.*                  -/var/log/cron
mail.*                  -/var/log/mail
authpriv.*              /var/log/auth.log</pre></td></tr></table></div>

<p>到此为止我们拥有了一个单独的包含Dropbear登录信息的日志文件 /var/log/auth.log。</li>
<li>
接下来我们设置Fail2ban，按照常规对SSH进行防御的教程，说的都是针对OpenSSH的设置和判断规则，而显然Dropbear是被遗忘的，甚至Debian的Bug Report里面都有人提到<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546913">这样的问题</a>，当然，也有人帮忙<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546913#5">解决</a>这样的问题，大牛总是有的~</p>
<p>首先，我们需要下载一个针对Dropbear的判断策略文件，如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=dropbear.conf;att=1;bug=546913&quot;</span> <span style="color: #660033;">-O</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fail2ban<span style="color: #000000; font-weight: bold;">/</span>filter.d<span style="color: #000000; font-weight: bold;">/</span>faidropbear.conf</pre></td></tr></table></div>

<p>然后，在fail2ban的配置里面增加对dropbear的监视和动作：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fail2ban<span style="color: #000000; font-weight: bold;">/</span>jail.conf</pre></td></tr></table></div>

<p>按Ctrl+V一直翻页到最下面空白处，增加以下内容</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="config" style="font-family:monospace;">[ssh-iptables]
enabled  = true
port = ssh
filter   = dropbear
logpath  = /var/log/auth.log</pre></td></tr></table></div>

<p>然后按Ctrl+O保存，按Ctrl+X退出，之后，便是我们的收尾动作了，执行</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">invoke-rc.d fail2ban restart</pre></td></tr></table></div>

</li>
</ol>
<p>完事儿了。</p>
<p>引用参考：<br />
1. Google: <a href="http://www.google.com/ncr">http://www.google.com/ncr</a><br />
2. Debian Bug Report: <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546913">http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546913</a><br />
3. LowEndBox: <a href="http://www.lowendbox.com/blog/wordpress-cheap-vps-lowendscript/">http://www.lowendbox.com/blog/wordpress-cheap-vps-lowendscript/</a><br />
4. VPSee: <a href="http://www.vpsee.com/2009/06/64mb-vps-optimize-debian5/">http://www.vpsee.com/2009/06/64mb-vps-optimize-debian5/</a><br />
5. HostingFu: <a href="http://hostingfu.com/article/use-dropbear-ssh-to-save-memory">http://hostingfu.com/article/use-dropbear-ssh-to-save-memory</a><br />
6. Easy Firewall Generator: <a href="http://easyfwgen.morizot.net/gen/">http://easyfwgen.morizot.net/gen/</a></p>
<p>- EOF-</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/fail2ban-and-lnmp-configration-for-little-memory-vps.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MacBook Pro &#8211; Fan Control</title>
		<link>http://mr21.in/software/macbook-pro-fan-control.html</link>
		<comments>http://mr21.in/software/macbook-pro-fan-control.html#comments</comments>
		<pubDate>Sun, 22 Aug 2010 13:33:01 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Fan]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[MBP]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=365</guid>
		<description><![CDATA[这篇文章主要介绍了在Mac OS X、Ubuntu Lucid和Windows 7三个系统平台下对MacBook Pro（以下简称：MBP）的风扇控制，因为不知道为什么的原因，我个人和不少人的MBP都表现出风扇调速迟钝的问题，通常... ]]></description>
			<content:encoded><![CDATA[<p>这篇文章主要介绍了在Mac OS X、Ubuntu Lucid和Windows 7三个系统平台下对MacBook Pro（以下简称：MBP）的风扇控制，因为不知道为什么的原因，我个人和不少人的MBP都表现出风扇调速迟钝的问题，通常都是2000RPM左右，然后等到机器超过90摄氏度后风扇开始提速到6000RPM进行散热，但这个肯定不是我们需要的效果，我们要的是，要么自己控制，要么自动调整。</p>
<h3>Mac OS X</h3>
<div class="imgdivimg2"><a href="http://www.zooomr.com/photos/cmb/9406199/" title="Photo Sharing"><img src="http://static.zooomr.com/images/9406199_0937fd75d4_m.jpg" width="240" height="81" /></a></div>
<p>这个身为MBP原生的，与硬件契合度最高的系统同样存在风扇自动调整的问题，至少在我重置了N次SMC的情况依然还是只能达到90度附近才会提速，于是只能用软件来对付了，我个人觉得效果比较好的是<strong>Fan Control</strong>。</p>
<p>名称：Fan Control<br />
系统：Leopard, Snow Leopard<br />
下载：<a href="http://www.lobotomo.com/products/FanControl/">http://www.lobotomo.com/products/FanControl/</a></p>
<p>安装之后，会在“系统偏好设置”里面增加一个叫“Fan Control”的设置面板。<br />
<img src="http://www.lobotomo.com/products/FanControl/images/screenshot.gif" alt="" /><br />
进去之后三项设置，<br />
Base Speed，初始速度，系统默认是2000RPM，系统启动之后会以这个初始速度为基准；<br />
Lower Threshold，温度下限阀值，这个是配合Base Speed工作的，在这个温度下，转速是Base Speed；<br />
Upper Threshold，温度上限阀值，这个是值达到时系统将以最高转速跑风扇，我的MBP 13是6200。<br />
风扇的转速会自动在Lower和Upper之间自动调整。<span id="more-365"></span></p>
<h3>Ubuntu Lucid (10.04)</h3>
<p>遇到Linux有个好处，直接修改配置文件就行，可以省掉软件了，但是这个没法进行曲线调速了，所以通常我都是直接把速度一步到位直接上到5500RPM，喜欢6000RPM的也行，反正风扇的作用就是处理积热嘛，往高处提一下没有坏处的~</p>
<p>操作如下：<br />
开启终端（Terminal），输入以下指令，之后需要输入你当前用户的密码，然后回车，</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> <span style="color: #660033;">-c</span> <span style="color: #ff0000;">&quot;echo 5000 &gt; /sys/devices/platform/applesmc.768/fan1_min&quot;</span></pre></td></tr></table></div>

<p>通过修改fan1_min中的数字“1”，可以调整各个不同风扇的转速，因为MBP 13只有一个风扇，所以也只有fan1，像MBP 15这一类的，可以分别调整fan1和fan2的转速等。并且每次开机的话系统都会自动重置，所以如果需要每次开机都保持一个转速的话，可以自行修改rc脚本。</p>
<h3>Windows 7</h3>
<p>在Windows下也是需要依靠第三方软件的，据说是有类似于OSX下Fan Control那样的自动调速软件，不过我个人还是比较喜欢把速度调整到5500左右，一次性解决问题。软件叫“Mac/SMC Fan Control for Windows (+ Temp) ”。</p>
<p>名称：Mac/SMC Fan Control for Windows (+ Temp)<br />
平台：32-bit MS Windows (NT/2000/XP), 64-bit MS Windows, Vista, WinXP.<br />
下载：<a href="http://sourceforge.net/projects/macfan/">http://sourceforge.net/projects/macfan/</a></p>
<p>官方没有提到Win7，但是我的Win7-64bit也没有问题的。这是一个基于CLI（CommandLine Interface，命令行界面）的程序，而且同时还需要管理员权限，还要带参数，使用起来稍微有点麻烦，我个人是这么处理的：</p>
<ol>
<li>首先将解压缩后的文件放在\windows\mf目录；</li>
<li>同时在目录里面增加一个批处理文件<strong>mf.cmd</strong>，内容如下：

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="txt" style="font-family:monospace;">@echo off
@echo Input the fan speed (2000-6200): 
set /p speed=
C:\Windows\mf\MacFanx64.exe %speed%</pre></td></tr></table></div>

</li>
<li>之后按住Alt键，把<strong>mf.cmd</strong>拖到桌面上，之后在mf.cmd上右键，选择“属性”，选择“快捷方式”页面，点击“高级”，之后把“以管理员权限运行”勾上。</li>
<li>双击桌面上的“mf.cmd &#8211; 快捷方式”，之后输入你想要调整的风扇转速，回车即可。</li>
</ol>
<p>因为我的是MBP 13，只有一个风扇，所以只需要提供一个参数，如果有多个风扇的话，请依据自己的需要进行修改，按照Mac/SMC Fan Control for Windows (+ Temp) 的说明文件提到的，用法大概如下：</p>
<ul>MacFan.exe &lt;Desired RPM for Fan 1> &lt;Desired RPM for Fan 2 (if applicable)> &lt;Desired RPM for Fan 3 (if applicable)> &lt;Desired RPM for Fan 4 (if applicable)></ul>
<p>基本上，还是不太建议在MBP上使用其它系统，毕竟efi现在还是不能被其它系统较好地支持。不过像我这种爱折腾的人和不少披着MBP的皮WIN的心的人，这样的速度调整还是有必要的，希望这篇文章能帮到你。</p>
<p>引用参考：<br />
Fan Control: <a href="http://www.lobotomo.com/products/FanControl/">http://www.lobotomo.com/products/FanControl/</a><br />
MacFan: <a href="http://sourceforge.net/projects/macfan/">http://sourceforge.net/projects/macfan/</a><br />
Ubuntu Forum: <a href="http://ubuntuforums.org/showthread.php?t=1378663">http://ubuntuforums.org/showthread.php?t=1378663</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/macbook-pro-fan-control.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>解决SSH断线后的会话恢复</title>
		<link>http://mr21.in/software/using-screen-when-connecting-to-linux-servers-with-ssh.html</link>
		<comments>http://mr21.in/software/using-screen-when-connecting-to-linux-servers-with-ssh.html#comments</comments>
		<pubDate>Fri, 09 Jul 2010 06:48:46 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=358</guid>
		<description><![CDATA[最近从vpsee\酷胖等博客看到的信息，购买了好几个廉价的VPS在学习，于是就产生了不少基于SSH的困扰，而掉线重连的会话丢失算是一个 …… 感谢GG大神的帮助，我找到了这个工具：screen。 简单... ]]></description>
			<content:encoded><![CDATA[<p>最近从<a href="http://www.vpsee.com/">vpsee</a>\<a href="http://www.whcoupon.com/">酷胖</a>等博客看到的信息，购买了好几个廉价的VPS在学习，于是就产生了不少基于SSH的困扰，而掉线重连的会话丢失算是一个 ……</p>
<p>感谢GG大神的帮助，我找到了这个工具：<strong>screen</strong>。<br />
简单的说，就是这个工具会接管你当前的console会话，然后当前控制台显示的输入/输出就由它负责，如果你掉线后，只要重新启用screen，就是恢复到之前的状态。大概的操作流程如下：</p>
<ol>
<li>以SSH的方式连接你的服务器</li>
<li>安装Screen；<br />
	<strong>debian/ubuntu:</strong> apt-get install screen<br />
	<strong>fedora/centos:</strong> yum install screen</li>
<li>输入<strong style="color:blue;">screen</strong>接管当前会话；</li>
<li>进行自己需要的任何操作；</li>
<li>SSH掉线；</li>
<li>重连SSH并输入<strong style="color:blue;">screen -r</strong>恢复会话；</li>
<li>可以在.bash_profile里加一行<br />
<span style="color:blue;">alias r=&#8217;screen -d `screen -ls |grep Attached|cut -f2|cut -f1 -d&#8221;.&#8221;`;screen -r `screen -ls |grep Detached|cut -f2|cut -f1 -d&#8221;.&#8221;`&#8217;</span><br />
能够方便的切回screen窗口（假设只开了一个screen）。</li>
</ol>
<p>恩，不是啥复杂的东西，但是能解决不小的困扰。</p>
<p>内容引用参考：<br />
雨中的高速公路 &#8211; 《<a href="http://www.rainway.org/2008/05/22/using-screen-when-connecting-to-linux-servers/">在ssh终端下如何解决断线带来的困扰</a>》。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/using-screen-when-connecting-to-linux-servers-with-ssh.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>自制RHEL5 DVD安装盘</title>
		<link>http://mr21.in/software/making-rhel-5-dvd-iso.html</link>
		<comments>http://mr21.in/software/making-rhel-5-dvd-iso.html#comments</comments>
		<pubDate>Sun, 21 Mar 2010 10:44:11 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CD]]></category>
		<category><![CDATA[DVD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=338</guid>
		<description><![CDATA[最近在学习Red Hat方面的管理，一般来说我们比较容易获取的是RHEL(Red Hat Enterprise Linux)的CD版介质（比如国内的Lupaworld镜像），不过一共6CD安装起来的替换也是很麻烦，我找到一个教程与大家共... ]]></description>
			<content:encoded><![CDATA[<p>最近在学习Red Hat方面的管理，一般来说我们比较容易获取的是RHEL(Red Hat Enterprise Linux)的CD版介质（比如国内的<a href="http://mirror.lupaworld.com/rhel/5/">Lupaworld镜像</a>），不过一共6CD安装起来的替换也是很麻烦，我找到一个教程与大家共享。</p>
<p>文章来源：<a href="http://www.mind-download.com/2007/07/making-rhel-5-dvd-iso.html">Mind Download</a><br />
本教程是基于Linux shell的操作，Unix-like通用，Windows请看文后简述。</p>
<p><strong>一、首先下载6张CD，（借用lupaworld）</strong></p>
<blockquote><p>
32位安装盘<br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-i386-disc1.iso">rhel-server-5.3-i386-disc1.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-i386-disc2.iso">rhel-server-5.3-i386-disc2.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-i386-disc3.iso">rhel-server-5.3-i386-disc3.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-i386-disc4.iso">rhel-server-5.3-i386-disc4.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-i386-disc5.iso">rhel-server-5.3-i386-disc5.iso</a><br />
64位安装盘<br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-x86_64-disc1.iso">rhel-server-5.3-x86_64-disc1.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-x86_64-disc2.iso">rhel-server-5.3-x86_64-disc2.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-x86_64-disc3.iso">rhel-server-5.3-x86_64-disc3.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-x86_64-disc4.iso">rhel-server-5.3-x86_64-disc4.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-x86_64-disc5.iso">rhel-server-5.3-x86_64-disc5.iso</a><br />
<a href="http://mirror.lupaworld.com/rhel/5/rhel-server-5.3-x86_64-disc6.iso">rhel-server-5.3-x86_64-disc6.iso</a>
</p></blockquote>
<p><strong>二、建立6个临时目录，同时挂载6个ISO文件。</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-client-i386-disc1.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-client-i386-disc2.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-client-i386-disc3.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-client-i386-disc4.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-client-i386-disc5.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-client-i386-disc6.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6</pre></td></tr></table></div>

<p><strong>三、修改相关的光盘配置文件</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>isolinux <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>.discinfo .
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +<span style="color: #c20cb9; font-weight: bold;">w</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>isolinux.bin
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>boot.cat</pre></td></tr></table></div>

<p>编辑复制过来的当前目录的.discinfo文件（<strong>nano .discinfo</strong>或<strong>gedit .discinfo</strong>），效果如下（不一定完全一样）：</p>
<blockquote><p>
1170972087.594754<br />
Red Hat Enterprise Linux Client 5<br />
i386<br />
1,2,3,4,5,6 &lt;-主要是修改这里的<strong>1</strong>为现在的<strong>1,2,3,4,5,6</strong><br />
Client/<br />
VT/<br />
Workstation/
</p></blockquote>
<p><strong>四、合并6个CD镜像并写入新的配置文件，生成DVD ISO镜像，红色的是卷标名称，请自定义。</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">mkisofs <span style="color: #660033;">-v</span> <span style="color: #660033;">-pad</span> <span style="color: #660033;">-o</span> RHEL5-x86_64-DVD.iso <span style="color: #660033;">-V</span> <span style="color: #ff0000;">&quot;RHEL5-x86_64-DVD&quot;</span> <span style="color: #660033;">-b</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>isolinux.bin <span style="color: #660033;">-c</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>boot.cat <span style="color: #660033;">-no-emul-boot</span> <span style="color: #660033;">-boot-load-size</span> <span style="color: #000000;">4</span> <span style="color: #660033;">-boot-info-table</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-R</span> <span style="color: #660033;">-T</span> <span style="color: #660033;">-m</span> TRANS.TBL <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>.discinfo <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>isolinux <span style="color: #660033;">-graft-points</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1 .discinfo=.discinfo isolinux<span style="color: #000000; font-weight: bold;">/</span>=isolinux <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6<span style="color: #000000; font-weight: bold;">/</span>Server</pre></td></tr></table></div>

<p><strong>五、扫尾工作</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> .discinfo</pre></td></tr></table></div>

<p><strong>六、Windows怎么办？</strong><br />
呃，实际上我没有试过，但是我推断，只要把所有的ISO解压后复制到同一目录下（可覆盖同名文件），然后编辑.discinfo文件（如第三步那样），然后用WinISO或者UltraISO创建一个DVD文件，引导文件使用文件目录下的“isolinux/isolinux.bin”文件，并删除“isolinux/boot.cat”文件，然后保存ISO，应该可以，不过，建议尽量使用linux。</p>
<p><strong>七、其它</strong><br />
实际上，RedHat官方就提供了DVD文件，只要注册一个RHN试用30天的帐户就可以下载，这个仅供大家参考。<br />
同时，原作者提供了一个bash脚本用来处理这个过程，只要跟几个镜像放在同一目录下执行就是，文件内容如下：<span id="more-338"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5
<span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-server-x86_64-disc1.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-server-x86_64-disc2.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-server-x86_64-disc3.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-server-x86_64-disc4.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-server-x86_64-disc5.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5
<span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-o</span> ro,loop rhel-<span style="color: #000000;">5</span>-server-x86_64-disc6.iso <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6
<span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-a</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>isolinux <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>.discinfo .
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +<span style="color: #c20cb9; font-weight: bold;">w</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>isolinux.bin
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-f</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>boot.cat
<span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/1$/1,2,3,4,5,6/g'</span> .<span style="color: #000000; font-weight: bold;">/</span>.discinfo <span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>.discinfo
mkisofs <span style="color: #660033;">-v</span> <span style="color: #660033;">-pad</span> <span style="color: #660033;">-o</span> RHEL5-x86_64-DVD.iso <span style="color: #660033;">-V</span> <span style="color: #ff0000;">&quot;RHEL5-x86_64-DVD&quot;</span> <span style="color: #660033;">-b</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>isolinux.bin <span style="color: #660033;">-c</span> isolinux<span style="color: #000000; font-weight: bold;">/</span>boot.cat <span style="color: #660033;">-no-emul-boot</span> <span style="color: #660033;">-boot-load-size</span> <span style="color: #000000;">4</span> <span style="color: #660033;">-boot-info-table</span> <span style="color: #660033;">-r</span> <span style="color: #660033;">-R</span> <span style="color: #660033;">-T</span> <span style="color: #660033;">-m</span> TRANS.TBL <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>.discinfo <span style="color: #660033;">-x</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1<span style="color: #000000; font-weight: bold;">/</span>isolinux <span style="color: #660033;">-graft-points</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1 .discinfo=.discinfo isolinux<span style="color: #000000; font-weight: bold;">/</span>=isolinux <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5<span style="color: #000000; font-weight: bold;">/</span>Server <span style="color: #007800;">Server</span>=<span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6<span style="color: #000000; font-weight: bold;">/</span>Server
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp1
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp2
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp3
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp4
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp5
<span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp6
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>mnt<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #000000;">1</span>,<span style="color: #000000;">2</span>,<span style="color: #000000;">3</span>,<span style="color: #000000;">4</span>,<span style="color: #000000;">5</span>,<span style="color: #000000;">6</span><span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> .discinfo</pre></td></tr></table></div>

<p>保存为sh文件后，使用<strong>sh 脚本名称</strong>，或者<strong>./脚本名称</strong>的方式执行即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/making-rhel-5-dvd-iso.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows to MacOSX</title>
		<link>http://mr21.in/software/win-to-mac.html</link>
		<comments>http://mr21.in/software/win-to-mac.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:10:05 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[MacBook]]></category>
		<category><![CDATA[MBP]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=328</guid>
		<description><![CDATA[新近购置了MacBook Pro MB990，正式开始接触Mac OS X了。 自从有电脑开始，接触各种不同的系统就是我的一大爱好和谈资，不过实际上能做到实际应用的也就只有Windows了，环境使然，而这次购入的MB... ]]></description>
			<content:encoded><![CDATA[<p>新近购置了MacBook Pro MB990，正式开始接触Mac OS X了。<br />
自从有电脑开始，接触各种不同的系统就是我的一大爱好和谈资，不过实际上能做到实际应用的也就只有Windows了，环境使然，而这次购入的MBP的，我坚持不使用BootCamp，直接就把硬盘分区两个（这会导致你无法使用BootCamp安装Windows），不过为了网银还是安装了一个PD5（Parallel Desktop 5），基本上没有遇到多少障碍，这篇文字的目的就是稍微总结一下自己从Windows迁移到MacOSX后使用上的一些习惯变更和两个系统上的不同，不过不会太深层。</p>
<p>以下是记录内容，会不断更新，就不新开Post了，因为近似于草稿，会有些混乱，见谅 <img src='http://mr21.in/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<h3><strong>Tips 1. 关于常用按键</strong></h3>
<p>MBP的键盘上相比于PC本子，少了不少常用的按键，即使这些按键我不认为是PC专用的，但实际上就是没有，并且明确的组合键提示也没有，所以记录一下。</p>
<blockquote><p>
<img src="http://static.zooomr.com/images/8955014_4e6fa3573f_o.png" width="432" height="243" alt="屏幕快照 2010-03-01 下午09.03.31" /></p>
<p>补充：<br />
Control + 上 / 下 = 上一页 / 下一页<br />
Control + 左 / 右 = 光标定位在该行开头 / 结尾<br />
Option + 左 / 右 = 光标向左 / 右移动一个词<br />
Option + 上 / 下 = 光标定位在该段开头 / 结尾<br />
Option + Delete = 删除前面的一个词<br />
Command + Delete = 删除该行处于光标前的所有字符<br />
引用自：<a href="http://www.tip4mac.com/2011/01/hotkeys-for-position-the-cursor/">http://www.tip4mac.com/2011/01/hotkeys-for-position-the-cursor/</a>
</p></blockquote>
<p>比较奇特的是，不是每个软件都管用的， 不过至少在Firefox是这样用的，<br />
然后在textedit.app里面的话，Shift+Fn+← 可以实现选中当前文字到顶端的效果。<br />
<span id="more-328"></span></p>
<h3><strong>Tips 2. 让F1~F12正常用，还有Tab</strong></h3>
<div class="imgdivimg2"><a href="http://www.zooomr.com/photos/cmb/8956957/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8956957_1f6267b23e_m.jpg" width="240" height="132" alt="屏幕快照 2010-03-02 下午07.13.47" /></a></div>
<p>我承认这12个按键其实我更喜欢以苹果功能键的方式出现，音量控制、键盘背光、屏幕亮度、Dashboard我都用得非常频繁，但是也有人喜欢以F键出现，那就F键好了，设置一下就行了。</p>
<p><strong>系统偏好设置 -> 键盘 -> 键盘</strong>，选择“<strong>将F1、F2等键用做标准功能键</strong>”，钩上就行，放心，虽然示例说的是F1、F2，实际上是针对所有F键的，搞定。<br />
这样的设置，在不用BootCamp、装虚拟机Windows的情况下比较实用，毕竟我还是非常习惯Ctrl+F5搞强制刷新，F2更名，F3搜索，F6切换选择域的。</p>
<p>顺便说一下，默认情况下，<strong>Tab键</strong>你会发现很难用，大多数地方都按了没反应，ok，这么操作，<strong>Fn+Control+F7</strong>，按一下就行，然后Tab就会变得很好用了。</p>
<h3><strong>Tips 3. Safari新链接用Tab开启</strong></h3>
<p>打开终端，输入以下命令即可</p>
<blockquote><p><strong>defaults write com.apple.Safari TargetedClicksCreateTabs -bool true</strong></p></blockquote>
<p>Safari3/4适用，主要是实现链接由标签打开，并且鼠标中键 (Middle-Button) 点击也是开新的Tabs.<br />
Btw, 喜欢一个程序多个窗口的，可以 <strong>Cmd+`</strong> （数字1左边那个）在不同窗口间切换，Cmd+Tab则是切换程序的。</p>
<h3><strong>Tips 4. TouchPad 3指轻触 = 鼠标中键</strong></h3>
<p>MiddleClick, link: <a href="http://clement.beffa.org/labs/projects/middleclick/">http://clement.beffa.org/labs/projects/middleclick/</a></p>
<p>这个软件比较适合我，我非常喜欢用鼠标用中键把链接从新Tab打开，但是触摸板明显不具备这个功能，每次都是双指开启辅助菜单后，再选择。使用MiddleClick后，会在菜单栏上有个“三个点”的ICON，说明启动了，这个时候，<strong>用三个手指轻触触摸板</strong>，可以实现鼠标中键功能。建议添加到<strong>登录项</strong>。</p>
<p>感谢<a href="http://www.appinn.com/middleclick/">小众软件</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/win-to-mac.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>雪豹内置读写NTFS-NTFS Mounter</title>
		<link>http://mr21.in/software/ntfs-mounter-with-snow-leopard-inside-function.html</link>
		<comments>http://mr21.in/software/ntfs-mounter-with-snow-leopard-inside-function.html#comments</comments>
		<pubDate>Tue, 16 Feb 2010 15:04:26 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[NTFS]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Snow Leopard]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=331</guid>
		<description><![CDATA[名称：NTFS Mounter 平台：Mac OS X 10.6.2 and before. 下载：http://ntfsmounter.com/ 介绍：虽然雪豹内嵌了ntfs的读写功能，但是官方并没有直接给出使用方法，这个小工具通过调用内置的ntfs读写功能来实现n... ]]></description>
			<content:encoded><![CDATA[<p>名称：NTFS Mounter <span style="float:right;"><img src="http://ntfsmounter.com/logo.png" alt="" /></span><br />
平台：Mac OS X 10.6.2 and before.<br />
下载：<a href="http://ntfsmounter.com/">http://ntfsmounter.com/</a><br />
介绍：虽然雪豹内嵌了ntfs的读写功能，但是官方并没有直接给出使用方法，这个小工具通过调用内置的ntfs读写功能来实现ntfs分区的读写，支持系统硬盘上的分区与移动硬盘。</p>
<blockquote><p><strong>使用方法简述：</strong></p>
<p><strong>Step. 1</strong><br />
下载的app拖放到任何地方，执行，然后在菜单栏就会有以下图标：<br />
<a href="http://www.zooomr.com/photos/cmb/8919150/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8919150_d8c8a5aa4d_s.jpg" width="25" height="25" alt="ntfs1" /></a></p>
<p><strong>Step. 2</strong><br />
点击这个猫头，会自动识别你磁盘上或者移动硬盘上的ntfs分区，选择该分区就会执行“挂载为可读写”（remount to rewritable），如果没有ntfs分区，则显示下图：<br />
<a href="http://www.zooomr.com/photos/cmb/8919151/" title="Photo Sharing"><img src="http://static.zooomr.com/images/8919151_beedd6c916_o.png" width="235" height="121" alt="ntfs2" style="margin-left:-27px;" /></a></p>
<p><strong>Step. 3</strong><br />
移除方式跟常规的办法一样。</p></blockquote>
<p><del datetime="2010-02-18T19:17:08+00:00"><strong>注意：</strong>在非Windows系统下读写ntfs分区是一件比较危险的事情，不建议频繁使用。</del><br />
根据kyt30留言，我搜索了ntfs3g相关的资讯，基本上来，比较安全稳定可信，而Mac OS X在雪豹(Snow Leopard)之前的版本大多数人也是喜欢通过ntfs3g或者paragon ntfs来解决ntfs格式的读写问题的，总体来看也是问题不多。并且，SL内置的NTFS读写功能确实存在一定的缺陷，会弄坏你的FAT(文件分配表)，让你的系统找不到任何文件（不论是SL还是Windows），这个功能还是偶尔一用就好了，如果长期需要使用ntfs分区格式的读写，建议安装ntfs3g或者paragon ntfs。</p>
<p>如果你开启了SL内置的读写并且发生了FAT损坏的情况，请移步Windows，执行“开始，运行”，填入“<strong>chkdsk 盘符 /f</strong>”，一般来说可以恢复的。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/ntfs-mounter-with-snow-leopard-inside-function.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Nero 9 &#8211; Free version</title>
		<link>http://mr21.in/software/nero-9-free-version.html</link>
		<comments>http://mr21.in/software/nero-9-free-version.html#comments</comments>
		<pubDate>Wed, 05 Aug 2009 03:11:04 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[nero]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[免费]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=290</guid>
		<description><![CDATA[Nero相当厚道的推出了免费版本的Nero 9，来自官方的说明： Nero 9 &#8211; Free version What’s better than free? Free forever! Nero offers you the chance to enjoy Nero’s world-renowned data disc burning and copying features for an un... ]]></description>
			<content:encoded><![CDATA[<p>Nero相当厚道的推出了免费版本的Nero 9，来自官方的说明：</p>
<blockquote><p>
<strong>Nero 9 &#8211; Free version</strong></p>
<p>What’s better than free? Free forever! Nero offers you the chance to enjoy Nero’s world-renowned<br />
data disc burning and copying features for an unlimited time, absolutely FREE!</p>
<p>Enjoy basic data burning and copying capabilities for your CDs and DVDs from the world’s most<br />
trusted digital media brand, Nero.
</p></blockquote>
<p>看来终于可以挣脱使用D版Nero的困扰了！<br />
虽然我知道可以替代它的软件非常非常之多，但是周围能像我这样使用非常非常之多的不同UI不同设置的软件的人不多——是的，我必须迁就这些大众们。<br />
同时，不得不说，Nero确实是一款非常优秀的软件，虽然自从nero 7以后，身材越来越臃肿——具备了很多平时我们不需要的功能，比如Nero ShowTime抢了我的媒体文件关联我就很不高兴……但是，依然推荐，特别是这款免费版，只剩下烧录功能了，非常棒！</p>
<p>当然，如果需要烧录之外的功能，推荐使用Nero 9完整版，至于完整什么版，XX或YY版，自己选择咯~</p>
<p>虽然近期有购买MacBook Pro的计划，但是现在依然关注Windows软件。 <img src='http://mr21.in/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
但事实上，我仅推荐使用合法授权的软件，不论是商业软件还是免费软件抑或是共享软件，作者需要我们的尊重。</p>
<p><strong>Download info from Nero offical website:</strong><br />
Download Page: <a href="http://www.nero.com/eng/downloads-nero9-free.php">http://www.nero.com/eng/downloads-nero9-free.php</a> (need your mail)<br />
Download Link: <a href="http://ftp22.nero.com/Nero9/79a1617ac1f8b22196e2c6ed2724df74/Nero-9.4.12.3_free.exe">http://ftp22.nero.com/Nero9/79a1617ac1f8b22196e2c6ed2724df74/Nero-9.4.12.3_free.exe</a></p>
<blockquote><p><strong>About the file &#8220;Nero-9.4.12.3_free.exe&#8221;</strong><br />
Version  9.4.12.3<br />
Release Date  July 30, 2009<br />
File Size  55 MB (57.187.288 bytes)<br />
MD5 checksum  11c83041227b73c0c490ffe16a5d65c3</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/nero-9-free-version.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>在CentOS 5下安装VirtualBox客户端增强功能</title>
		<link>http://mr21.in/software/how-to-install-centos-5-under-virtualbox-guest-additions.html</link>
		<comments>http://mr21.in/software/how-to-install-centos-5-under-virtualbox-guest-additions.html#comments</comments>
		<pubDate>Wed, 08 Jul 2009 07:08:21 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=281</guid>
		<description><![CDATA[今天在VirtualBox里面安装CentOS 5.3，当需要安装增强功能的时候，提示： Please install the build and header files for your current Linux kernel. 于是参考放飞时空的此PO完美解决，将命令汇总如下： 1 2 3 4 yum inst... ]]></description>
			<content:encoded><![CDATA[<p>今天在VirtualBox里面安装CentOS 5.3，当需要安装增强功能的时候，提示：</p>
<blockquote><p>Please install the build and header files for your current Linux kernel.</p></blockquote>
<p>于是参考<a href="http://www.080909.com/wordpress/">放飞时空</a>的<a href="http://www.080909.com/wordpress/2009/02/how-to-install-centos-5-under-virtualbox-client-enhancements/">此PO</a>完美解决，将命令汇总如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">yum <span style="color: #c20cb9; font-weight: bold;">install</span> kernel-devel
yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span>
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>kernels<span style="color: #000000; font-weight: bold;">/</span>2.6.18-92.1.18.el5-i686 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>linux
<span style="color: #c20cb9; font-weight: bold;">sh</span> VBoxLinuxAdditions-x86.run</pre></td></tr></table></div>

<p>参考：<br />
放飞时空： <a href="http://www.080909.com/wordpress/2009/02/how-to-install-centos-5-under-virtualbox-client-enhancements/">http://www.080909.com/wordpress/2009&#8230;&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/how-to-install-centos-5-under-virtualbox-guest-additions.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>服务器监测和实时SMS警报的思路</title>
		<link>http://mr21.in/software/server-monitor-and-sms-realtime-notify.html</link>
		<comments>http://mr21.in/software/server-monitor-and-sms-realtime-notify.html#comments</comments>
		<pubDate>Fri, 12 Jun 2009 07:13:29 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[2000]]></category>
		<category><![CDATA[A1Monitor]]></category>
		<category><![CDATA[Fetion]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[SMS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[实时警报]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=274</guid>
		<description><![CDATA[一直以来， 我手下的一台运行着ASP应用的Win2000服务器总是访问数据库会莫名其妙锁死， 然后用户端访问的页面就提示：数据库查询错误，编码AXXX； 最终分析下来的原因是ASP程序本身的问题，... ]]></description>
			<content:encoded><![CDATA[<p>一直以来，<br />
我手下的一台运行着ASP应用的Win2000服务器总是访问数据库会莫名其妙锁死，<br />
然后用户端访问的页面就提示：<strong>数据库查询错误，编码AXXX</strong>；<br />
最终分析下来的原因是ASP程序本身的问题，所以每次都要人工去执行<strong>iisreset</strong>释放，</p>
<p>而我又不会ASP且开发方对这个缺陷的改进意见总是支支吾吾的，<br />
每次出故障都是同事打电话过来提醒然后我再连接上服务器去执行重置，因为我不太用那个东西……<br />
但老这样，领导也渐渐开始有点意见了，所以，需要一个能及时报警并自动解决IIS重置的方案。</p>
<p>最理想的状态是基本满足以下需求：</p>
<ol>
<li>实时报警，宕机与恢复时通过<strong>MAIL/SMS/CALL</strong>等时效性较高的手段通知；</li>
<li>自动恢复，在发出警报的同时能执行一些额外的命令操作，以达到自动恢复的功能；</li>
<li>字词检测，能通过实时的页面关键字词的监测达到判断业务系统的正常性；</li>
<li>费用低廉，最好是免费了，不能免费的话，再说吧……</li>
</ol>
<p>其中至关重要的就是状态监测这一块的，<br />
因为是内网业务系统，无法通过站长保姆这类第三方的Uptime Monitor来监视，只能自己选择可靠的同机房其它服务器进行监测，并且为了排除线路故障外的原因，本机也要监测，同时兼顾到另一个工作现场的使用和线路故障检测，也需要上一个监测点。<br />
总的来说就是三个监测点：服务器本机、机房旁路、远端现场；</p>
<p>最终我在<a href="http://down.chinaz.com">chinaz</a>里面用<strong>monitor</strong>为关键词找到了一个软件：<a href="http://www.a1monitor.com/">A1Monitor</a>；<br />
从官方网站看来，最新版的<strong>A1Monitor 2009</strong>支持有以下特性：</p>
<ol>
<li>Vista兼容性，已经完成了对Vista的测试和工作兼容检查；</li>
<li>没有任何限制免费试用45天（如果企业对正版化有要求，建议购买，$89.95）；</li>
<li>可以监视任何TCP/IP服务器或网页（通过http, https, pop3, smtp, ftp, 或者任何你需要监视的端口)；</li>
<li>支持通过关键字来判断任何网页的正常与否；</li>
<li>你可以在服务器状态监测失败的时候收到邮件、同时A1Monitor还可以重启服务器或者执行一些附加的命令；</li>
<li>可以PING任何IP地址</li>
<li>每次有效的监测状态都会自动生成HTML格式的监测报告</li>
</ol>
<p>事实上，除了VISTA兼容性之外，<br />
我在<a href="http://down.chinaz.com">chinaz</a>找到的<strong>A1Monitor 2007特别版</strong>具备以上所有功能并且在我的2000/XP上工作非常良好，<br />
如果你有这方面的需要，可以去<a href="http://down.chinaz.com">down.chinaz.com</a>搜索<strong>A1Monitor</strong>， <img src='http://mr21.in/wp-includes/images/smilies/icon_mrgreen.gif' alt=':mrgreen:' class='wp-smiley' /> </p>
<p>基本上，<br />
需求列表里面的<strong>自动恢复</strong>和<strong>字词检测</strong>使用A1Monitor就可以解决，那实时报警呢？</p>
<p>这个时候我想起了通过<a href="http://www.fetion.com.cn">飞信</a>，因为飞信可以给机主和好友发短信并且免费，那么自己给自己发警报SMS是可行的，<br />
通过Google我找到<a href="http://zhouzaibao.javaeye.com/blog/378631">这篇文章</a>，里面提到了几种发送短信的方式，免费方案就是利用fetion了，</p>
<p>于是乎我从里面选择了<strong>网页命令行</strong>的方式，该方式貌似通过<a href="https://fetionapi.appspot.com/">Fetion API</a>这个Google App项目开发的，<br />
然后我构造了通过Fetion API发送警报的方式，因为可以在链接后面构造参数直接提交接收人和内容，格式如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">https<span style="color: #00AA00;">:</span>//fetionAPI<span style="color: #6666ff;">.appspot</span>.com/api/?from<span style="color: #00AA00;">=</span>您手机号&amp;pw<span style="color: #00AA00;">=</span>您的密码&amp;to<span style="color: #00AA00;">=</span>接收方手机号&amp;msg<span style="color: #00AA00;">=</span>短信内容</pre></td></tr></table></div>

<p>调用的方式就是</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">iexplore https<span style="color: #00AA00;">:</span>//fetionAPI<span style="color: #6666ff;">.appspot</span>.com/api/?from<span style="color: #00AA00;">=</span>您手机号&amp;pw<span style="color: #00AA00;">=</span>您的密码&amp;to<span style="color: #00AA00;">=</span>接收方手机号&amp;msg<span style="color: #00AA00;">=</span>短信内容</pre></td></tr></table></div>

<p>缺点就是会打开一个IE窗口，并且不会自动关掉，如果要是故障频繁点，还需要人工来关大量的IE窗口。</p>
<p>之后我突然以前看到过的<a href="http://www.it-adv.net">飞信机器人</a>，<br />
一个可以通过<strong>CLI</strong>(Command Line Interface，命令行界面，也有称之为DOS、命令提示符)调用的飞信客户端，<br />
同时适用于Windows/Linux平台，还有一些开发文档，而我们需要用到的只是其中一个非常小的功能，<strong>CLI发短信</strong>，<br />
格式如下：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="css" style="font-family:monospace;">fetion --mobile<span style="color: #00AA00;">=</span>你的号码 --pwd<span style="color: #00AA00;">=</span>密码 --to<span style="color: #00AA00;">=</span>目标号码 --msg-gb<span style="color: #00AA00;">=</span>内容
fetion --sid<span style="color: #00AA00;">=</span>你的飞信ID --pwd<span style="color: #00AA00;">=</span>密码 --to<span style="color: #00AA00;">=</span>目标号码 --msg-gb<span style="color: #00AA00;">=</span>内容</pre></td></tr></table></div>

<p>看到这儿，大多数人应该能明白了，<br />
既然<strong>A1Monitor</strong>允许执行额外的命令，而我的故障处理方式<strong>iisreset</strong>，并且同时执行一个飞信机器人发送短信的命令，<br />
那么只要随便写一个cmd文件，包含上面两条命令，然后放在磁盘方便访问机器人的地方，等着A1执行就好了。</p>
<p>基本上解决方法就是这些了，并且试验过确实有效，当然，整个机房掉电的情况下就比较麻烦了，<br />
不过因为设置了三个监测点，3D防护，基本上可以解决服务器死机、线路故障、机房掉电等情况的近实时（0s~你设定的监测时间间隔）SMS警报，但要求监测机24&#215;7开机。</p>
<p>思路写的有点混乱，如果需要教程的话，请关注后续文章。</p>
<p>Btw,<br />
你当然也可以用这个办法在你的电脑上监控你Web空间的Uptime，<br />
但问题是我想没有多少人能保持电脑24&#215;7并且网络线路一直通常无故障的对吧，比较有难度而已。</p>
<p>本文参考：<br />
利用飞信fetion发送短信，实现服务器报警等： <a href="http://zhouzaibao.javaeye.com/blog/378631">http://zhouzaibao.javaeye.com/blog/378631</a><br />
fetion机器人2009版说明及下载： <a href="http://bbs.it-adv.net/viewthread.php?tid=155">http://bbs.it-adv.net/viewthread.php?tid=155</a><br />
09版fetion机器人安装说明： <a href="http://bbs.it-adv.net/viewthread.php?tid=186">http://bbs.it-adv.net/viewthread.php?tid=186</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/server-monitor-and-sms-realtime-notify.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>软RAID可用性测试</title>
		<link>http://mr21.in/software/availability-test-for-soft-raid.html</link>
		<comments>http://mr21.in/software/availability-test-for-soft-raid.html#comments</comments>
		<pubDate>Thu, 19 Mar 2009 04:41:59 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[2000]]></category>
		<category><![CDATA[2003]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[软RAID]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=244</guid>
		<description><![CDATA[通常，一些公司或者企业， 在购买服务器的时候会忽略了对RAID的支持或者预算不足以购买支持合适RAID的服务器， 而在实际业务的使用中又需要提供一个阵列上的支持，这个时候要加增加配件... ]]></description>
			<content:encoded><![CDATA[<p>通常，一些公司或者企业，<br />
在购买服务器的时候会忽略了对RAID的支持或者预算不足以购买支持合适RAID的服务器，<br />
而在实际业务的使用中又需要提供一个阵列上的支持，这个时候要加增加配件显然不太合适BOSS的心意，</p>
<p>而从Win2000开始，系统提供了一种叫“软阵列”的功能，<br />
可以让你在Windows系统中，通过软件的方式，实现磁盘的充分利用而不用增加任何硬件，<br />
这样倒是节省成本了，</p>
<p>不过，如果系统坏了，呃，众所周知的，Windows还是很不稳定的，<br />
如果系统坏了，如果系统要升级了，怎么办？<br />
是不是重装/升级系统，软阵列的阵列信息就会丢失？或者说数据会丢失？<br />
毕竟没有一个ROM来存储这些阵列的信息嘛~</p>
<p>本文的目的就在于解决以上的担忧，<br />
不过现在的RAID卡很便宜，服务器也大都支持到RAID5，<br />
所以本文仅仅是个人的小研究，仅供参考，</p>
<p>目前只有RAID1/0的测试，随后的RAID5我也会找时间跟上的，<br />
至于RAID6，系统应该是不支持的，<br />
RAID1+0/0+1的话，有钱买硬盘还能不买块RAID卡？？<br />
当然，有机会有时间都会做做测试的，仅供学术研究~</p>
<blockquote>
<h2><a name="menu">文章目录：</a></h2>
<li>零、 <a href="http://mr21.in/2009-03/availability-test-for-soft-raid.html#no0">测试简述</a></li>
<li>一、 <a href="http://mr21.in/2009-03/availability-test-for-soft-raid.html#no1">测试平台</a></li>
<li>二、 <a href="http://mr21.in/2009-03/availability-test-for-soft-raid.html#no2">测试目标</a></li>
<li>三、 <a href="http://mr21.in/2009-03/availability-test-for-soft-raid.html#no3">测试一，重装系统后的效果</a></li>
<li>四、 <a href="http://mr21.in/2009-03/availability-test-for-soft-raid.html#no4">测试二，升级系统后的效果</a></li>
</blockquote>
<p><span id="more-244"></span></p>
<h3><strong><a name="no0">简述：</a></strong></h3>
<li>本文仅<strong>简单测试</strong>重装/升级系统(Win2000-&gt;Win2003)后对软RAID是否有影响，</li>
<li>不阐述RAID的制作和原理解释。</li>
<li>因为测试结束前，单位有一台服务器需要重装系统，当初前任制作了RAID1。</li>
<li>写在这里仅用于记录。</li>
<h3><strong><a name="no1">平台：</a></strong></h3>
<li><strong>Machine:</strong> VMware.</li>
<li><strong>OS1:</strong> Windows 2000 Advance Server.</li>
<li><strong>OS2:</strong> Windows Server 2003 Standard.</li>
<li><strong>3 VMware disk:</strong> Disk0 is <span style="text-decoration: underline;">3G</span>, Disk1 is <span style="text-decoration: underline;">512M</span>, Disk2 is <span style="text-decoration: underline;">512M</span>.</li>
<li><strong>3G</strong> is <span style="text-decoration: underline;">Operating System</span>, <strong>512M+512M</strong> is <span style="text-decoration: underline;">RAID 0 and 1</span>.</li>
<h3><strong><a name="no2">目标：</a></strong></h3>
<ol>
<li>测试一，重新安装系统，软RAID是否继续有效且数据不受损。</li>
<li>测试二，升级系统后(Win2000 upgrade to Win2003)，软RAID是否继续有效且数据不受损。</li>
</ol>
<h3><strong><a name="no3">测试一</a></strong></h3>
<ol>
<li>Disk0安装Win2000</li>
<li>Disk1&amp;2初始化之后，升级为动态磁盘，分别做RAID0(带区卷)/1(镜像卷)</li>
<li>RAID放置测试文件“新建文件夹”、“新建文本文档.txt”、“新建写字板文档.doc”</li>
<li>重启</li>
<li>使用Win2000安装CD引导</li>
<li>进入分区选择的步骤，得出以下结果：
<div>
<div style="float:left;width:200px;"><a href="http://picasaweb.google.com/lh/photo/07JnaYBuV4CmRofqhmPV9w?feat=embedwebsite"><img src="http://lh5.ggpht.com/_yJB0PIHwozI/SadpCv2H4KI/AAAAAAAAB0o/w0ROA035JVg/s144/Windows%202000%20Server-RAID0.png.jpg" alt="" /></a><br />
Windows 2000 Server-RAID0</div>
<p><a href="http://picasaweb.google.com/live21/SoftRAID?feat=embedwebsite#5307326177054242082"><img src="http://lh4.ggpht.com/_yJB0PIHwozI/SadpCeJzNSI/AAAAAAAAB0g/86GtacRh45E/s144/Windows%202000%20Server-RAID1.png.jpg" alt="" /></a><br />
Windows 2000 Server-RAID1</div>
</li>
<li>事后测试，在系统内不用任何设置直接可以访问RAID分区的所有内容。</li>
</ol>
<h3><strong><a name="no4">测试二</a></strong></h3>
<ol>
<li>使用Win2003引导，格式化Disk0，正常安装系统。<br />
选择磁盘过程中，无法如上图测试一的图片哪样识别软RAID并赋予盘符。</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/m0BOiBV6HfmeIib0v8RcWg?feat=embedwebsite"><img src="http://lh3.ggpht.com/_yJB0PIHwozI/SadpDX7qZDI/AAAAAAAAB0w/1azRjsUPHEc/s144/Windows%202003-2009-02-13-09-59-46.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 1<br />
被识别为外部的动态磁盘，无法直接使用。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/QYs1O_Mu9wom-K6T8ROOVA?feat=embedwebsite"><img src="http://lh4.ggpht.com/_yJB0PIHwozI/SadpEM4wsGI/AAAAAAAAB04/ThiRLNIkPHI/s144/Windows%202003-2009-02-13-09-59-51.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 2<br />
在磁盘1上右键，选择“<strong>导入外部磁盘</strong>”。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/KsKhD-yvOdY3m397baW2LQ?feat=embedwebsite"><img src="http://lh6.ggpht.com/_yJB0PIHwozI/SadpEy03VTI/AAAAAAAAB1A/zm-M1PB5wVM/s144/Windows%202003-2009-02-13-10-00-05.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 3<br />
这时，系统告诉你，需要导入的是“磁盘组”，说明识别出来了。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/txsHN7qH5GDKwK3KIz5Reg?feat=embedwebsite"><img src="http://lh3.ggpht.com/_yJB0PIHwozI/SadpFcOmhgI/AAAAAAAAB1I/X91svSCi4MQ/s144/Windows%202003-2009-02-13-10-00-10.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 4<br />
选择“磁盘”，可以查看本磁盘组的成员磁盘。图中为“磁盘1/2”，证明没错。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/6oAn5cAwZQPIk1vXTPMtZA?feat=embedwebsite"><img src="http://lh4.ggpht.com/_yJB0PIHwozI/SadpGMHULCI/AAAAAAAAB1Q/Nw2dxYliTf4/s144/Windows%202003-2009-02-13-10-00-20.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 5<br />
系统识别出RAID1，选择“确定”导入。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/DfUByls_ljNETwsn3n0Gpw?feat=embedwebsite"><img src="http://lh6.ggpht.com/_yJB0PIHwozI/SadpGjvEbRI/AAAAAAAAB1Y/4eFTOCYxpEA/s144/Windows%202003-2009-02-13-10-02-09.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 6<br />
导入成功后，磁盘状态为“联机”，容量正常，识别为RAID1镜像卷。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/l4gG6yKW12R9JCl3xGLAVg?feat=embedwebsite"><img src="http://lh5.ggpht.com/_yJB0PIHwozI/SadpHTKoQTI/AAAAAAAAB1g/wOAOx_gKNEo/s144/Windows%202003-2009-02-13-10-02-18.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Step 7<br />
赋予系统盘符，正常。
</div>
</div>
</li>
<li>
<div id="imgdiv">
<div id="imgdivimg">
<a href="http://picasaweb.google.com/lh/photo/RuUabi1Qy7mIRu4Ey4jy0w?feat=embedwebsite"><img src="http://lh5.ggpht.com/_yJB0PIHwozI/SadpIcb8pNI/AAAAAAAAB1o/WyHL2hPA4Ss/s144/Windows%202003-2009-02-13-10-03-45.png.jpg" /></a>
</div>
<div id="imgdivtext">
Soft RAID in Win2003<br />
Final<br />
Win2000的磁盘文件全部识别出来，测试结束。
</div>
</div>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/availability-test-for-soft-raid.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS 5.2 安装手记</title>
		<link>http://mr21.in/software/centos-52-installtion-note.html</link>
		<comments>http://mr21.in/software/centos-52-installtion-note.html#comments</comments>
		<pubDate>Tue, 03 Mar 2009 01:58:35 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[2200]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[RHCE]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=239</guid>
		<description><![CDATA[由于要学习RHCE，所以安装了一个与RHEL5相近的版本的CentOS 5.2， 安装完成后，有一些小的东西需要修改，特此记录，待查。 Q: 为何Bash无法使用ifconfig/iwconfig等sbin命令 A: 因为不知道为什么，缺省... ]]></description>
			<content:encoded><![CDATA[<p>由于要学习RHCE，所以安装了一个与RHEL5相近的版本的CentOS 5.2，<br />
安装完成后，有一些小的东西需要修改，特此记录，待查。</p>
<p>Q: 为何Bash无法使用ifconfig/iwconfig等sbin命令<br />
A: 因为不知道为什么，缺省的用户变量PATH里面居然没有包含常用的/sbin目录。解决方法：</p>
<ol>
<li>打开终端窗口。<br />
<strong>应用程序->附件->终端</strong></li>
<li>进入用户目录。<br />
执行<strong>cd ~</strong></li>
<li>编辑Bash配置。<br />
执行<strong>nano .bashrc</strong></li>
<li>加入路径到变量。<br />
定位到文件的最末行，输入<strong>export PATH=$PATH:/sbin</strong></li>
<li>保存。<br />
按<strong>Ctrl+O</strong>写入，按<strong>Y</strong>确认，按<strong>Ctrl+X</strong>退出</li>
<li>完成，可以执行<strong>/sbin</strong>里面的命令，而不用定位到该目录了。</li>
</ol>
<p>
Q: 为何<strong>lsmod</strong>里面有<strong>ipw2200</strong>的模块，但是<strong>iwconfig</strong>看不到设备？<br />
A: 因为系统内置了<strong>Intel 2200bg</strong>的驱动了，但是由于版权问题，没有内置固件（韧体）。解决方法：</p>
<ol>
<li>打开终端窗口。<br />
<strong>应用程序->附件->终端</strong></li>
<li>获得ROOT权限。<br />
输入<strong>su</strong>，再输入root密码，获得root权限。（默认没有sudo的配置）</li>
<li>查询驱动版本。<br />
输入<strong>cat /var/log/messages |grep ipw2200</strong><br />
在输出的信息里找到相应的字符，例如我的是1.2.0版的驱动：<br />
<strong>ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.2.0kmprq</strong></li>
<li>下载相应的固件。<br />
访问<a href="http://ipw2200.sourceforge.net/firmware.php">http://ipw2200.sourceforge.net/firmware.php</a>，选择相应驱动的固件，我是firmware v3.0，<br />
点击相应的固件链接之后，出现的是一个许可文档，可以忽略，直接拉到下面点击<strong>I Agree</strong>就行。</li>
<li>安装固件。<br />
切换到相应的目录，默认是<strong>cd /home/&lt;username>/Desktop</strong>，然后解压<strong>tar zxvf ipw2200-fw-3.0.tgz</strong>，进入解压的目录<strong>cd ipw2200-fw-3.0</strong>，复制固件<strong>cp ipw2200-bss.fw /lib/firmware/</strong></li>
<li>使固件生效。<br />
执行<strong>rmmod ipw2200 &#038;&#038; modprobe ipw2200</strong>，再执行<strong>iwconfig</strong>就会发现多一个eth1。</li>
<li>OK，完成，可以用<strong>iwlist scan</strong>扫描热点了。</li>
<li>Tips: 你可以把全部命令保存成一个sh文件，直接执行就行。如下，<br />
不过要su以后执行，如果用sudo的话，每行前面加个sudo就行……</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>bughost.org<span style="color: #000000; font-weight: bold;">/</span>firmware<span style="color: #000000; font-weight: bold;">/</span>ipw2200-fw-<span style="color: #000000;">3.0</span>.tgz
<span style="color: #c20cb9; font-weight: bold;">tar</span> zxvf ipw2200-fw-<span style="color: #000000;">3.0</span>.tgz
<span style="color: #7a0874; font-weight: bold;">cd</span> ipw2200-fw-<span style="color: #000000;">3.0</span>
<span style="color: #c20cb9; font-weight: bold;">cp</span> ipw2200-bss.fw <span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>firmware<span style="color: #000000; font-weight: bold;">/</span>
rmmod ipw2200
modprobe ipw2200</pre></td></tr></table></div>

</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/centos-52-installtion-note.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>解决BT3 final, rtap0 is on channel 0</title>
		<link>http://mr21.in/software/solution-rtap0-is-on-channel-0.html</link>
		<comments>http://mr21.in/software/solution-rtap0-is-on-channel-0.html#comments</comments>
		<pubDate>Thu, 19 Feb 2009 10:27:58 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[2200]]></category>
		<category><![CDATA[AirCrack]]></category>
		<category><![CDATA[Beta]]></category>
		<category><![CDATA[Crack]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=230</guid>
		<description><![CDATA[在www.aircrack-ng.org看到的。 我的是DELL X300本子，Intel 2200bg的网卡， 之前看的很多资料都说BT3 final不行，自己试了， 执行aireplay-ng也是一直提示 rtap0 is on channel 0, but the AP uses channel 6 但是BT3 beta倒... ]]></description>
			<content:encoded><![CDATA[<p>在<a href="http://www.aircrack-ng.org/">www.aircrack-ng.org</a>看到的。</p>
<p>我的是DELL X300本子，Intel 2200bg的网卡，<br />
之前看的很多资料都说BT3 final不行，自己试了，<br />
执行aireplay-ng也是一直提示</p>
<blockquote><p>rtap0 is on channel 0, but the AP uses channel 6</p></blockquote>
<p>但是BT3 beta倒是不提示，找了一些资料。</p>
<p>解决如下：<br />
执行</p>
<blockquote><p>rmmod ipw2200<br />
modprobe ipw2200 rtap_iface=1</p></blockquote>
<p>的时候，把命令改成</p>
<blockquote><p>rmmod ipw2200<br />
modprobe ipw2200 rtap_iface=1 channel=X</p></blockquote>
<p>X就是你要破解的AP的频道。</p>
<p>这样就不再有</p>
<blockquote><p>rtap0 is on channel 0, but the AP uses channel X</p></blockquote>
<p>提示了，不过是否有正常支持破解，还在测试中&#8230;.</p>
<p>btw,<br />
说一个小技巧，因为AP的BSSID和MAC在破解过程中经常用到，<br />
所以，可以在破解前，选择好AP以后，执行</p>
<blockquote><p>ap=&lt;bssid>&#038;&#038; ma=&lt;mac></p></blockquote>
<p>然后在之后的命令里面通过$ap和$ma调用，这样就不用反复去修改命令了，<br />
不过这个变量只对当前窗口有效，不是全局变量。</p>
<p>例如：</p>
<blockquote><p>aireplay-ng -4 -e $ap -a $ma -h 001122334455 -i rtap0 eth1</p></blockquote>
<p>注：我的环境</p>
<blockquote><p>
DELL Latitude X300, Centrino(TM)<br />
BackTrack 3 final<br />
Intel 2200 802.11b/g Wireless Adapter</p></blockquote>
<p>Btw,<br />
我已经用BT3 beta破解了家旁边的701快捷酒店某AP密码，<br />
如果有看到这个PO的人，并且住在昆明市区西边的，可以留言~</p>
<p>参考：<br />
ipw2200-1.2.1 how to</p>
<p>http://www.aircrack-ng.org/doku.php?id=ipw2200</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/solution-rtap0-is-on-channel-0.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intel 2200bg for Debian 5 (Lenny)</title>
		<link>http://mr21.in/software/intel-2200bg-for-debian-5-lenny.html</link>
		<comments>http://mr21.in/software/intel-2200bg-for-debian-5-lenny.html#comments</comments>
		<pubDate>Wed, 18 Feb 2009 01:07:02 +0000</pubDate>
		<dc:creator>贰壹</dc:creator>
				<category><![CDATA[软言软语]]></category>
		<category><![CDATA[2200]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[firmware]]></category>
		<category><![CDATA[Intel]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[non-free]]></category>

		<guid isPermaLink="false">http://mr21.in/?p=228</guid>
		<description><![CDATA[Debian 5 (Lenny) 发布后， 在我的DELL X300工作本子上试装了一下。 整个安装进程似乎比以前的版本快很多， 选Graphic Installer，很快就进入到界面， 发现安装过程需要手动提供名为 ipw2200-bss.fw 的固... ]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.cathayan.org/item/1873">Debian 5 (Lenny) 发布</a>后，<br />
在我的DELL X300工作本子上试装了一下。</p>
<p>整个安装进程似乎比以前的版本快很多，<br />
选Graphic Installer，很快就进入到界面，<br />
发现安装过程需要手动提供名为 <strong>ipw2200-bss.fw</strong> 的固件，<br />
应该是用于驱动 <strong>Intel 2200 802.11b/g</strong> 无线网卡的非开源自由固件。</p>
<p>基于此，GG搜寻了一下，找到官方提供的解决办法，<br />
相关说明：<a href="http://wiki.debian.org/ipw2200">http://wiki.debian.org/ipw2200</a> （全英文）<br />
下载链接：<a href="http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/lenny/current/">http://cdimage.debian.org/cdimage/unofficial/non-free/firmware/lenny/current/</a></p>
<blockquote><p>
<strong>操作步骤：</strong></p>
<ol>
<li>下载页面提供gz和zip格式，请下载任一个firmware包。</li>
<li>解压，或者直接提取其中的 <strong>firmware-ipw2x00_0.14_all.deb</strong>。</li>
<li>将提取的firmware-ipw2x00_0.14_all.deb放到U盘、MMC/SD卡等可移动介质上（以下统称<strong>U盘</strong>）。</li>
<li>执行你的Debian安装，这个时候随便你插不插U盘。</li>
<li>进行到<strong>探测网络设备</strong>时，会提示你，需要ipw2200-bss.fw文件。</li>
<li>插入你的U盘，点击<strong>继续</strong>。</li>
<li>OK，识别出来了，接下来就是配置网络。</li>
</ol>
</blockquote>
<p>据Debian Wiki说明，<br />
这个fw文件会自动存放在 <strong>/lib/firmware</strong> 目录里。</p>
<p>同时，<br />
看下载的文件名，应该是同时支持2100和2200系列的无线网卡，<br />
且下载的 <strong>firmware.tar.gz</strong> 文件里面还有其它的 non-free 固件，<br />
只要在安装过程中有提示需要fw文件的，都可以用以上办法，<br />
因为那说明Debian已经内置驱动，差固件而已。</p>
]]></content:encoded>
			<wfw:commentRss>http://mr21.in/software/intel-2200bg-for-debian-5-lenny.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

