﻿<?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>Fri, 03 Feb 2012 17:24:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu下手动升级Firefox到9.0.1</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/manually_upgrade_firefox_on_ubuntu-2012-01-03.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/manually_upgrade_firefox_on_ubuntu-2012-01-03.htm#comments</comments>
		<pubDate>Tue, 03 Jan 2012 15:30:56 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[手动升级]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/?p=1368</guid>
		<description><![CDATA[要说我家里的台式机，算是个古董机了，当然，还不算是我用过的电脑中最老的。这台机器是我上大二的时候配的机器： Athlon 1700+的CPU 80G的希捷IDE硬盘 内存最早是256MB，后来又升级成512MB，再后来，又升级成1.5GB。 显卡最初是个Geforce 2的显卡，后来又升级成Geforce 6200，一直用到现在&#8230;&#8230; 光驱，软驱，早就歇菜了，停止工作了。 机箱前面的面板，也惨不忍睹，因为开机键和Reset键不灵了，索性去掉了面板，直接短接两个触点来开机&#8230;&#8230; 这么老的机器，当初装的是Windows XP，后来用起来确实觉得慢，但是又舍不得扔掉，于是装了个Ubuntu，一直用到现在&#8230;&#8230; 其实，我也想找个借口把它给淘汰掉的，不过这台机器确实是个生命的奇迹，到现在都还能开机运行&#8230;&#8230; 再加上，哥是个怀旧的人，所以只要它还能工作一天，我就留它一天。与之配对的，还有一对慧海的音箱，到现在也工作正常，不得不佩服当年电脑产品的质量 这台机器能算的上是尘封已久了，因为自从我买了Mac mini后，就基本没开过机了。最近出掉了Mac mini，总觉得书房里面比较空空荡荡，于是，又把这台电脑接上显示器，打算继续用。结果，果然没让哥失望，这台电脑开机了，并且点亮了显示器，熟悉的Ubuntu图标又出现了&#8230;&#8230;这台电脑，用来上网，写blog，下BT什么的，毫无压力。 言归正传，上了一会儿网，我无意之中发现，这台机器的Firefox还是3.6.1，太老了，老到它甚至没有自动检测新版并更新的功能。进入Firefox的About菜单，它只是默默的显示当前版本，并不会自动更新&#8230;&#8230;既然它不自动更新，哥只有来个手动更新了。 最近Firefox的版本号像发疯似的猛涨，我已经没法想象3.6.1和当前最新的9.0.1之间到底隔了多少个版本了。 来到Mozilla Firefox的官网，下载最新的9.0.1，下载下来过后，你会发现它并不是一个deb文件，而是一个bz2格式的archive文件，这意味着此包不能通过系统自动安装，而必须手动安装。 下面就是手动安装的过程： 卸载当前安装的低版本firefox，这个比较简单，用 sudo apt-get remove firefox 命令即可 解压你下载后的安装包，到你想要放置的目录，比如 /home/timothy/Downloads/firefox 开启命令行控制台，进入此目录，运行命令firefox，如下图： 出现如图的提示，会弹出Firefox的升级界面，稍等片刻，Firefox就安装好了&#8230;&#8230; 不过，别高兴得太早，如果你在这个控制台窗口上按了Ctrl+C的话，Firefox就自动退出了。这是因为，我们是以命令行来运行的Firefox的，并且，你在Ubuntu的菜单里面，也没有发现Firefox的快捷方式图标，这要怎么解决呢？ 用下面的方法可以解决： 用控制台程序，定位到/usr/share/applications，用vim编辑和建立一个文件，叫做firefox.desktop文件，输入以下内容： [Desktop Entry] Encoding=UTF-8 Name=Firefox 9.0.1 GenericName=Firefox 9 Comment=Mozilla Firefox 9.0.1 Exec=/home/timothy/Downloads/firefox/firefox Icon=/home/timothy/Downloads/firefox/icons/mozicon128.png Terminal=false Type=Application Categories=Application;GTK;GNOME;Network; 需要注意的是Exec，这是firefox的可执行文件路径，要和你刚才解压的文件路径一直，另外Icon是图标的地址，在你解压的位置找到对应文件的名字，然后填入到这一栏即可。 编辑完毕之后，保存并退出，然后去Ubuntu的Applications&#8211;>Internet，你就会发现Firefox的图标正乖乖的在那里等你呢&#8230;&#8230;这里显示的名称，和你刚才配置文件里面Name那一项是一致的。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 [...]]]></description>
			<content:encoded><![CDATA[<p>要说我家里的台式机，算是个古董机了，当然，还不算是我用过的电脑中最老的。这台机器是我上大二的时候配的机器：</p>
<p>Athlon 1700+的CPU<br />
 80G的希捷IDE硬盘<br />
 内存最早是256MB，后来又升级成512MB，再后来，又升级成1.5GB。<br />
 显卡最初是个Geforce 2的显卡，后来又升级成Geforce 6200，一直用到现在&hellip;&hellip;<br />
 光驱，软驱，早就歇菜了，停止工作了。<br />
 机箱前面的面板，也惨不忍睹，因为开机键和Reset键不灵了，索性去掉了面板，直接短接两个触点来开机&hellip;&hellip;<span id="more-1368"></span></p>
<p>这么老的机器，当初装的是Windows XP，后来用起来确实觉得慢，但是又舍不得扔掉，于是装了个Ubuntu，一直用到现在&hellip;&hellip; 其实，我也想找个借口把它给淘汰掉的，不过这台机器确实是个生命的奇迹，到现在都还能开机运行&hellip;&hellip; 再加上，哥是个怀旧的人，所以只要它还能工作一天，我就留它一天。与之配对的，还有一对慧海的音箱，到现在也工作正常，不得不佩服当年电脑产品的质量 <img src='http://www.xiaozhou.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>这台机器能算的上是尘封已久了，因为自从我买了Mac mini后，就基本没开过机了。最近出掉了Mac mini，总觉得书房里面比较空空荡荡，于是，又把这台电脑接上显示器，打算继续用。结果，果然没让哥失望，这台电脑开机了，并且点亮了显示器，熟悉的Ubuntu图标又出现了&hellip;&hellip;这台电脑，用来上网，写blog，下BT什么的，毫无压力。</p>
<p>言归正传，上了一会儿网，我无意之中发现，这台机器的Firefox还是3.6.1，太老了，老到它甚至没有自动检测新版并更新的功能。进入Firefox的About菜单，它只是默默的显示当前版本，并不会自动更新&hellip;&hellip;既然它不自动更新，哥只有来个手动更新了。</p>
<p>最近Firefox的版本号像发疯似的猛涨，我已经没法想象3.6.1和当前最新的9.0.1之间到底隔了多少个版本了。</p>
<p>来到Mozilla Firefox的官网，下载最新的9.0.1，下载下来过后，你会发现它并不是一个deb文件，而是一个bz2格式的archive文件，这意味着此包不能通过系统自动安装，而必须手动安装。</p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.xiaozhou.net/pics/firefox_upgrade/firefox1.jpeg" alt="" width="164" height="115" /></p>
<p>下面就是手动安装的过程：</p>
<ol>
<li>卸载当前安装的低版本firefox，这个比较简单，用 sudo apt-get remove firefox 命令即可</li>
<li>解压你下载后的安装包，到你想要放置的目录，比如 /home/timothy/Downloads/firefox</li>
<li>开启命令行控制台，进入此目录，运行命令firefox，如下图：</li>
</ol>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="http://www.xiaozhou.net/pics/firefox_upgrade/firefox.jpeg" alt="" width="654" height="308" /></p>
<p>出现如图的提示，会弹出Firefox的升级界面，稍等片刻，Firefox就安装好了&hellip;&hellip;</p>
<p>不过，别高兴得太早，如果你在这个控制台窗口上按了Ctrl+C的话，Firefox就自动退出了。这是因为，我们是以命令行来运行的Firefox的，并且，你在Ubuntu的菜单里面，也没有发现Firefox的快捷方式图标，这要怎么解决呢？ 用下面的方法可以解决：</p>
<p>用控制台程序，定位到/usr/share/applications，用vim编辑和建立一个文件，叫做firefox.desktop文件，输入以下内容：</p>
<p>[Desktop Entry]<br />
 Encoding=UTF-8<br />
 Name=Firefox 9.0.1<br />
 GenericName=Firefox 9<br />
 Comment=Mozilla Firefox 9.0.1<br />
 Exec=/home/timothy/Downloads/firefox/firefox<br />
 Icon=/home/timothy/Downloads/firefox/icons/mozicon128.png<br />
 Terminal=false<br />
 Type=Application<br />
 Categories=Application;GTK;GNOME;Network;</p>
<p>需要注意的是Exec，这是firefox的可执行文件路径，要和你刚才解压的文件路径一直，另外Icon是图标的地址，在你解压的位置找到对应文件的名字，然后填入到这一栏即可。</p>
<p>编辑完毕之后，保存并退出，然后去Ubuntu的Applications&#8211;>Internet，你就会发现Firefox的图标正乖乖的在那里等你呢&hellip;&hellip;这里显示的名称，和你刚才配置文件里面Name那一项是一致的。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/manually_upgrade_firefox_on_ubuntu-2012-01-03.htm/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>解决MySql数据库出现的Too many connections错误</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/resolve_mysql_error_too_many_connections-2011-09-14.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/resolve_mysql_error_too_many_connections-2011-09-14.htm#comments</comments>
		<pubDate>Wed, 14 Sep 2011 14:56:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[many]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqld]]></category>
		<category><![CDATA[too]]></category>
		<category><![CDATA[数据库]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/%e8%a7%a3%e5%86%b3mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e5%87%ba%e7%8e%b0%e7%9a%84too-many-connections%e9%94%99%e8%af%af-2011-09-14.htm</guid>
		<description><![CDATA[最近帮朋友维护的一个论坛，频繁抛出异常，一看，原来是MySQL数据库出错，提示为Too many connections。这错误，还是比较简单明了，一看就知道是MySQL数据库的连接达到最大了。于是，我开始设想，是不是MySQL也有个设置项，用来控制最大连接数的大小的？ 于是，google了一下，果然如此！ MySQL在默认情况下的最大连接数为100，如果网站访问量一上去，肯定会超过这个数值，于是果断改之！ 在my.conf的[mysqld]配置节中，加入如下配置项： max_connections = 500 这里，我改成了500，请根据你的机器的具体情况适当设置大小。改完后，重启MySQL服务即可。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></description>
			<content:encoded><![CDATA[<p>最近帮朋友维护的一个论坛，频繁抛出异常，一看，原来是MySQL数据库出错，提示为Too many connections。这错误，还是比较简单明了，一看就知道是MySQL数据库的连接达到最大了。于是，我开始设想，是不是MySQL也有个设置项，用来控制最大连接数的大小的？</p>
<p>于是，google了一下，果然如此！ MySQL在默认情况下的最大连接数为100，如果网站访问量一上去，肯定会超过这个数值，于是果断改之！</p>
<p>在my.conf的[mysqld]配置节中，加入如下配置项：</p>
<p>max_connections = 500</p>
<p>这里，我改成了500，请根据你的机器的具体情况适当设置大小。改完后，重启MySQL服务即可。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/resolve_mysql_error_too_many_connections-2011-09-14.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux下的SSH连接管理利器–PAC Manager</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/ssh_connection_management_tool_on_linux_pac_manager-2011-01-06.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/ssh_connection_management_tool_on_linux_pac_manager-2011-01-06.htm#comments</comments>
		<pubDate>Thu, 06 Jan 2011 15:01:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Manager]]></category>
		<category><![CDATA[Pac]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[管理]]></category>
		<category><![CDATA[连接]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/linux%e4%b8%8b%e7%9a%84ssh%e8%bf%9e%e6%8e%a5%e7%ae%a1%e7%90%86%e5%88%a9%e5%99%a8-pac-manager-2011-01-06.htm</guid>
		<description><![CDATA[不知道拥有多个VPS的童鞋，平时是怎样来管理VPS的？在Windows下，我一般用SecureCRT来对VPS进行管理，原因是SecureCRT提供Tab标签管理的方式，多个VPS可以同时进行连接，并通过标签页进行快速切换，非常方便。至于在Linux下，我就只好老老实实的开个Console来连接VPS了。不过，今天发现一个很不错的开源软件，试用了一下，果然是Linux下管理多个VPS的利器，而且还有很多功能非常实用。 Pac Manager的官方地址，在SourceForge上：http://sourceforge.net/projects/pacmanager/ Linux下，可以直接下载发布的deb安装包进行安装。安装Pac Manager，还需要依赖另外一个安装包：libgnome2-vte-perl_0.09-1_i386.deb (64位系统，需要安装这个 libgnome2-vte-perl_0.09-1_amd64.deb)，需要先安装依赖的安装包，再安装Pac Manager，否则会提示错误，找不到依赖的安装包，无法进行安装。 安装好后，就可以在主菜单的Internet子菜单中，找到Pac了。点击，即可启动。 Pac Manager有个非常贴心的功能，就是能用你的桌面背景图片作为SSH界面的背景，让人看起来心旷神怡。左边的连接管理面板，可以添加多个VPS，并且能进行分组管理。连接面板可以点击下面的&#8221;Hide Connections&#8221;进行隐藏和再显示。另外，在这个Tab也中，也可以打开一个Linux下的本地Shell。下面的一排按钮，还有许多其他的功能，童鞋们慢慢体会吧。 配置VPS连接信息的对话框，功能也很全，并且还有端口转发功能(这个功能不用多说了，也就是可以用SSH来跨栏……)，和预处理命令功能，非常强大。 有兴趣的同学不防试试，在Linux下管理你的多个VPS。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></description>
			<content:encoded><![CDATA[<p>不知道拥有多个VPS的童鞋，平时是怎样来管理VPS的？在Windows下，我一般用SecureCRT来对VPS进行管理，原因是SecureCRT提供Tab标签管理的方式，多个VPS可以同时进行连接，并通过标签页进行快速切换，非常方便。至于在Linux下，我就只好老老实实的开个Console来连接VPS了。不过，今天发现一个很不错的开源软件，试用了一下，果然是Linux下管理多个VPS的利器，而且还有很多功能非常实用。</p>
<p>Pac Manager的官方地址，在SourceForge上：<a title="http://sourceforge.net/projects/pacmanager/" href="http://sourceforge.net/projects/pacmanager/">http://sourceforge.net/projects/pacmanager/</a><br />
Linux下，可以直接下载发布的deb安装包进行安装。安装Pac Manager，还需要依赖另外一个安装包：<a href="http://sourceforge.net/projects/pacmanager/files/libgnome2-vte-perl_0.09-1_i386.deb/download">libgnome2-vte-perl_0.09-1_i386.deb</a> (64位系统，需要安装这个 <a href="http://sourceforge.net/projects/pacmanager/files/libgnome2-vte-perl_0.09-1_amd64.deb/download">libgnome2-vte-perl_0.09-1_amd64.deb</a>)，需要先安装依赖的安装包，再安装Pac Manager，否则会提示错误，找不到依赖的安装包，无法进行安装。</p>
<p>安装好后，就可以在主菜单的Internet子菜单中，找到Pac了。点击，即可启动。<span id="more-916"></span></p>
<p>Pac Manager有个非常贴心的功能，就是能用你的桌面背景图片作为SSH界面的背景，让人看起来心旷神怡。左边的连接管理面板，可以添加多个VPS，并且能进行分组管理。连接面板可以点击下面的&#8221;Hide Connections&#8221;进行隐藏和再显示。另外，在这个Tab也中，也可以打开一个Linux下的本地Shell。下面的一排按钮，还有许多其他的功能，童鞋们慢慢体会吧。</p>
<p><a href="http://www.xiaozhou.net/pics/Linux_13E16/pac1.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="pac1" src="http://www.xiaozhou.net/pics/Linux_13E16/pac1_thumb.jpg" border="0" alt="pac1" width="644" height="419" /></a></p>
<p>配置VPS连接信息的对话框，功能也很全，并且还有端口转发功能(这个功能不用多说了，也就是可以用SSH来跨栏……)，和预处理命令功能，非常强大。</p>
<p><a href="http://www.xiaozhou.net/pics/Linux_13E16/pac2.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border-width: 0px;" title="pac2" src="http://www.xiaozhou.net/pics/Linux_13E16/pac2_thumb.jpg" border="0" alt="pac2" width="576" height="484" /></a></p>
<p>有兴趣的同学不防试试，在Linux下管理你的多个VPS。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/ssh_connection_management_tool_on_linux_pac_manager-2011-01-06.htm/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Ubuntu 11.04倒计时器</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_1104_countdown-2010-12-31.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_1104_countdown-2010-12-31.htm#comments</comments>
		<pubDate>Thu, 30 Dec 2010 17:11:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[11.04]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[倒计时]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/ubuntu-11-04%e5%80%92%e8%ae%a1%e6%97%b6%e5%99%a8-2010-12-31.htm</guid>
		<description><![CDATA[虽然Ubuntu 11.04发布的时间还有点早，不过作为一个Ubuntu的Fans，还是怀着期待的心情。于是，我在我的Blog上放了一个Ubuntu 11.04发布的倒计时器(见右边) 如果你也有兴趣，可以参考wowubuntu放出的代码，有大图标和小图标版本，还有迷你型和文字型，可以直接嵌入到你的blog或者BBS中。 由此传送到Wow! Ubuntu 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></description>
			<content:encoded><![CDATA[<p>虽然Ubuntu 11.04发布的时间还有点早，不过作为一个Ubuntu的Fans，还是怀着期待的心情。于是，我在我的Blog上放了一个Ubuntu 11.04发布的倒计时器(见右边)</p>
<p>如果你也有兴趣，可以参考wowubuntu放出的代码，有大图标和小图标版本，还有迷你型和文字型，可以直接嵌入到你的blog或者BBS中。<br />
由此传送到<a href="http://www.xiaozhou.net/go/wowubuntu" target="_blank">Wow! Ubuntu</a></p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/ubuntu_1104_countdown-2010-12-31.htm/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Ubuntu中安装JRE</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/install_jre_in_ubuntu-2010-12-21.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/install_jre_in_ubuntu-2010-12-21.htm#comments</comments>
		<pubDate>Tue, 21 Dec 2010 12:34:00 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[environment]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JRE]]></category>
		<category><![CDATA[runtime]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[安装]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/ittech/linux-ittech/ubuntu%e4%b8%ad%e5%ae%89%e8%a3%85jre-2010-12-21.htm</guid>
		<description><![CDATA[JRE是Java的Runtime Environment，就像.NET的Framework一样，是Java程序运行的必要环境。在Ubuntu中，安装JRE的方法有很多，可以去官网下载.deb安装包，用dpkg的方式安装。这里要介绍一种比较简单的方法，就是适用apt-get来安装。貌似Ubuntu中默认的源是没有JRE的，需要我们手动改一下/etc/apt/sources.list，加入下面的一行地址： deb http://archive.canonical.com/ubuntu lucid partner 保存后，先用sudo apt-get update，更新一下源，这样，就会提示你，是否要更新JRE相关的包了。一路yes，回车后，JRE的安装就完成了。 最后，可以验证一下，在命令提示符处，输入java -version，会显示JRE的版本号等相关信息，表示安装完成。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></description>
			<content:encoded><![CDATA[<p>JRE是Java的Runtime Environment，就像.NET的Framework一样，是Java程序运行的必要环境。在Ubuntu中，安装JRE的方法有很多，可以去官网下载.deb安装包，用dpkg的方式安装。这里要介绍一种比较简单的方法，就是适用apt-get来安装。貌似Ubuntu中默认的源是没有JRE的，需要我们手动改一下/etc/apt/sources.list，加入下面的一行地址：<br />
deb <a href="http://archive.canonical.com/ubuntu">http://archive.canonical.com/ubuntu</a> lucid partner<br />
保存后，先用sudo apt-get update，更新一下源，这样，就会提示你，是否要更新JRE相关的包了。一路yes，回车后，JRE的安装就完成了。<br />
最后，可以验证一下，在命令提示符处，输入java -version，会显示JRE的版本号等相关信息，表示安装完成。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/install_jre_in_ubuntu-2010-12-21.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GUI界面下升级到 Ubuntu 10.10 方法</title>
		<link>http://www.xiaozhou.net/ittech/linux-ittech/upgrade_to_ubuntu_10_10_in_gui_mode-2010-10-13.htm</link>
		<comments>http://www.xiaozhou.net/ittech/linux-ittech/upgrade_to_ubuntu_10_10_in_gui_mode-2010-10-13.htm#comments</comments>
		<pubDate>Wed, 13 Oct 2010 12:45:23 +0000</pubDate>
		<dc:creator>Timothy</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[升级]]></category>
		<category><![CDATA[界面]]></category>

		<guid isPermaLink="false">http://www.xiaozhou.net/?p=846</guid>
		<description><![CDATA[方法是从网上学来的，写篇日志，备忘一下～ 以我的Ubuntu 10.04为例，在Ubuntu的GUI界面下，确保Internet能正常连接，按Alt+F2呼出Run Application界面，类似于Windows的&#8221;运行&#8221;。 输入： update-manager -d 然后回车 这样，弹出的update manager会提示你，是否要升级到新版本的Ubuntu 10.10，点击那个大大的Upgrade按钮，然后就是漫长的更新和下载，如下图： 等待升级完毕，reboot你的Ubuntu机器，就轻松升级到Ubuntu 10.10了。Enjoy it! 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></description>
			<content:encoded><![CDATA[<p>方法是从网上学来的，写篇日志，备忘一下～</p>
<p>以我的Ubuntu 10.04为例，在Ubuntu的GUI界面下，确保Internet能正常连接，按Alt+F2呼出Run Application界面，类似于Windows的&#8221;运行&#8221;。<br />
输入： update-manager -d 然后回车<br />
这样，弹出的update manager会提示你，是否要升级到新版本的Ubuntu 10.10，点击那个大大的Upgrade按钮，然后就是漫长的更新和下载，如下图：</p>
<p style="text-align: center;"><img class="aligncenter" title="upgrade ubuntu" src="http://www.xiaozhou.net/pics/awn4.jpeg" alt="" width="378" height="318" /></p>
<p style="text-align: left;">等待升级完毕，reboot你的Ubuntu机器，就轻松升级到Ubuntu 10.10了。Enjoy it!</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></content:encoded>
			<wfw:commentRss>http://www.xiaozhou.net/ittech/linux-ittech/upgrade_to_ubuntu_10_10_in_gui_mode-2010-10-13.htm/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<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桌面效果，感觉比较赞！ 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>
		<category><![CDATA[命令]]></category>
		<category><![CDATA[解决方法]]></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(注意是小写)，如下： #                /dev/xvda                        /               ext3          rw,acl                   0             1 修改后，保存并退出，然后直接重启系统，或者直接umount该文件系统，并重新mount。最后再用mount -l确认一下看ACL支持是否开启即可。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></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># <file system> <mount point>   <type>  <br />
<options>       <dump> 
<pass>
<p>/dev/xvda                        /               ext3          rw,acl                   0             1</p>
<p>修改后，保存并退出，然后直接重启系统，或者直接umount该文件系统，并重新mount。最后再用mount -l确认一下看ACL支持是否开启即可。</p>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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按钮，你就可以自由的跨栏了…… 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>
		<category><![CDATA[收集]]></category>
		<category><![CDATA[更新]]></category>
		<category><![CDATA[源]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>
		<category><![CDATA[体验]]></category>
		<category><![CDATA[安装]]></category>
		<category><![CDATA[手记]]></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 ，小小纪念一下。 声明: 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 本站文章均采用 知识共享署名-相同方式共享3.0 协议进行授权，除非注明，本站文章均为原创，转载请注明转自 Timothy&#039;s Space 并应以链接形式标明本文地址!]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>
		<category><![CDATA[搭建]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>42</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>
		<category><![CDATA[规则]]></category>
		<category><![CDATA[设置]]></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>
<p class="announce"><span style="font-weight:bold;text-shadow:0 1px 0 #ddd;">声明:</span> 此Blog中的文章和随笔仅代表作者在某一特定时间内的观点和结论，对其完全的正确不做任何担保或假设 <br /> 本站文章均采用 <a rel="nofollow" href="http://creativecommons.org/licenses/by-nc-sa/3.0/" title="署名-非商业性使用-相同方式共享">知识共享署名-相同方式共享3.0</a> 协议进行授权，除非注明，本站文章均为原创，转载请注明转自  <a href="http://www.xiaozhou.net">Timothy&#039;s Space</a> 并应以链接形式标明本文地址!</p>]]></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>

