<?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>Hello, SA &#187; debian</title>
	<atom:link href="http://blog.helosa.org/tag/debian/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.helosa.org</link>
	<description>Linux System Administrator</description>
	<lastBuildDate>Tue, 31 Jan 2012 08:28:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>在PowerEdge R410 下安装Debian6</title>
		<link>http://blog.helosa.org/2011/10/20/poweredge-r410-debian6.html</link>
		<comments>http://blog.helosa.org/2011/10/20/poweredge-r410-debian6.html#comments</comments>
		<pubDate>Thu, 20 Oct 2011 05:22:03 +0000</pubDate>
		<dc:creator>Chan Cham Chung</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://blog.helosa.org/?p=476</guid>
		<description><![CDATA[昨天第一次在一台 R410 上装了Debian 6 ，想不到还出问题了。。。竟然不能直接就用netinst 安装好Debian，居然还是缺驱动。 安装的过程中，它会检测硬件，但是竟然出错了，“load missing firmware file” ，驱动也指出来了，是这个：bnx2/bnx2-mips-09-5.0.0.j3.fw 。原因在于，这个网卡驱动在Debian6 时变成了non-free 的驱动了，Debian installer 也告诉我了，需要把这个firmware 下载到一个removable media ，然后插入即可。问题就在这里开始解决吧。 弄来一个U 盘，格式化为FAT 吧，然后到这里下载两个firmware ： http://194.95.9.96/debian-installer/amd64/temp/lib/firmware/bnx2/ bnx2-mips-09-5.0.0.j3.fw bnx2-rv2p-09-5.0.0.j3.fw 下载回来，放在U 盘的根目录的 bnx2/ 目录里面。 在出现load missing firmware file ，让你插入removable media 的时候，ctrl + alt + F2 跳转到另一个终端，然后把U 盘挂载上去。我当时是/dev/sdb4 ，mount /dev/sdb4 /mnt 。 这个时候，那两个firmware 应该在 /mnt/bnx2/bnx2-mips-09-5.0.0.j3.fw /mnt/bnx2/bnx2-rv2p-09-5.0.0.j3.fw 然后ctrl + alt + [...]]]></description>
			<content:encoded><![CDATA[<p>昨天第一次在一台 R410 上装了Debian 6 ，想不到还出问题了。。。竟然不能直接就用netinst 安装好Debian，居然还是缺驱动。</p>
<p>安装的过程中，它会检测硬件，但是竟然出错了，“load missing firmware file” ，驱动也指出来了，是这个：bnx2/bnx2-mips-09-5.0.0.j3.fw 。原因在于，这个网卡驱动在Debian6 时变成了non-free 的驱动了，Debian installer 也告诉我了，需要把这个firmware 下载到一个removable media ，然后插入即可。问题就在这里开始解决吧。</p>
<p>弄来一个U 盘，格式化为FAT 吧，然后到这里下载两个firmware ：</p>
<p>http://194.95.9.96/debian-installer/amd64/temp/lib/firmware/bnx2/</p>
<p>bnx2-mips-09-5.0.0.j3.fw<br />
bnx2-rv2p-09-5.0.0.j3.fw</p>
<p>下载回来，放在U 盘的根目录的 bnx2/ 目录里面。</p>
<p>在出现load missing firmware file ，让你插入removable media 的时候，ctrl + alt + F2 跳转到另一个终端，然后把U 盘挂载上去。我当时是/dev/sdb4 ，mount /dev/sdb4 /mnt 。</p>
<p>这个时候，那两个firmware 应该在</p>
<p>/mnt/bnx2/bnx2-mips-09-5.0.0.j3.fw</p>
<p>/mnt/bnx2/bnx2-rv2p-09-5.0.0.j3.fw</p>
<p>然后ctrl + alt + F1 回到安装的终端，按 YES 吧。</p>
<p>然后就过去了，继续如常安装吧。</p>
<p>我参考自这个页面：http://bbs.chinaunix.net/archiver/tid-2312139.html ，只是记录一下自己的经历，和他的做法稍有不同。</p>
<p>Debian 6 刚发布的时候，在我的老东家，机房的同事就说装Debian 6 有点问题，结果帮我们装了个Debian 5 ，让我们自己升，够坑爹的。我就在想，会不会就是因为这个驱动的问题导致的呢？或者，在FAI 下还真不好解决，下回我也试试FAI 安装Debian6 .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.helosa.org/2011/10/20/poweredge-r410-debian6.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ssh sftp 的设置</title>
		<link>http://blog.helosa.org/2010/09/29/ssh-sftp.html</link>
		<comments>http://blog.helosa.org/2010/09/29/ssh-sftp.html#comments</comments>
		<pubDate>Wed, 29 Sep 2010 14:53:53 +0000</pubDate>
		<dc:creator>Chan Cham Chung</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://blog.helosa.org/?p=340</guid>
		<description><![CDATA[今天有个同事说他的 secure file transfer 使用不能。 看了下，貌似是 sshd_config 的配置有点问题，再看了下，原来是red hat 的配置用在了debian 上。 在 rh 系下，sshd_config 应该是 Subsystem       sftp    /usr/libexec/openssh/sftp-server 在 debian 下，应该是 Subsystem       sftp   /usr/lib/openssh/sftp-server 路径不一样了。。。]]></description>
			<content:encoded><![CDATA[<p>今天有个同事说他的 secure file transfer 使用不能。</p>
<p>看了下，貌似是 sshd_config 的配置有点问题，再看了下，原来是red hat 的配置用在了debian 上。</p>
<p>在 rh 系下，sshd_config 应该是</p>
<p>Subsystem       sftp    /usr/libexec/openssh/sftp-server</p>
<p>在 debian 下，应该是</p>
<p>Subsystem       sftp   /usr/lib/openssh/sftp-server</p>
<p>路径不一样了。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.helosa.org/2010/09/29/ssh-sftp.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>debian 下nginx 快速搭建FCGI环境</title>
		<link>http://blog.helosa.org/2010/05/14/nginx-fcgi.html</link>
		<comments>http://blog.helosa.org/2010/05/14/nginx-fcgi.html#comments</comments>
		<pubDate>Fri, 14 May 2010 06:41:51 +0000</pubDate>
		<dc:creator>Chan Cham Chung</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.helosa.org/?p=256</guid>
		<description><![CDATA[我的想法是。。。快点，快点，再快点！！ apt-get install spawn-fcgi php5-cgi 用 spawn-fcgi 启动 fcgi ， spawn-fcgi -a 127.0.0.1 -p 8000 -u nobody -f /usr/bin/php-cgi -C 5 ; 在 nginx 里配置加一句： location ~ \.php$ { fastcgi_pass 127.0.0.1:8000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/nginx/html$fastcgi_script_name; include fastcgi_params; } 然后把一个 php 放在 /home/nginx/html 里，就可以使用了。]]></description>
			<content:encoded><![CDATA[<p>我的想法是。。。快点，快点，再快点！！</p>
<p>apt-get install spawn-fcgi php5-cgi</p>
<p>用 spawn-fcgi 启动 fcgi ，</p>
<p>spawn-fcgi -a 127.0.0.1 -p 8000 -u nobody -f /usr/bin/php-cgi -C 5 ;</p>
<p>在 nginx 里配置加一句：<br />
location ~ \.php$ {<br />
fastcgi_pass   127.0.0.1:8000;<br />
fastcgi_index  index.php;<br />
fastcgi_param  SCRIPT_FILENAME  /home/nginx/html$fastcgi_script_name;<br />
include        fastcgi_params;<br />
}</p>
<p>然后把一个 php 放在 /home/nginx/html 里，就可以使用了。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.helosa.org/2010/05/14/nginx-fcgi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>resin 在debian testing下的ipv6 问题</title>
		<link>http://blog.helosa.org/2010/03/05/resin-ipv6-debian.html</link>
		<comments>http://blog.helosa.org/2010/03/05/resin-ipv6-debian.html#comments</comments>
		<pubDate>Thu, 04 Mar 2010 17:28:58 +0000</pubDate>
		<dc:creator>Chan Cham Chung</dc:creator>
				<category><![CDATA[technology]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[resin]]></category>

		<guid isPermaLink="false">http://blog.helosa.org/?p=175</guid>
		<description><![CDATA[最近装的resin 3.0.x 都很不顺利，经常起不来，jvm.log 爆出这样的错： Can&#8217;t connect to parent process through socket 48403 Resin needs to connect to its parent. resin 3.0.x 大概是这样的工作机制的，起一个perl 作为一个master process ，这个master process 再负责起一个jvm 负责处理java 请求。而log 中的意思，就是 jvm 无法与这个master process 连接通讯，结果就起不来了。 国外也有朋友与我同样的问题呢：http://bugs.caucho.com/view.php?id=350 后来我看到这篇文章 http://people.debian.org.tw/~chihchun/2010/02/03/connectivity-issue-of-java-with-ipv6/，觉得终于找到正解了！ 大概的意思就是，jvm 是支持ipv6的，可惜一般情况下，debian 会启动 ipv6 的 network interface ，但是，并没有其相应的路由，这样，java 就找不到路去连接 parent process 了。 既然是ipv6 的问题，剩下的问题就是如何关闭ipv6 了。 以下这个帖子比较全，linux 下n种禁用ipv6 的方法：http://hi.baidu.com/ramboo0913/blog/item/71efa09959ddcb0b6f068cc8.html [...]]]></description>
			<content:encoded><![CDATA[<p>最近装的resin 3.0.x 都很不顺利，经常起不来，jvm.log 爆出这样的错：</p>
<p>Can&#8217;t connect to parent process through socket 48403<br />
Resin needs to connect to its parent.</p>
<p>resin 3.0.x 大概是这样的工作机制的，起一个perl 作为一个master process ，这个master process 再负责起一个jvm 负责处理java 请求。而log 中的意思，就是 jvm 无法与这个master process 连接通讯，结果就起不来了。</p>
<p>国外也有朋友与我同样的问题呢：<a href="http://bugs.caucho.com/view.php?id=350">http://bugs.caucho.com/view.php?id=350</a></p>
<p>后来我看到这篇文章 <a href="http://people.debian.org.tw/~chihchun/2010/02/03/connectivity-issue-of-java-with-ipv6/">http://people.debian.org.tw/~chihchun/2010/02/03/connectivity-issue-of-java-with-ipv6/</a>，觉得终于找到正解了！</p>
<p>大概的意思就是，jvm 是支持ipv6的，可惜一般情况下，debian 会启动 ipv6 的 network interface ，但是，并没有其相应的路由，这样，java 就找不到路去连接 parent process 了。</p>
<p>既然是ipv6 的问题，剩下的问题就是如何关闭ipv6 了。</p>
<p>以下这个帖子比较全，linux 下n种禁用ipv6 的方法：<a href="http://hi.baidu.com/ramboo0913/blog/item/71efa09959ddcb0b6f068cc8.html">http://hi.baidu.com/ramboo0913/blog/item/71efa09959ddcb0b6f068cc8.html</a></p>
<p>但是，这些方法，只是关闭以模块的形式载入内核的ipv6，如果已经把ipv6 编译进内核，那以上的方法都是不奏效的。我的debian 通常会升级到 testing ，很不幸，ipv6 已经在内核中了。可以这样查看，uname -a 看一下我使用了哪个内核，结果是“2.6.30-2-amd64” ，然后去 /boot/ 中，查看config-2.6.30-2-amd64 这个文件，这个文件记录了编译内核的参数，会见到 “CONFIG_IPV6=y” ，证明ipv6 已经编译进内核了，如果是模块的话，应该是“CONFIG_IPV6=m” 的。</p>
<p>其实判断ipv6 是否以模块的形式载入，很简单。</p>
<p>命令 ip addr | grep inet6 有输出，但是 lsmod | grep ipv6 却没输出，证明了ipv6 已经编译进内核了。</p>
<p>那这种编译进内核的情况，如何解决呢？？google 告诉我，修改 /boot/grub/menu.lst ，把</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">kernel          /boot/vmlinuz-2.6.30-2-amd64 root=/dev/cciss/c0d0p1 ro</pre></div></div>

<p>改为</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">kernel          /boot/vmlinuz-2.6.30-2-amd64 root=/dev/cciss/c0d0p1 ro ipv6.disable=1</pre></div></div>

<p>reboot 即可。</p>
<p>其实还可以在线地关闭ipv6 ，运行命令</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$sudo</span> <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>ip addr del <span style="color: #000000; font-weight: bold;">&lt;</span>ipv6address<span style="color: #000000; font-weight: bold;">&gt;/&lt;</span>prefixlength<span style="color: #000000; font-weight: bold;">&gt;</span> dev ethX</pre></div></div>

<p>文中还提到一个方法，就是在resin/bin 下，修改wrapper.pl，在</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">#
# Additional args to pass to java after command-line args.
#</pre></div></div>

<p>后，加一句</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$EXTRA_JAVA_ARGS=&quot;-Djava.net.preferIPv4Stack=true&quot;;</pre></div></div>

<p>这样也就默认使用ipv4了。</p>
<p>其实文章已经说得很明白的了，我只是稍微简化一下，觉得不能理解的，还是参看一下原文吧。</p>
<p>祭出google 大神无数，终于解决问题。我这个SA 啊，就是一个靠google 混饭吃的。。。</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>updated :</p>
<p>新装的 debian 的内核参数，都是</p>
<p>net.ipv6.bindv6only = 1</p>
<p>的，而旧的都是</p>
<p>net.ipv6.bindv6only = 0</p>
<p>这样就解释了为什么resin 一启动就要 ipv6 了，但可以找不到 ipv6 的路由。。。sign&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.helosa.org/2010/03/05/resin-ipv6-debian.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

