<?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>Timothy&#039;s Space &#187; Linux</title>
	<atom:link href="http://www.xiaozhou.net/category/ittech/linux-ittech/feed" rel="self" type="application/rss+xml" />
	<link>http://www.xiaozhou.net</link>
	<description>君看一叶舟，出没风波里</description>
	<lastBuildDate>Thu, 02 Sep 2010 15:10:44 +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>Ubuntu下的一款Dock工具-AWN</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm#comments</comments>
		<pubDate>Sat, 21 Aug 2010 15:33:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Avant]]></category>
		<category><![CDATA[AWN]]></category>
		<category><![CDATA[Dock]]></category>
		<category><![CDATA[Navigator]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Window]]></category>
		<category><![CDATA[停靠]]></category>
		<category><![CDATA[工具]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/ubuntu%e4%b8%8b%e7%9a%84%e4%b8%80%e6%ac%bedock%e5%b7%a5%e5%85%b7-awn-2010-08-21.htm</guid>
		<description><![CDATA[苹果的Mac OS中，比较受欢迎的功能，就是最下面的应用程序的Dock Panel。Dock的好处，能把最常用的应用程序添加进去，能提高使用效率，比起桌面上密密麻麻的应用程序图标而言，简洁和美观多了。不过Dock程序并不是非得Mac OS中才能体验，Ubuntu中也有类似的应用，让咱们Ubuntu Fans也能过把瘾。这款工具，叫做AWN，全名是： Avant Window Navigator (下文还是简称AWN)。 AWN的安装十分方便，直接进入Ubuntu的Software Center，在应用程序搜索栏，输入AWN，就能找到它了。 安装后，在系统菜单的附件中，就能找到并启动这款工具。AWN会出现在屏幕的下方，默认只有一两个图标，其他的程序需要用户根据自己的喜好添加。 AWN的设置菜单，功能也非常丰富，包括你可以设置停靠栏的主题，图标大小，自动隐藏，停靠方向，等等…… 其中的一些选项，同学们自己去摸索吧，最后来一张设置后的Ubuntu桌面效果，感觉比较赞！ 你可能也对下列文章感兴趣2010年08月17日 -- Show一下俺的Ubuntu T恤 (12)2010年08月14日 -- Ubuntu中mono环境的搭建 (3)2010年06月6日 -- Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法 (4)2010年05月10日 -- Ubuntu 10.04 更新源收集 (8)2010年05月2日 -- Ubuntu 10.04 LTS 安装手记及体验 (14)2010年02月21日 -- 台式机换上了Ubuntu (19)]]></description>
			<content:encoded><![CDATA[<p>苹果的Mac OS中，比较受欢迎的功能，就是最下面的应用程序的Dock Panel。Dock的好处，能把最常用的应用程序添加进去，能提高使用效率，比起桌面上密密麻麻的应用程序图标而言，简洁和美观多了。不过Dock程序并不是非得Mac OS中才能体验，Ubuntu中也有类似的应用，让咱们Ubuntu Fans也能过把瘾。这款工具，叫做AWN，全名是： Avant Window Navigator (下文还是简称AWN)。</p>
<p>AWN的安装十分方便，直接进入Ubuntu的Software Center，在应用程序搜索栏，输入AWN，就能找到它了。<br />
<a href="http://www.xiaozhou.net/pics/UbuntuDockAWN_14B6B/awn1.jpg"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="awn1" src="http://www.xiaozhou.net/pics/UbuntuDockAWN_14B6B/awn1_thumb.jpg" border="0" alt="awn1" width="644" height="149" /></a><br />
安装后，在系统菜单的附件中，就能找到并启动这款工具。AWN会出现在屏幕的下方，默认只有一两个图标，其他的程序需要用户根据自己的喜好添加。</p>
<p>AWN的设置菜单，功能也非常丰富，包括你可以设置停靠栏的主题，图标大小，自动隐藏，停靠方向，等等……<br />
<a href="http://www.xiaozhou.net/pics/UbuntuDockAWN_14B6B/awn3.jpg"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="awn3" src="http://www.xiaozhou.net/pics/UbuntuDockAWN_14B6B/awn3_thumb.jpg" border="0" alt="awn3" width="585" height="645" /></a> 其中的一些选项，同学们自己去摸索吧，最后来一张设置后的Ubuntu桌面效果，感觉比较赞！<br />
<a href="http://www.xiaozhou.net/pics/UbuntuDockAWN_14B6B/awn2.jpg"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="awn2" src="http://www.xiaozhou.net/pics/UbuntuDockAWN_14B6B/awn2_thumb.jpg" border="0" alt="awn2" width="644" height="404" /></a></p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年08月17日 -- <a href="http://www.xiaozhou.net/essay/show_my_ubuntu_t_shirt-2010-08-17.htm" title="Show一下俺的Ubuntu T恤">Show一下俺的Ubuntu T恤</a> (12)</li><li>2010年08月14日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm" title="Ubuntu中mono环境的搭建">Ubuntu中mono环境的搭建</a> (3)</li><li>2010年06月6日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm" title="Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法">Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法</a> (4)</li><li>2010年05月10日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm" title="Ubuntu 10.04 更新源收集">Ubuntu 10.04 更新源收集</a> (8)</li><li>2010年05月2日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm" title="Ubuntu 10.04 LTS 安装手记及体验">Ubuntu 10.04 LTS 安装手记及体验</a> (14)</li><li>2010年02月21日 -- <a href="http://www.xiaozhou.net/ittech/software/installation_of_ubuntu-2010-02-21.htm" title="台式机换上了Ubuntu">台式机换上了Ubuntu</a> (19)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu中mono环境的搭建</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm#comments</comments>
		<pubDate>Sat, 14 Aug 2010 13:38:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Mono]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[搭建]]></category>
		<category><![CDATA[环境]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/ubuntu%e4%b8%admono%e7%8e%af%e5%a2%83%e7%9a%84%e6%90%ad%e5%bb%ba-2010-08-14.htm</guid>
		<description><![CDATA[Mono的大名，搞.NET的同学都知道。它使.NET程序在Linux下有了跨平台运行的可能。随着mono的逐步发展，现在已经逐渐趋于稳定和流行了。此文介绍一下Ubuntu中mono环境的搭建。 1.安装 ?View Code BASH1 $ sudo apt-get install mono-gmcs libmono-system-data2.0-cil libmono-system-ldap2.0-cil libmono-system-messaging2.0-cil libmono-system-runtime2.0-cil 当然，还有其他的一些包可选，比如： libmono-winforms2.0-cil 提供WinForm程序开发功能 libmono-system-web2.0-cil 提供asp.net web程序开发功能 libmono-system-web-mvc1.0-cil 提供MVC的web开发框架 libmono-wcf3.0-cil 提供WCF开发功能 libmono-nunit2.4-cil Nunit，单元测试模块 2.安装好后，查看mono相关信息 ?View Code BASH1 2 3 4 5 6 7 8 Mono JIT compiler version 2.4.4 &#40;Debian 2.4.4~svn151842-1ubuntu4&#41; Copyright &#40;C&#41; 2002-2010 Novell, Inc and Contributors. www.mono-project.com TLS: __thread GC: [...]]]></description>
			<content:encoded><![CDATA[<p>Mono的大名，搞.NET的同学都知道。它使.NET程序在Linux下有了跨平台运行的可能。随着mono的逐步发展，现在已经逐渐趋于稳定和流行了。此文介绍一下Ubuntu中mono环境的搭建。</p>
<p>1.安装 </p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p802code4'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8024"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p802code4"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> mono-gmcs libmono-system-data2.0-cil libmono-system-ldap2.0-cil libmono-system-messaging2.0-cil libmono-system-runtime2.0-cil</pre></td></tr></table></div>

<p>当然，还有其他的一些包可选，比如： </p>
<p>libmono-winforms2.0-cil 提供WinForm程序开发功能 </p>
<p>libmono-system-web2.0-cil 提供asp.net web程序开发功能 </p>
<p>libmono-system-web-mvc1.0-cil 提供MVC的web开发框架 </p>
<p>libmono-wcf3.0-cil 提供WCF开发功能 </p>
<p>libmono-nunit2.4-cil Nunit，单元测试模块 </p>
<p>2.安装好后，查看mono相关信息</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p802code5'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8025"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code" id="p802code5"><pre class="bash" style="font-family:monospace;">Mono JIT compiler version 2.4.4 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Debian 2.4.4~svn151842-1ubuntu4<span style="color: #7a0874; font-weight: bold;">&#41;</span>
Copyright <span style="color: #7a0874; font-weight: bold;">&#40;</span>C<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000;">2002</span>-<span style="color: #000000;">2010</span> Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm <span style="color: #7a0874; font-weight: bold;">&#40;</span>with typed GC<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none</pre></td></tr></table></div>

<p>3.测试程序</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p802code6'); return false;">View Code</a> CSHARP</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p8026"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p802code6"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> Test
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> Program
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Hello Mono!&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">ReadLine</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>保存为test.cs，然后用gmcs编译，运行正常。<br />
  <br />至此，mono环境配置成功。</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年08月21日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm" title="Ubuntu下的一款Dock工具-AWN">Ubuntu下的一款Dock工具-AWN</a> (4)</li><li>2010年08月17日 -- <a href="http://www.xiaozhou.net/essay/show_my_ubuntu_t_shirt-2010-08-17.htm" title="Show一下俺的Ubuntu T恤">Show一下俺的Ubuntu T恤</a> (12)</li><li>2010年06月23日 -- <a href="http://www.xiaozhou.net/mac-development/objectivec/objective_c_learning_note_1_the_first_hello_world_programe-2010-06-23.htm" title="Objective-C 学习笔记(一) 第一个Hello World程序">Objective-C 学习笔记(一) 第一个Hello World程序</a> (14)</li><li>2010年06月6日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm" title="Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法">Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法</a> (4)</li><li>2010年05月10日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm" title="Ubuntu 10.04 更新源收集">Ubuntu 10.04 更新源收集</a> (8)</li><li>2010年05月2日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm" title="Ubuntu 10.04 LTS 安装手记及体验">Ubuntu 10.04 LTS 安装手记及体验</a> (14)</li><li>2010年02月21日 -- <a href="http://www.xiaozhou.net/ittech/software/installation_of_ubuntu-2010-02-21.htm" title="台式机换上了Ubuntu">台式机换上了Ubuntu</a> (19)</li><li>2009年11月14日 -- <a href="http://www.xiaozhou.net/dotnetdevelopment/common_used_extention_method-2009-11-14.htm" title="[置顶]常用扩展方法收集&#038;整理(置顶-不断更新)">[置顶]常用扩展方法收集&#038;整理(置顶-不断更新)</a> (38)</li><li>2009年05月29日 -- <a href="http://www.xiaozhou.net/dotnetdevelopment/c-ide-mobile-write-your-c-code-anywhere-2009-05-29.htm" title="C# IDE Mobile – Write your C# code anywhere!">C# IDE Mobile – Write your C# code anywhere!</a> (2)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux中随机密码的生成</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/generate_random_password_in_linux-2010-07-16.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/generate_random_password_in_linux-2010-07-16.htm#comments</comments>
		<pubDate>Fri, 16 Jul 2010 15:32:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[随机密码]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/linux%e4%b8%ad%e9%9a%8f%e6%9c%ba%e5%af%86%e7%a0%81%e7%9a%84%e7%94%9f%e6%88%90-2010-07-16.htm</guid>
		<description><![CDATA[Linux中提供方便的让我们生成随机密码的功能，并且生成的密码有一定的复杂度，符合密码规范。下面是Linux中生成随机密码的两种常用的方式： 1.用mkpasswd命令： 使用mkpasswd命令，需要事先安装expect模块，以CentOS为例: ?View Code BASH1 yum -y install expect 安装好后，直接运行mkpasswd，就能生成随机密码了。并且命令还有参数，比如设置生成的随机密码的最小长度，等等，看看help就知道了。 2.用passwdgen命令: 和mkpasswd大致一致，需事先安装passwdgen模块: ?View Code BASH1 yum -y install passwdgen 安装好后，直接运行passwdgen，即可得到随机密码，同样passwdgen命令也有参数，可以参考help。 你可能也对下列文章感兴趣2010年05月2日 -- Ubuntu 10.04 LTS 安装手记及体验 (14)2010年03月16日 -- VPS SSH故障及解决 (12)2010年02月26日 -- vps中的iptables规则设置范例 (10)2010年02月21日 -- 台式机换上了Ubuntu (19)]]></description>
			<content:encoded><![CDATA[<p>Linux中提供方便的让我们生成随机密码的功能，并且生成的密码有一定的复杂度，符合密码规范。下面是Linux中生成随机密码的两种常用的方式：</p>
<h5>1.用mkpasswd命令：</h5>
<p>使用mkpasswd命令，需要事先安装expect模块，以CentOS为例:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p751code9'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p7519"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p751code9"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> expect</pre></td></tr></table></div>

<p>安装好后，直接运行mkpasswd，就能生成随机密码了。并且命令还有参数，比如设置生成的随机密码的最小长度，等等，看看help就知道了。</p>
<h5>2.用passwdgen命令:</h5>
<p>和mkpasswd大致一致，需事先安装passwdgen模块:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p751code10'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75110"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p751code10"><pre class="bash" style="font-family:monospace;">yum <span style="color: #660033;">-y</span> <span style="color: #c20cb9; font-weight: bold;">install</span> passwdgen</pre></td></tr></table></div>

<p>安装好后，直接运行passwdgen，即可得到随机密码，同样passwdgen命令也有参数，可以参考help。</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年05月2日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm" title="Ubuntu 10.04 LTS 安装手记及体验">Ubuntu 10.04 LTS 安装手记及体验</a> (14)</li><li>2010年03月16日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_ssh_problem_fix-2010-03-16.htm" title="VPS SSH故障及解决">VPS SSH故障及解决</a> (12)</li><li>2010年02月26日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/vps_iptables_setting_example-2010-02-26.htm" title="vps中的iptables规则设置范例">vps中的iptables规则设置范例</a> (10)</li><li>2010年02月21日 -- <a href="http://www.xiaozhou.net/ittech/software/installation_of_ubuntu-2010-02-21.htm" title="台式机换上了Ubuntu">台式机换上了Ubuntu</a> (19)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/generate_random_password_in_linux-2010-07-16.htm/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm#comments</comments>
		<pubDate>Sun, 06 Jun 2010 06:13:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ACL]]></category>
		<category><![CDATA[operation]]></category>
		<category><![CDATA[supported]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/ubuntu%e4%b8%adsetfacl%e5%91%bd%e4%bb%a4%e6%8f%90%e7%a4%ba-operation-not-supported-%e9%94%99%e8%af%af%e5%8f%8a%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95-2010-06-06.htm</guid>
		<description><![CDATA[ACL是Linux中的访问控制列表，它提供对文件、目录更好的读写、访问控制权限等功能，也是我在Ubuntu下配置用户权限经常用到的工具。ACL工具的安装非常简单： ?View Code BASH1 sudo apt-get install acl 系统便会自动下载、安装ACL工具。安装好后，你就可以通过setfacl和getfacl来设置、获取文件及目录的访问控制权限了。 最近在用ACL设置权限的时候，老是提示: Operation not supported ，百思不得其解，反复检查了shell命令，并没有发现不妥之处，后来在向google老师请教后，发现Linux下的文件系统，在挂接时，有可能默认并没有开启对ACL的支持。通过如下命令可以检查： ?View Code BASH1 mount -l 比如，在我的VPS中，通过此命令的输出信息，就能看到，我要设置权限的目录是在/home 而此目录是和根目录在同一个文件系统，被统一加载为 / 的。这个文件系统默认并没有开启动对ACL的支持，需要我们修改/etc/fstab来开启ACL支持。做法比较简单： ?View Code BASH1 vim /etc/fstab 在你所需要的文件系统options中，追加acl(注意是小写)，如下： # &#60;file system&#62; &#60;mount point&#62;   &#60;type&#62;   &#60;options&#62;       &#60;dump&#62;  &#60;pass&#62; /dev/xvda                        /               ext3          rw,acl                   0             1 修改后，保存并退出，然后直接重启系统，或者直接umount该文件系统，并重新mount。最后再用mount -l确认一下看ACL支持是否开启即可。 你可能也对下列文章感兴趣2010年08月21日 -- Ubuntu下的一款Dock工具-AWN (4)2010年08月17日 -- Show一下俺的Ubuntu T恤 (12)2010年08月14日 -- [...]]]></description>
			<content:encoded><![CDATA[<p>ACL是Linux中的访问控制列表，它提供对文件、目录更好的读写、访问控制权限等功能，也是我在Ubuntu下配置用户权限经常用到的工具。ACL工具的安装非常简单：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p662code14'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p66214"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p662code14"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> acl</pre></td></tr></table></div>

<p>系统便会自动下载、安装ACL工具。安装好后，你就可以通过setfacl和getfacl来设置、获取文件及目录的访问控制权限了。</p>
<p>最近在用ACL设置权限的时候，老是提示: Operation not supported ，百思不得其解，反复检查了shell命令，并没有发现不妥之处，后来在向google老师请教后，发现Linux下的文件系统，在挂接时，有可能默认并没有开启对ACL的支持。通过如下命令可以检查：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p662code15'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p66215"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p662code15"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-l</span></pre></td></tr></table></div>

<p>比如，在我的VPS中，通过此命令的输出信息，就能看到，我要设置权限的目录是在/home 而此目录是和根目录在同一个文件系统，被统一加载为 / 的。这个文件系统默认并没有开启动对ACL的支持，需要我们修改/etc/fstab来开启ACL支持。做法比较简单：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p662code16'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p66216"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p662code16"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>fstab</pre></td></tr></table></div>

<p>在你所需要的文件系统options中，追加acl(注意是小写)，如下：</p>
<p># &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;   &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;</p>
<p>/dev/xvda                        /               ext3          rw,acl                   0             1</p>
<p>修改后，保存并退出，然后直接重启系统，或者直接umount该文件系统，并重新mount。最后再用mount -l确认一下看ACL支持是否开启即可。</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年08月21日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm" title="Ubuntu下的一款Dock工具-AWN">Ubuntu下的一款Dock工具-AWN</a> (4)</li><li>2010年08月17日 -- <a href="http://www.xiaozhou.net/essay/show_my_ubuntu_t_shirt-2010-08-17.htm" title="Show一下俺的Ubuntu T恤">Show一下俺的Ubuntu T恤</a> (12)</li><li>2010年08月14日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm" title="Ubuntu中mono环境的搭建">Ubuntu中mono环境的搭建</a> (3)</li><li>2010年05月10日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm" title="Ubuntu 10.04 更新源收集">Ubuntu 10.04 更新源收集</a> (8)</li><li>2010年05月2日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm" title="Ubuntu 10.04 LTS 安装手记及体验">Ubuntu 10.04 LTS 安装手记及体验</a> (14)</li><li>2010年04月5日 -- <a href="http://www.xiaozhou.net/blackberry/operation_of_blackberry-2010-04-05.htm" title="(转)[菜鸟通] BlackBerry 的外观操作详解（Qwerty 全键盘篇）">(转)[菜鸟通] BlackBerry 的外观操作详解（Qwerty 全键盘篇）</a> (8)</li><li>2010年02月21日 -- <a href="http://www.xiaozhou.net/ittech/software/installation_of_ubuntu-2010-02-21.htm" title="台式机换上了Ubuntu">台式机换上了Ubuntu</a> (19)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux下的SSH Tunnel软件</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/ssh_tunnel_software_under_linux-2010-05-22.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/ssh_tunnel_software_under_linux-2010-05-22.htm#comments</comments>
		<pubDate>Sat, 22 May 2010 09:18:38 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MyEnTunnel]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tunnel]]></category>
		<category><![CDATA[tunnelier]]></category>
		<category><![CDATA[软件使用]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/?p=619</guid>
		<description><![CDATA[用惯了Windows，也经常在Windows下面用SSH跨栏。以前常用的是MyEnTunnel，后来改用Tunnelier，感觉速度要快不少。最近又常用Ubuntu看网页，所以跨栏也是避免不了的。由于Linux本身就有ssh命令，所以不用借助任何软件，就可以产生本地的SSH加密隧道。用如下的shell命令即可: ?View Code BASH1 ssh account@host -N -D 127.0.0.1:1080 如上面的例子，通过使用简单的ssh命令，即可产生本地的代理隧道，这样，配合Firefox+AutoProxy，就可以跨栏了，以前俺的文章也有介绍，呵呵。可以把上面的命令保存为一个Shell脚本，每次执行以下，输入ssh密码即可。 不过，今天要给大家介绍一款Linux下，GUI的SSH Tunnel软件，这就是: SSH Tunnel Manager 。 它是一款运行于Gnome上的用于产生SSH加密隧道代理的软件，拥有GUI的界面，而且是开源的。 Ubuntu下面安装方式也比较简单，不需要自己去下载，直接通过apt就可以安装: ?View Code BASH1 sudo apt-get install gstm 安装好后，可以在Application-&#62;Internet菜单下面找到：gSTM，即可启动。 软件的界面也比较简洁，设置也比较简单，如下图： 设置的界面也很简单，输入帐号，以及SSH代理的本地端口即可。记得把转发类型设置为Dynamic。 做好简单的设置，点击Start按钮，你就可以自由的跨栏了…… 你可能也对下列文章感兴趣2010年06月8日 -- Tunnelier实现多人共享SSH上网 (6)2010年01月29日 -- 一个不错的Firefox Add-ons: AutoProxy (14)2010年08月7日 -- 推荐一个黑莓上的SSH客户端软件&#8211;BBSSH (15)2010年03月26日 -- 用BB管理你的VPS (12)2010年03月16日 -- VPS SSH故障及解决 (12)]]></description>
			<content:encoded><![CDATA[<p>用惯了Windows，也经常在Windows下面用SSH跨栏。以前常用的是MyEnTunnel，后来改用<a href="http://www.google.com/url?sa=t&amp;source=web&amp;ct=res&amp;cd=1&amp;ved=0CBoQFjAA&amp;url=http%3A%2F%2Fwww.bitvise.com%2Ftunnelier&amp;rct=j&amp;q=tunnelier&amp;ei=iZz3S8K4JYGC8gbd_pHTCg&amp;usg=AFQjCNFGGLbFeGJYI8IWWu14KHJmlm6jkw" target="_blank">Tunnelier</a>，感觉速度要快不少。最近又常用Ubuntu看网页，所以跨栏也是避免不了的。由于Linux本身就有ssh命令，所以不用借助任何软件，就可以产生本地的SSH加密隧道。用如下的shell命令即可:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p619code19'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p61919"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p619code19"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ssh</span> account<span style="color: #000000; font-weight: bold;">@</span>host <span style="color: #660033;">-N</span> <span style="color: #660033;">-D</span> 127.0.0.1:<span style="color: #000000;">1080</span></pre></td></tr></table></div>

<p>如上面的例子，通过使用简单的ssh命令，即可产生本地的代理隧道，这样，配合Firefox+AutoProxy，就可以跨栏了，<a href="http://www.xiaozhou.net/ittech/software/a_nice_firefox_add_ons_autoproxy-2010-01-29.htm" target="_self">以前俺的文章</a>也有介绍，呵呵。可以把上面的命令保存为一个Shell脚本，每次执行以下，输入ssh密码即可。<br />
不过，今天要给大家介绍一款Linux下，GUI的SSH Tunnel软件，这就是:<a href="https://launchpad.net/tunnelmanager" target="_blank"> SSH Tunnel Manager</a> 。 它是一款运行于Gnome上的用于产生SSH加密隧道代理的软件，拥有GUI的界面，而且是开源的。<br />
Ubuntu下面安装方式也比较简单，不需要自己去下载，直接通过apt就可以安装:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p619code20'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p61920"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p619code20"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> gstm</pre></td></tr></table></div>

<p>安装好后，可以在Application-&gt;Internet菜单下面找到：gSTM，即可启动。<br />
软件的界面也比较简洁，设置也比较简单，如下图：</p>
<div class="mceTemp mceIEcenter">
<dl class="wp-caption aligncenter" style="width: 410px;">
<dt class="wp-caption-dt"><a href="http://www.xiaozhou.net/pics/gSTM/gstm1.png"><img class="aligncenter" title="SSH Tunnel Manager" src="http://www.xiaozhou.net/pics/gSTM/gstm1.png" alt="" width="400" height="470" /></a></dt>
</dl>
</div>
<p>设置的界面也很简单，输入帐号，以及SSH代理的本地端口即可。记得把转发类型设置为Dynamic。</p>
<div class="mceTemp mceIEcenter">
<dl class="wp-caption aligncenter" style="width: 623px;">
<dt class="wp-caption-dt"><a href="http://www.xiaozhou.net/pics/gSTM/gsgm2.png"><img src="http://www.xiaozhou.net/pics/gSTM/gstm2.png" alt="" width="613" height="514" /></a></dt>
</dl>
</div>
<p>做好简单的设置，点击Start按钮，你就可以自由的跨栏了……</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年06月8日 -- <a href="http://www.xiaozhou.net/ittech/software/share_ssh_via_tunnelier-2010-06-08.htm" title="Tunnelier实现多人共享SSH上网">Tunnelier实现多人共享SSH上网</a> (6)</li><li>2010年01月29日 -- <a href="http://www.xiaozhou.net/ittech/software/a_nice_firefox_add_ons_autoproxy-2010-01-29.htm" title="一个不错的Firefox Add-ons: AutoProxy">一个不错的Firefox Add-ons: AutoProxy</a> (14)</li><li>2010年08月7日 -- <a href="http://www.xiaozhou.net/blackberry/a_ssh_client_on_blackberry_bbssh-2010-08-07.htm" title="推荐一个黑莓上的SSH客户端软件&#8211;BBSSH">推荐一个黑莓上的SSH客户端软件&#8211;BBSSH</a> (15)</li><li>2010年03月26日 -- <a href="http://www.xiaozhou.net/blackberry/manage_your_vps_through_bb-2010-03-26.htm" title="用BB管理你的VPS">用BB管理你的VPS</a> (12)</li><li>2010年03月16日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_ssh_problem_fix-2010-03-16.htm" title="VPS SSH故障及解决">VPS SSH故障及解决</a> (12)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/ssh_tunnel_software_under_linux-2010-05-22.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 更新源收集</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm#comments</comments>
		<pubDate>Mon, 10 May 2010 15:31:17 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/?p=603</guid>
		<description><![CDATA[网上收集来的Ubuntu 10.04更新源，感觉网易的速度还不错，其他几个都是国内的，大家可以试试。 使用方法： 1.sudo gedit   /etc/apt/sources.list 编辑你的源列表，将原来的内容全部删除，添加下面列表中最适合你的源 （注意不要全部添加），选择一个最合适你的即可，复制到你的列表中，然后保存列表。 2.sudo apt-get update   更新源列表信息 可以在运行“sudo   apt-get update ”时查看一下错误信息，把不能连接的源删除再重新运行“sudo apt-get update ”。 3.sudo apt-get upgrade  升  级 或者用ubuntu自带的更新管理器升级 也可 Ubuntu 10.04源列表： 台湾 deb http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid main universe restricted multiverse deb http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main multiverse restricted deb-src http://tw.archive.ubuntu.com/ubuntu/ lucid-security universe main [...]]]></description>
			<content:encoded><![CDATA[<p>网上收集来的Ubuntu 10.04更新源，感觉网易的速度还不错，其他几个都是国内的，大家可以试试。</p>
<p>使用方法：<br />
1.sudo gedit   /etc/apt/sources.list<br />
编辑你的源列表，将原来的内容全部删除，添加下面列表中最适合你的源 （注意不要全部添加），选择一个最合适你的即可，复制到你的列表中，然后保存列表。<br />
2.sudo apt-get update    更新源列表信息<br />
可以在运行“sudo   apt-get update ”时查看一下错误信息，把不能连接的源删除再重新运行“sudo  apt-get update ”。<br />
3.sudo apt-get upgrade  升  级<br />
或者用ubuntu自带的更新管理器升级 也可<br />
Ubuntu 10.04源列表：</p>
<p>台湾<br />
deb  <a id="url_1" onclick="return checkUrl(this)" href="http://tw.archive.ubuntu.com/ubuntu/" target="_blank">http://tw.archive.ubuntu.com/ubuntu/</a> lucid main universe restricted multiverse<br />
deb-src <a id="url_2" onclick="return checkUrl(this)" href="http://tw.archive.ubuntu.com/ubuntu/" target="_blank">http://tw.archive.ubuntu.com/ubuntu/</a> lucid main universe restricted multiverse<br />
deb <a id="url_3" onclick="return checkUrl(this)" href="http://tw.archive.ubuntu.com/ubuntu/" target="_blank">http://tw.archive.ubuntu.com/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_4" onclick="return checkUrl(this)" href="http://tw.archive.ubuntu.com/ubuntu/" target="_blank">http://tw.archive.ubuntu.com/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_5" onclick="return checkUrl(this)" href="http://tw.archive.ubuntu.com/ubuntu/" target="_blank">http://tw.archive.ubuntu.com/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb-src <a id="url_6" onclick="return checkUrl(this)" href="http://tw.archive.ubuntu.com/ubuntu/" target="_blank">http://tw.archive.ubuntu.com/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<p>SRT Sources<br />
deb <a id="url_7" onclick="return checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid main restricted universe multiverse<br />
deb <a id="url_8" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-security main restricted universe multiverse<br />
deb <a id="url_9" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-updates main restricted universe multiverse<br />
deb <a id="url_10" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-proposed main restricted universe multiverse<br />
deb <a id="url_11" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-backports main restricted universe multiverse<br />
deb-src <a id="url_12" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid main  restricted universe multiverse<br />
deb-src <a id="url_13" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-security main restricted universe multiverse<br />
deb-src <a id="url_14" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-updates main restricted universe multiverse<br />
deb-src <a id="url_15" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-proposed main restricted universe multiverse<br />
deb-src <a id="url_16" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-backports main restricted universe multiverse</p>
<p>网易（速度很快）<br />
deb <a id="url_17" onclick="return checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid main universe restricted multiverse<br />
deb-src <a id="url_18" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid  main universe restricted multiverse<br />
deb <a id="url_19" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_20" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_21" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb <a id="url_22" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb-src <a id="url_23" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb <a id="url_24" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_25" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_26" onclick="return  checkUrl(this)" href="http://mirrors.163.com/ubuntu/" target="_blank">http://mirrors.163.com/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<p>ubuntu官方上海源，提供  Kernel，Hiweed，ubuntu<br />
deb <a id="url_27" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid main universe restricted multiverse<br />
deb-src <a id="url_28" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid main universe restricted multiverse<br />
deb <a id="url_29" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_30" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_31" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb <a id="url_32" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb-src <a id="url_33" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb <a id="url_34" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_35" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_36" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<p>搜狐源:<br />
deb  <a id="url_37" onclick="return checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid main universe restricted multiverse<br />
deb-src <a id="url_38" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid  main universe restricted multiverse<br />
deb <a id="url_39" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_40" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_41" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb <a id="url_42" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb-src <a id="url_43" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb <a id="url_44" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_45" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_46" onclick="return  checkUrl(this)" href="http://mirrors.shlug.org/ubuntu/" target="_blank">http://mirrors.shlug.org/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<p>骨头源，骨头源是 bones7456架设的一个Ubuntu源 ，提供ubuntu,deepin<br />
deb <a id="url_47" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid main  universe restricted multiverse<br />
deb-src <a id="url_48" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid main  universe restricted multiverse<br />
deb <a id="url_49" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_50" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_51" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb <a id="url_52" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb-src <a id="url_53" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb <a id="url_54" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_55" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_56" onclick="return  checkUrl(this)" href="http://ubuntu.srt.cn/ubuntu/" target="_blank">http://ubuntu.srt.cn/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<p>lupaworld源:<br />
deb <a id="url_57" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid main universe restricted multiverse<br />
deb-src <a id="url_58" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid main universe restricted multiverse</p>
<p>deb <a id="url_59" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_60" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_61" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb <a id="url_62" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb-src <a id="url_63" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb <a id="url_64" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_65" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_66" onclick="return checkUrl(this)" href="http://mirror.lupaworld.com/ubuntu/" target="_blank">http://mirror.lupaworld.com/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<p>rootguide 源，ubuntu官方上海源，提供 Kernel，Hiweed，ubuntu<br />
deb <a id="url_67" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid main universe restricted multiverse<br />
deb-src <a id="url_68" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid main universe restricted multiverse<br />
deb <a id="url_69" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb-src <a id="url_70" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-security universe main multiverse restricted<br />
deb <a id="url_71" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-updates universe main multiverse restricted<br />
deb <a id="url_72" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb-src <a id="url_73" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-proposed universe main multiverse restricted<br />
deb <a id="url_74" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_75" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-backports universe main multiverse restricted<br />
deb-src <a id="url_76" onclick="return checkUrl(this)" href="http://mirror.rootguide.org/ubuntu/" target="_blank">http://mirror.rootguide.org/ubuntu/</a> lucid-updates universe main multiverse restricted</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年08月21日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm" title="Ubuntu下的一款Dock工具-AWN">Ubuntu下的一款Dock工具-AWN</a> (4)</li><li>2010年08月17日 -- <a href="http://www.xiaozhou.net/essay/show_my_ubuntu_t_shirt-2010-08-17.htm" title="Show一下俺的Ubuntu T恤">Show一下俺的Ubuntu T恤</a> (12)</li><li>2010年08月14日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm" title="Ubuntu中mono环境的搭建">Ubuntu中mono环境的搭建</a> (3)</li><li>2010年07月3日 -- <a href="http://www.xiaozhou.net/blackberry/blackberry_rom_update_to_os5_0_0_681-2010-07-03.htm" title="BlackBerry 系统刷至OS5.0.0.681">BlackBerry 系统刷至OS5.0.0.681</a> (4)</li><li>2010年06月12日 -- <a href="http://www.xiaozhou.net/aboutsite/wordpress/blog_plugins_updated-2010-06-12.htm" title="Blog插件更新">Blog插件更新</a> (20)</li><li>2010年06月6日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm" title="Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法">Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法</a> (4)</li><li>2010年05月2日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm" title="Ubuntu 10.04 LTS 安装手记及体验">Ubuntu 10.04 LTS 安装手记及体验</a> (14)</li><li>2010年02月21日 -- <a href="http://www.xiaozhou.net/ittech/software/installation_of_ubuntu-2010-02-21.htm" title="台式机换上了Ubuntu">台式机换上了Ubuntu</a> (19)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 LTS 安装手记及体验</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm#comments</comments>
		<pubDate>Sun, 02 May 2010 14:44:52 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/?p=595</guid>
		<description><![CDATA[从Ubuntu的官网发布开始倒计时的时候，我就掰着手指，等着新版Ubuntu的最终发布。在临近发布的时候，还有爆料说Ubuntu发现重大bug，导致安装后引导程序会出现问题，不过这个BUG在最终发布的时候还是修复了。正式发布的第二天，俺就迫不及待的从官网拖了一个Ubuntu 10.04 64bit的Desktop版本，准备装在笔记本上，原因是笔记本是4G内存(嘿嘿……)。 继续按照老的套路，从U盘安装Ubuntu，这样可以不用刻光盘，避免浪费，且安装速度快，绿色，环保。整个安装过程很简洁，而且不到10分钟，就搞定了，这速度，比起安装Windows,实在有点出乎意料。而且比起自家大哥Ubuntu 9系列还要快，因为Ubuntu 9在安装时还要在线下载一些东西，会耽误一定的时间。 安装完毕，第一次进入Ubuntu 10，给人比较耳目一新的感觉，特比是菜单栏上多出的一个聊天帐号设置，包括众多兼容的实时聊天软件，这也是Ubuntu 10主打的一特色：加强的社区交互功能。另外值得一提的是Ubuntu One，Ubuntu的云集算服务功能，相当不错。目前Ubuntu对硬件的识别更加友好了，在ThinkPad的机器上，根本不用安装任何驱动，Ubuntu已经能自动识别包括：声卡/无线网卡/以太网卡/声音调整按钮/蓝牙/亮度调节 等等驱动，非常人性化。而且发现Ubuntu本身已经自带了非常流行的iBus输入法，只需要再在机器的语言支持中，装上中文和一些其他附带的东东，就可以方便的用iBus输入中文了，这又算是个亮点。 作为一款粉丝众多的Linux发行版本，Ubuntu在用户易用性和UI上花了不少的功夫，并且自带的一系列软件，足以满足用户一般的上网/图片处理/文字处理等需求，看来国内用户要逐步脱离Win的束缚，迁移到Linux的日子不远了…… 本文纯属自己使用Ubuntu Linux的一些流水帐和感受，欢迎各位同学交流。 PS:本文发自 Ubuntu 10.04 LTS 64bit Desktop Edition ，小小纪念一下。 你可能也对下列文章感兴趣2010年02月21日 -- 台式机换上了Ubuntu (19)2010年08月21日 -- Ubuntu下的一款Dock工具-AWN (4)2010年08月17日 -- Show一下俺的Ubuntu T恤 (12)2010年08月14日 -- Ubuntu中mono环境的搭建 (3)2010年07月16日 -- Linux中随机密码的生成 (3)2010年06月6日 -- Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法 (4)2010年05月10日 -- Ubuntu 10.04 更新源收集 (8)2010年03月16日 -- VPS SSH故障及解决 (12)2010年02月26日 [...]]]></description>
			<content:encoded><![CDATA[<p>从Ubuntu的官网发布开始倒计时的时候，我就掰着手指，等着新版Ubuntu的最终发布。在临近发布的时候，还有爆料说Ubuntu发现重大bug，导致安装后引导程序会出现问题，不过这个BUG在最终发布的时候还是修复了。正式发布的第二天，俺就迫不及待的从官网拖了一个Ubuntu 10.04 64bit的Desktop版本，准备装在笔记本上，原因是笔记本是4G内存(嘿嘿……)。 继续按照老的套路，从U盘安装Ubuntu，这样可以不用刻光盘，避免浪费，且安装速度快，绿色，环保。整个安装过程很简洁，而且不到10分钟，就搞定了，这速度，比起安装Windows,实在有点出乎意料。而且比起自家大哥Ubuntu 9系列还要快，因为Ubuntu 9在安装时还要在线下载一些东西，会耽误一定的时间。</p>
<p>安装完毕，第一次进入Ubuntu 10，给人比较耳目一新的感觉，特比是菜单栏上多出的一个聊天帐号设置，包括众多兼容的实时聊天软件，这也是Ubuntu 10主打的一特色：加强的社区交互功能。另外值得一提的是Ubuntu One，Ubuntu的云集算服务功能，相当不错。目前Ubuntu对硬件的识别更加友好了，在ThinkPad的机器上，根本不用安装任何驱动，Ubuntu已经能自动识别包括：声卡/无线网卡/以太网卡/声音调整按钮/蓝牙/亮度调节 等等驱动，非常人性化。而且发现Ubuntu本身已经自带了非常流行的iBus输入法，只需要再在机器的语言支持中，装上中文和一些其他附带的东东，就可以方便的用iBus输入中文了，这又算是个亮点。</p>
<p>作为一款粉丝众多的Linux发行版本，Ubuntu在用户易用性和UI上花了不少的功夫，并且自带的一系列软件，足以满足用户一般的上网/图片处理/文字处理等需求，看来国内用户要逐步脱离Win的束缚，迁移到Linux的日子不远了……</p>
<p>本文纯属自己使用Ubuntu Linux的一些流水帐和感受，欢迎各位同学交流。</p>
<p>PS:本文发自 Ubuntu 10.04 LTS 64bit Desktop Edition ，小小纪念一下。</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年02月21日 -- <a href="http://www.xiaozhou.net/ittech/software/installation_of_ubuntu-2010-02-21.htm" title="台式机换上了Ubuntu">台式机换上了Ubuntu</a> (19)</li><li>2010年08月21日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/awn_dock_tool_on_ubuntu-2010-08-21.htm" title="Ubuntu下的一款Dock工具-AWN">Ubuntu下的一款Dock工具-AWN</a> (4)</li><li>2010年08月17日 -- <a href="http://www.xiaozhou.net/essay/show_my_ubuntu_t_shirt-2010-08-17.htm" title="Show一下俺的Ubuntu T恤">Show一下俺的Ubuntu T恤</a> (12)</li><li>2010年08月14日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/configuration_of_mono_in_ubuntu-2010-08-14.htm" title="Ubuntu中mono环境的搭建">Ubuntu中mono环境的搭建</a> (3)</li><li>2010年07月16日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/generate_random_password_in_linux-2010-07-16.htm" title="Linux中随机密码的生成">Linux中随机密码的生成</a> (3)</li><li>2010年06月6日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.htm" title="Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法">Ubuntu中setfacl命令提示 Operation not supported 错误及解决方法</a> (4)</li><li>2010年05月10日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_source_list-2010-05-10.htm" title="Ubuntu 10.04 更新源收集">Ubuntu 10.04 更新源收集</a> (8)</li><li>2010年03月16日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_ssh_problem_fix-2010-03-16.htm" title="VPS SSH故障及解决">VPS SSH故障及解决</a> (12)</li><li>2010年02月26日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/vps_iptables_setting_example-2010-02-26.htm" title="vps中的iptables规则设置范例">vps中的iptables规则设置范例</a> (10)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_10_04_lts_installation_and_experience-2010-05-02.htm/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>BurstNET VPS上搭建OpenVPN</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/configure_openvpn_on_burstnet_vps-2010-03-28.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/configure_openvpn_on_burstnet_vps-2010-03-28.htm#comments</comments>
		<pubDate>Sun, 28 Mar 2010 13:33:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[BurstNet]]></category>
		<category><![CDATA[OpenVPN]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/burstnet-vps%e4%b8%8a%e6%90%ad%e5%bb%baopenvpn-2010-03-28.htm</guid>
		<description><![CDATA[俺的VPS是基于OpenVZ的，因而不支持PPTP VPN，唯一的办法，是搭建OpenVPN。和PPTP VPN相比，OpenVPN的搭建要稍微麻烦一些。并且服务端和客户端需要生成证书，以及修改配置文件。下面把BurstNET VPS上，Ubuntu系统中搭建OpenVPS的流水账记录一下，供日后参考： 1.前期工作，OpenVPN，需要TUN支持，默认情况下，是没有开启的，需要到后台管理平台中，点击Enable Tun/Tap即可开通。开通后，用命令 ?View Code BASH1 cat /dev/net/tun 如果返回 cat: /dev/net/tun: File descriptor in bad stat，表明已经成功启用TUN支持。 另外，需要iptables_nat模块支持，用命令 ?View Code BASH1 iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE 检查，如果返回iptables: Unknown error 4294967295，表明系统还不支持，需要联系客服开通。 2.安装OpenVPN，这个最简单不过了： ?View Code BASH1 sudo apt-get install openvpn 安装好后，默认的路径在 /usr/share/openvpn，进入 /usr/share/openvpn/easy-rsa/2.0 目录，用vim修改vars文件，加入自己的信息，这些信息在生成证书的时候会用到，下面是示例： ?View Code BASH1 2 3 [...]]]></description>
			<content:encoded><![CDATA[<p>俺的VPS是基于OpenVZ的，因而不支持PPTP VPN，唯一的办法，是搭建OpenVPN。和PPTP VPN相比，OpenVPN的搭建要稍微麻烦一些。并且服务端和客户端需要生成证书，以及修改配置文件。下面把BurstNET VPS上，Ubuntu系统中搭建OpenVPS的流水账记录一下，供日后参考：</p>
<p>1.前期工作，OpenVPN，需要TUN支持，默认情况下，是没有开启的，需要到后台管理平台中，点击Enable Tun/Tap即可开通。开通后，用命令</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code28'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56928"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p569code28"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>net<span style="color: #000000; font-weight: bold;">/</span>tun</pre></td></tr></table></div>

<p>如果返回 cat: /dev/net/tun: File descriptor in bad stat，表明已经成功启用TUN支持。</p>
<p>另外，需要iptables_nat模块支持，用命令</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code29'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56929"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p569code29"><pre class="bash" style="font-family:monospace;">iptables <span style="color: #660033;">-t</span> nat <span style="color: #660033;">-A</span> POSTROUTING <span style="color: #660033;">-s</span> 10.8.0.0<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">24</span> <span style="color: #660033;">-o</span> venet0 <span style="color: #660033;">-j</span> MASQUERADE</pre></td></tr></table></div>

<p>检查，如果返回iptables: Unknown error 4294967295，表明系统还不支持，需要联系客服开通。</p>
<p>2.安装OpenVPN，这个最简单不过了：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code30'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56930"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p569code30"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> openvpn</pre></td></tr></table></div>

<p>安装好后，默认的路径在 /usr/share/openvpn，进入 /usr/share/openvpn/easy-rsa/2.0 目录，用vim修改vars文件，加入自己的信息，这些信息在生成证书的时候会用到，下面是示例：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code31'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56931"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p569code31"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_COUNTRY</span>=<span style="color: #ff0000;">&quot;CN&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_PROVINCE</span>=<span style="color: #ff0000;">&quot;SC&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_CITY</span>=<span style="color: #ff0000;">&quot;ChengDu&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_ORG</span>=<span style="color: #ff0000;">&quot;FreedomUnion&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">KEY_EMAIL</span>=<span style="color: #ff0000;">&quot;admin@xiaozhou.net&quot;</span></pre></td></tr></table></div>

<p>修改好后，保存文件，用命令 . ./var运行，注意两个点之间有个空格。运行后，会设置好变量，接下来按照下面顺序，运行命令，生成证书：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code32'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56932"><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code" id="p569code32"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>build-ca
.<span style="color: #000000; font-weight: bold;">/</span>build-key-server timothy-vps
.<span style="color: #000000; font-weight: bold;">/</span>build-key ClientName
.<span style="color: #000000; font-weight: bold;">/</span>build-dh</pre></td></tr></table></div>

<p>./build-key-server 用来生成服务端证书，./build-key用来生成客户端证书，有几个客户端，就需要生成几个。</p>
<p>生成好后，接下来需要配置服务端配置文件，把/usr/share/openvpn/easy-rsa/2.0/keys目录下所有生成好的证书文件，拷贝到 /etc/openvpn/keys，接下来，编辑服务端配置文件:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code33'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56933"><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
</pre></td><td class="code" id="p569code33"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn
<span style="color: #c20cb9; font-weight: bold;">vim</span> server.conf
&nbsp;
<span style="color: #666666; font-style: italic;">#输入以下内容到配置文件</span>
port <span style="color: #000000;">1194</span>
proto tcp
dev tun
ca <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>keys<span style="color: #000000; font-weight: bold;">/</span>ca.crt
cert <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>keys<span style="color: #000000; font-weight: bold;">/</span>timothy-vps.crt
key <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>keys<span style="color: #000000; font-weight: bold;">/</span>timothy-vps.key
dh <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>keys<span style="color: #000000; font-weight: bold;">/</span>dh1024.pem
server 10.8.0.0 255.255.255.0
push <span style="color: #ff0000;">&quot;redirect-gateway def1&quot;</span>
push <span style="color: #ff0000;">&quot;dhcp-option DNS 208.67.222.222&quot;</span>
push <span style="color: #ff0000;">&quot;dhcp-option DNS 208.67.220.220&quot;</span>
client-to-client
keepalive <span style="color: #000000;">10</span> <span style="color: #000000;">120</span>
comp-lzo
persist-key
persist-tun
verb <span style="color: #000000;">3</span></pre></td></tr></table></div>

<p>编辑好后，保存文件,用vim编辑 /etc/sysctl.conf，把net.ipv4.ip_forward=0改成 net.ipv4.ip_forward = 1，运行 sysctl -p命令，编辑/etc/init.d/iptables，加入以下规则：</p>
<p>/sbin/iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT &#8211;to-source Your-VPS-IP</p>
<p>接下来，服务端配置基本结束，运行命令，启动OpenVPN客户端:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p569code34'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p56934"><td class="line_numbers"><pre>1
</pre></td><td class="code" id="p569code34"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>openvpn <span style="color: #660033;">--config</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>openvpn<span style="color: #000000; font-weight: bold;">/</span>server.conf <span style="color: #000000; font-weight: bold;">&amp;</span></pre></td></tr></table></div>

<p>如果需要开机启动，把上面命令加入到/etc/rc.local即可</p>
<p>服务端启动成功截图</p>
<p><a href="http://www.xiaozhou.net/pics/VPSOpenVPN_129F8/image.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="image" src="http://www.xiaozhou.net/pics/VPSOpenVPN_129F8/image_thumb.png" border="0" alt="image" width="644" height="381" /></a></p>
<p>接下来，配置客户端了，Windows下使用OpenVPN，需要<a href="http://www.openvpn.net/index.php/open-source/downloads.html" target="_blank">下载</a>最新版的OpenVPN安装程序。安装好后，将在VPS上生成好的证书文件，下载到客户端，包括ca.crt证书，以及客户端证书:timothy.crt  timothy.key，将它们统统拷贝到OpenVPS安装目录下的config目录，编写客户端文件，保存为client.ovpn，内容如下:</p>
<p>client<br />
dev tun<br />
proto tcp<br />
remote Your-VPS-IP 1194<br />
resolv-retry infinite<br />
nobind<br />
persist-key<br />
persist-tun<br />
ca ca.crt<br />
cert timothy.crt<br />
key timothy.key<br />
ns-cert-type server<br />
comp-lzo<br />
verb 3</p>
<p>保存好后，右键点击client.ovpn，选择“Start OpenVPN on this config file”，建立VPN连接，建立好后，命令行会有如下提示： Initialization Sequence Completed，表示连接成功，这下，可以VPN上网了。去ip138.com，看看你的IP，应该是VPS的IP了：</p>
<p><a href="http://www.xiaozhou.net/pics/VPSOpenVPN_129F8/image_3.png"><img style="display: block; float: none; margin-left: auto; margin-right: auto; border-width: 0px;" title="image" src="http://www.xiaozhou.net/pics/VPSOpenVPN_129F8/image_thumb_3.png" border="0" alt="image" width="555" height="197" /></a></p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年06月14日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/burstnet_and_linode_vps_unixbench_test-2010-06-14.htm" title="BurstNET和Linode VPS的UnixBench测试">BurstNET和Linode VPS的UnixBench测试</a> (6)</li><li>2010年06月5日 -- <a href="http://www.xiaozhou.net/aboutsite/sitelog/toss_about_blog-2010-06-05.htm" title="Blog折腾小记">Blog折腾小记</a> (13)</li><li>2010年09月2日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/linode_vps_runs_well-2010-09-02.htm" title="Linode VPS稳定运行中">Linode VPS稳定运行中</a> (11)</li><li>2010年08月28日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/install_xwindow_in_your_vps-2010-08-28.htm" title="VPS中安装xWindow">VPS中安装xWindow</a> (14)</li><li>2010年07月14日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/cloud_vps_free_trial-2010-07-14.htm" title="Cloud VPS 免费试用与体验">Cloud VPS 免费试用与体验</a> (9)</li><li>2010年07月9日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_fans_qq_group_created-2010-07-09.htm" title="建立VPS Fans QQ群">建立VPS Fans QQ群</a> (11)</li><li>2010年07月2日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/wordpress_data_backup_shell_script-2010-07-02.htm" title="WordPress数据自动备份脚本">WordPress数据自动备份脚本</a> (4)</li><li>2010年06月29日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_common_used_settings-2010-06-29.htm" title="VPS常用设置技巧整理">VPS常用设置技巧整理</a> (4)</li><li>2010年03月26日 -- <a href="http://www.xiaozhou.net/blackberry/manage_your_vps_through_bb-2010-03-26.htm" title="用BB管理你的VPS">用BB管理你的VPS</a> (12)</li><li>2010年03月16日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_ssh_problem_fix-2010-03-16.htm" title="VPS SSH故障及解决">VPS SSH故障及解决</a> (12)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/configure_openvpn_on_burstnet_vps-2010-03-28.htm/feed</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>vps中的iptables规则设置范例</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/vps_iptables_setting_example-2010-02-26.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/vps_iptables_setting_example-2010-02-26.htm#comments</comments>
		<pubDate>Fri, 26 Feb 2010 14:25:33 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[setting]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/?p=543</guid>
		<description><![CDATA[忙乎了一两天，俺的VPS算是上线了，基于Ubuntu Linux的，512MB内存，20G硬盘，1TB月流量，赠送2个IP，还不错。不过，现在还没有把博客迁移过去的打算，此VPS仅作为练手而用，只是建了一些ssh账号，供自己和同事跨栏用，还简单的搭建了基于Nginx+MySql+PHP+FastCGI的WordPress环境，并成功拉过来俺的一位同事在上面安了个blog，嘿嘿。 提到VPS，最重要的还是安全，毕竟你的系统是直接面向公网，如果不加强防范，很容易成为别人手里的肉鸡。Linux中的iptables，用过的同学都知道，是一个基于Linux内核的防火墙，功能比较强大，下面是iptable的一些常用的规则设置： ?View Code BASH1 2 3 4 5 6 7 8 9 10 11 12 /sbin/iptables -P INPUT DROP #禁止掉服务器所有入口请求，后面的规则只允许部分常用的服务端口 /sbin/iptables -P OUTPUT ACCEPT #允许服务器访问出口请求 /sbin/iptables -A INPUT -i lo -j ACCEPT #允许本地接口访问 /sbin/iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j DROP #禁止ping，因为ping是基于icmp协议的 /sbin/iptables -A INPUT -p tcp -m tcp --dport [...]]]></description>
			<content:encoded><![CDATA[<p>忙乎了一两天，俺的VPS算是上线了，基于Ubuntu Linux的，512MB内存，20G硬盘，1TB月流量，赠送2个IP，还不错。不过，现在还没有把博客迁移过去的打算，此VPS仅作为练手而用，只是建了一些ssh账号，供自己和同事跨栏用，还简单的搭建了基于Nginx+MySql+PHP+FastCGI的WordPress环境，并成功拉过来俺的一位同事在上面安了个blog，嘿嘿。<br />
提到VPS，最重要的还是安全，毕竟你的系统是直接面向公网，如果不加强防范，很容易成为别人手里的肉鸡。Linux中的iptables，用过的同学都知道，是一个基于Linux内核的防火墙，功能比较强大，下面是iptable的一些常用的规则设置：</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p543code37'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p54337"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code" id="p543code37"><pre class="bash" style="font-family:monospace;">        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> INPUT DROP              <span style="color: #666666; font-style: italic;">#禁止掉服务器所有入口请求，后面的规则只允许部分常用的服务端口</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> OUTPUT ACCEPT          <span style="color: #666666; font-style: italic;">#允许服务器访问出口请求</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT    <span style="color: #666666; font-style: italic;">#允许本地接口访问</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-m</span> icmp <span style="color: #660033;">--icmp-type</span> <span style="color: #000000;">8</span> <span style="color: #660033;">-j</span> DROP <span style="color: #666666; font-style: italic;">#禁止ping，因为ping是基于icmp协议的</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">20</span> <span style="color: #660033;">-j</span> ACCEPT    <span style="color: #666666; font-style: italic;">#允许部分常用端口入口请求访问</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">21</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">25</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">53</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> udp <span style="color: #660033;">-m</span> udp <span style="color: #660033;">--dport</span> <span style="color: #000000;">53</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">80</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> all <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> ESTABLISHED,RELATED <span style="color: #660033;">-j</span> ACCEPT  <span style="color: #666666; font-style: italic;">#允许所有已经连接端口请求</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> all <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> INVALID,NEW <span style="color: #660033;">-j</span> DROP              <span style="color: #666666; font-style: italic;">#DROP掉所有失效或者新的请求</span></pre></td></tr></table></div>

<p>可以把上述脚本保存起来，执行，然后用命令/sbin/iptables -L -n查看规则是否生效</p>
<p>把上述脚本再完善一下:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p543code38'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p54338"><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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
</pre></td><td class="code" id="p543code38"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">PATH</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>sbin:<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>bin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin:<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #000000; font-weight: bold;">/</span>sbin:~<span style="color: #000000; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">export</span> PATH
&nbsp;
<span style="color: #000000; font-weight: bold;">case</span> <span style="color: #ff0000;">&quot;$1&quot;</span> <span style="color: #000000; font-weight: bold;">in</span>
start<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Staring to write your Iptbales:...&quot;</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> INPUT DROP
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> OUTPUT ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-m</span> icmp <span style="color: #660033;">--icmp-type</span> <span style="color: #000000;">8</span> <span style="color: #660033;">-j</span> DROP
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">20</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">21</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">25</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">53</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> udp <span style="color: #660033;">-m</span> udp <span style="color: #660033;">--dport</span> <span style="color: #000000;">53</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">80</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> all <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> ESTABLISHED,RELATED <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> all <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> INVALID,NEW <span style="color: #660033;">-j</span> DROP
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Ok&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">;;</span>
stop<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Cleaning your Iptables:...&quot;</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-F</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-X</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-Z</span>
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> INPUT ACCEPT
	<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> OUTPUT ACCEPT
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Ok&quot;</span>
<span style="color: #000000; font-weight: bold;">;;</span>
restart<span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Cleaning your Iptables:...&quot;</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-F</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-X</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-Z</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Ok&quot;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Staring to write your Iptbales:...&quot;</span>
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> INPUT DROP
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-P</span> OUTPUT ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> lo <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> icmp <span style="color: #660033;">-m</span> icmp <span style="color: #660033;">--icmp-type</span> <span style="color: #000000;">8</span> <span style="color: #660033;">-j</span> DROP
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">20</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">21</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">25</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">53</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> udp <span style="color: #660033;">-m</span> udp <span style="color: #660033;">--dport</span> <span style="color: #000000;">53</span> <span style="color: #660033;">-j</span> ACCEPT       
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">-m</span> tcp <span style="color: #660033;">--dport</span> <span style="color: #000000;">80</span> <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> all <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> ESTABLISHED,RELATED <span style="color: #660033;">-j</span> ACCEPT
        <span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-p</span> all <span style="color: #660033;">-m</span> state <span style="color: #660033;">--state</span> INVALID,NEW <span style="color: #660033;">-j</span> DROP
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Ok&quot;</span>
<span style="color: #000000; font-weight: bold;">;;</span>
<span style="color: #000000; font-weight: bold;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
        <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Usage: $0          {start|stop|restart}&quot;</span>
<span style="color: #000000; font-weight: bold;">esac</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">0</span></pre></td></tr></table></div>

<p>这样，我们就可以用start/stop/restart的参数来启用、禁止iptables防护了，很方便。另外，可以把此脚本放入/etc/init.d，让它像系统服务一样，在VPS启动的时候自动运行。</p>
<p>PS:<br />
1.此脚本参考自网上，并作了部分修改<br />
2.搜狗云输入法，也有郁闷的时候，在写文章的时候，候选词半天不出来，很卡，囧rz 是我打字速度太快，还是网速很慢？……</p>
<h3  class="related_post_title">你可能也对下列文章感兴趣</h3><ul class="related_post"><li>2010年06月29日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_common_used_settings-2010-06-29.htm" title="VPS常用设置技巧整理">VPS常用设置技巧整理</a> (4)</li><li>2010年03月16日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_ssh_problem_fix-2010-03-16.htm" title="VPS SSH故障及解决">VPS SSH故障及解决</a> (12)</li><li>2010年09月2日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/linode_vps_runs_well-2010-09-02.htm" title="Linode VPS稳定运行中">Linode VPS稳定运行中</a> (11)</li><li>2010年08月28日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/install_xwindow_in_your_vps-2010-08-28.htm" title="VPS中安装xWindow">VPS中安装xWindow</a> (14)</li><li>2010年07月16日 -- <a href="http://www.xiaozhou.net/ittech/linux-ittech/generate_random_password_in_linux-2010-07-16.htm" title="Linux中随机密码的生成">Linux中随机密码的生成</a> (3)</li><li>2010年07月14日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/cloud_vps_free_trial-2010-07-14.htm" title="Cloud VPS 免费试用与体验">Cloud VPS 免费试用与体验</a> (9)</li><li>2010年07月9日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/vps_fans_qq_group_created-2010-07-09.htm" title="建立VPS Fans QQ群">建立VPS Fans QQ群</a> (11)</li><li>2010年07月2日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/wordpress_data_backup_shell_script-2010-07-02.htm" title="WordPress数据自动备份脚本">WordPress数据自动备份脚本</a> (4)</li><li>2010年06月14日 -- <a href="http://www.xiaozhou.net/ittech/vps-ittech/burstnet_and_linode_vps_unixbench_test-2010-06-14.htm" title="BurstNET和Linode VPS的UnixBench测试">BurstNET和Linode VPS的UnixBench测试</a> (6)</li><li>2010年06月5日 -- <a href="http://www.xiaozhou.net/aboutsite/sitelog/toss_about_blog-2010-06-05.htm" title="Blog折腾小记">Blog折腾小记</a> (13)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/vps_iptables_setting_example-2010-02-26.htm/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
