<?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>细柳营 &#187; Linux</title>
	<atom:link href="http://huang.yunsong.net/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://huang.yunsong.net</link>
	<description>前尘往昔逝如烟 曾忆风云舞九天</description>
	<lastBuildDate>Mon, 02 Jan 2012 17:49:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Installing Debian from USB Stick</title>
		<link>http://huang.yunsong.net/2011/install-debian-usb.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-debian-usb</link>
		<comments>http://huang.yunsong.net/2011/install-debian-usb.html#comments</comments>
		<pubDate>Mon, 26 Dec 2011 08:07:30 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/?p=415</guid>
		<description><![CDATA[This post describes how to install Debian Testing (current Testing is Wheezy). The procedure for installing Debian Stable (current Stable is Squeeze) is same, only the download links are different. 1. Install the necessary tools on your computer which runs &#8230; <a href="http://huang.yunsong.net/2011/install-debian-usb.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This post describes how to install Debian Testing (current Testing is Wheezy). The procedure for installing Debian Stable (current Stable is Squeeze) is same, only the download links are different.</p>
<p>1. Install the necessary tools on your computer which runs a Linux as operating system. My ThinkPad runs Ubuntu 10.10:<br />
<code>$ sudo apt-get install mtools syslinux</code></p>
<p>2. Insert a USB stick into your computer, in most cases, your Linux should mount the USB disk automatically. If so, umount if firstly:<br />
<code>$ sudo umount /path/to/mount/point</code></p>
<p>3. Check the partitions information of the USB disk (assume the device is /dev/sdb):<br />
<code>$ sudo fdisk -l /dev/sdb</code></p>
<p>If the USB disk is never initialized and has no partition table, you need to create at least one partition on it.</p>
<p>4. Format (one partition is enough):<br />
<code>$ sudo mkdosfs /dev/sdb1</code></p>
<p>5. Install syslinux:<br />
<code>$ sudo syslinux /dev/sdb1</code></p>
<p>6. Mount the USB disk, and put necessary files into it:<br />
<code>$ sudo mount /dev/sdb1 /mnt<br />
$ cd /mnt<br />
$ sudo wget http://d-i.debian.org/daily-images/amd64/daily/hd-media/vmlinuz<br />
$ sudo wget http://d-i.debian.org/daily-images/amd64/daily/hd-media/initrd.gz<br />
$ sudo wget http://cdimage.debian.org/cdimage/daily-builds/daily/arch-latest/amd64/iso-cd/debian-testing-amd64-netinst.iso</code></p>
<p><em>Notes:</em> Of course, since downloading images is time-consuming, you can download them separately and copy into the USB disk.</p>
<p>7. Create configuration file syslinux.cfg<br />
<code>$ cd /mnt<br />
$ sudo vi syslinux.cfg</code></p>
<pre>default vmlinuz
append initrd=initrd.gz</pre>
<p>Umount the USB disk, it&#8217;s ready for use then.</p>
<p>No CD/DVD, more green <img src='http://huang.yunsong.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2011/install-debian-usb.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iptables in Ubuntu</title>
		<link>http://huang.yunsong.net/2011/ubuntu-iptables.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-iptables</link>
		<comments>http://huang.yunsong.net/2011/ubuntu-iptables.html#comments</comments>
		<pubDate>Wed, 12 Oct 2011 17:08:55 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/?p=394</guid>
		<description><![CDATA[Since 7.10, Ubuntu uses UFW to manage firewall. Well, UFW is easier than iptables, but I prefer to use iptables directly. Keep it less layers. Stop and remove UFW: $ sudo invoke-rc.d ufw remove $ sudo update-rc.d -f ufw remove &#8230; <a href="http://huang.yunsong.net/2011/ubuntu-iptables.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since 7.10, Ubuntu uses <a href="https://help.ubuntu.com/community/UFW">UFW</a> to manage firewall. Well, UFW is easier than iptables, but I prefer to use iptables directly. Keep it less layers.</p>
<p>Stop and remove UFW:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> invoke-rc.d ufw remove
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> update-rc.d <span style="color: #660033;">-f</span> ufw remove
$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> autoremove <span style="color: #660033;">--purge</span> ufw</pre></div></div>

<p>Then install a utility for loading iptables rules at boot-time:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> iptables-persistent</pre></div></div>

<p>By default the iptables rules are stored in <code>/etc/iptables/rules.v4</code>.</p>
<p><strong>Sample 1:</strong> configure a dual-NIC Linux box as a NAT gateway. Let&#8217;s assume <code>eth0</code> be connected with external network, <code>eth1</code> be connected with internal network, and the internal network is 192.168.96.0/24.</p>
<p>Use editor to open the above file, and add the following line under <code>POSTROUTING ACCEPT</code> chain of <code>nat</code> table:</p>
<blockquote><p>-A POSTROUTING -s 192.168.96.0/24 ! -d 192.168.96.0/24 -o eth0 -j MASQUERADE</p></blockquote>
<p><strong>Sample 2:</strong> Open ports. Assume needs to open TCP ports 22, 53, 80, and 5900-5920.</p>
<p>Adding the below line under <code>INPUT ACCEPT</code> chain of <code>filter</code> table:</p>
<blockquote><p>-A INPUT -p tcp -m multiport &dash;-dports 5900:5920 -j ACCEPT<br />
-A INPUT -p tcp -m multiport &dash;-dports 22,53,80 -j ACCEPT</p></blockquote>
<p>&lt;EOF&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2011/ubuntu-iptables.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Must-Have PPAs</title>
		<link>http://huang.yunsong.net/2011/my-must-have-ppas.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=my-must-have-ppas</link>
		<comments>http://huang.yunsong.net/2011/my-must-have-ppas.html#comments</comments>
		<pubDate>Tue, 04 Oct 2011 09:42:15 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/?p=376</guid>
		<description><![CDATA[Within a release life cycle, Ubuntu only maintains the minor upgrades of the applications installed in the release. If you want to keep your applications up-to-date and catch their major upgrades, you have to do the upgrades by yourselves, or &#8230; <a href="http://huang.yunsong.net/2011/my-must-have-ppas.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Within a release life cycle, Ubuntu only maintains the minor upgrades of the applications installed in the release. If you want to keep your applications up-to-date and catch their major upgrades, you have to do the upgrades by yourselves, or use PPAs which are maintained actively by someone or a community team. The following PPAs are my recommendations:</p>
<p>ppa:libreoffice/ppa<br />
ppa:chromium-daily/stable<br />
ppa:mozillateam/firefox-stable<br />
ppa:pidgin-developers/ppa</p>
<p>If you need QQ support in Pidgin, you can install a protocol plugin: <a href="http://code.google.com/p/libqq-pidgin/">libqq-pidgin</a>. You can compile its source code and install it, of course, there is a PPA usable:</p>
<p>ppa:lainme/libqq</p>
<p>&lt;EOF&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2011/my-must-have-ppas.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable VNC Server on Fedora 15</title>
		<link>http://huang.yunsong.net/2011/fedora-vnc-server.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=fedora-vnc-server</link>
		<comments>http://huang.yunsong.net/2011/fedora-vnc-server.html#comments</comments>
		<pubDate>Thu, 14 Jul 2011 15:54:36 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/?p=329</guid>
		<description><![CDATA[Install: $ sudo yum install tigervnc-server Configure: $ sudo vi /etc/sysconfig/vncservers VNCSERVERS=&#8221;1:huangys 2:root&#8221; VNCSERVERARGS[1]=&#8221;-geometry 1024&#215;768&#8243; VNCSERVERARGS[2]=&#8221;-geometry 1024&#215;768&#8243; Set password(s) for user(s): According to the above configuration, we need to set passwords for two users: huangys, root. Logged in as huangys, &#8230; <a href="http://huang.yunsong.net/2011/fedora-vnc-server.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Install:</strong><br />
<code>$ sudo yum install tigervnc-server</code></p>
<p><strong>Configure:</strong><br />
<code>$ sudo vi /etc/sysconfig/vncservers</code></p>
<blockquote><p>VNCSERVERS=&#8221;1:huangys 2:root&#8221;<br />
VNCSERVERARGS[1]=&#8221;-geometry 1024&#215;768&#8243;<br />
VNCSERVERARGS[2]=&#8221;-geometry 1024&#215;768&#8243;</p></blockquote>
<p><strong>Set password(s) for user(s):</strong><br />
According to the above configuration, we need to set passwords for two users: huangys, root.<br />
Logged in as huangys, then issue the command <code>vncpasswd</code>. Do same thing for user root.</p>
<p><strong>Configure iptables:</strong><br />
If your Fedora has iptables started, you need to open TCP ports used by VNC daemons.</p>
<p><code>$ sudo vi /etc/sysconfig/iptables</code></p>
<p>add lines like the following:</p>
<blockquote><p>-A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 5901 -j ACCEPT<br />
-A INPUT -m state &#8211;state NEW -m tcp -p tcp &#8211;dport 5902 -j ACCEPT</p></blockquote>
<p>Then restart iptables.</p>
<p><strong>Start:</strong><br />
<code>$ sudo service vncserver start</code></p>
<p><strong>Set to auto-start:</strong><br />
<code>$ sudo chkconfig vncserver on</code></p>
<p>You can use any VNC client to connect <code>your_fedora_ip:1</code> as user huangys, connect <code>your_fedora_ip:2</code> as user root.</p>
<p>&lt;EOF&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2011/fedora-vnc-server.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Remote Desktop Access with NX</title>
		<link>http://huang.yunsong.net/2010/nx-neatx-remote-desktop.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nx-neatx-remote-desktop</link>
		<comments>http://huang.yunsong.net/2010/nx-neatx-remote-desktop.html#comments</comments>
		<pubDate>Sun, 01 Aug 2010 12:31:03 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[neatx]]></category>
		<category><![CDATA[nx]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/?p=295</guid>
		<description><![CDATA[We connect to remote machines, whatever physical or virtual machines, through SSH in most cases, but occasionally we do need to live with graphical desktop. Yes, VNC is always used here, but.. urh.. VNC is too slow! NX is another &#8230; <a href="http://huang.yunsong.net/2010/nx-neatx-remote-desktop.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We connect to remote machines, whatever physical or virtual machines, through SSH in most cases, but occasionally we do need to live with graphical desktop. Yes, VNC is always used here, but.. urh.. VNC is too slow! NX is another option, and the most important thing is that NX is very fast! Fastest I&#8217;ve ever seen.</p>
<p>NX is a commercial product from <a href="http://www.nomachine.com/" target="_blank">NoMachine</a>, but this company also provides<a href="http://www.nomachine.com/download.php" target="_blank"> a free edition</a> which limits two connections simultaneously. There is an open source implementation of NX, <a href="http://code.google.com/p/neatx/" target="_blank">NeatX</a>, which is developed by Google.</p>
<p>It&#8217;s easy to install NeatX on Ubuntu 10.04:</p>
<p><code>$ sudo apt-add-repository ppa:freenx-team<br />
$ sudo apt-get update<br />
$ sudo apt-get install neatx-server</code></p>
<p><strong>NX Clients</strong></p>
<p>Several NX clients are available in the market, e.g., opennx, qtnx, and NoMachine&#8217;s NX Client, etc.. I tried and found that NX Client from NoMachine is the best one. It supports Windows, Mac OS X, Linux, and Solaris. Go its <a href="http://www.nomachine.com/download.php" target="_blank">download page</a>, and get your version.</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2010/nx-neatx-remote-desktop.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vim</title>
		<link>http://huang.yunsong.net/2010/vim.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=vim</link>
		<comments>http://huang.yunsong.net/2010/vim.html#comments</comments>
		<pubDate>Sun, 20 Jun 2010 08:54:07 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/2010/vim.html</guid>
		<description><![CDATA[安装： $ sudo apt-get install vim vim-gnome exuberant-ctags 如果发现 GVim 的中文菜单无法显示，是因为 Ubuntu 中文操作系统的字符集写作 UTF-8，而 GVim 中认定的是 UTF8，做以下字符连接即可： $ cd /usr/share/vim/vim72/lang $ sudo ln -s menu_zh_cn.utf-8.vim menu_zh_cn.utf8.vim 安装完基本的 Vim 就可使用了，但要真正用好 Vim，还要根据需求对它进行配置自定义。已经有很多人分享了很好的配置经验，在 Google 中搜索 vimrc 可以找到很多资料。我发现了一个大牛配置，可以拿来学习和作为自己的配置参考。我个人不太喜欢大量地自定义快捷键，还是使用通用的比较好。]]></description>
			<content:encoded><![CDATA[<p>安装：<br />
<code>$ sudo apt-get install vim vim-gnome exuberant-ctags</code></p>
<p>如果发现 GVim 的中文菜单无法显示，是因为 Ubuntu 中文操作系统的字符集写作 UTF-8，而 GVim 中认定的是 UTF8，做以下字符连接即可：<br />
<code>$ cd /usr/share/vim/vim72/lang<br />
$ sudo ln -s menu_zh_cn.utf-8.vim menu_zh_cn.utf8.vim</code></p>
<p>安装完基本的 Vim 就可使用了，但要真正用好 Vim，还要根据需求对它进行配置自定义。已经有很多人分享了很好的配置经验，在 Google 中搜索 vimrc 可以找到很多资料。我发现了一个<a href="http://amix.dk/blog/post/51" target="_blank">大牛配置</a>，可以拿来学习和作为自己的配置参考。我个人不太喜欢大量地自定义快捷键，还是使用通用的比较好。</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2010/vim.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mount Remote Windows Share</title>
		<link>http://huang.yunsong.net/2010/linux-mount-windows-share.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=linux-mount-windows-share</link>
		<comments>http://huang.yunsong.net/2010/linux-mount-windows-share.html#comments</comments>
		<pubDate>Wed, 02 Jun 2010 07:50:12 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/2010/linux-mount-windows-share.html</guid>
		<description><![CDATA[I&#8217;m using CentOS 5.5. Make sure your Linux has Samba client installed. If not, run the below to install it: # yum install samba-client Now mount Windows share: # mount -t cifs //win_server/share -o username=theuser,password=thepwd /mnt/winshare -t cifs: file system &#8230; <a href="http://huang.yunsong.net/2010/linux-mount-windows-share.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m using CentOS 5.5.</p>
<p>Make sure your Linux has Samba client installed. If not, run the below to install it:<br />
<code># yum install samba-client</code></p>
<p>Now mount Windows share:<br />
<code># mount -t cifs //win_server/share -o username=theuser,password=thepwd /mnt/winshare</code></p>
<p><strong>-t cifs:</strong> file system type. Use smbfs instead if using an old version Linux<br />
<strong>//win_server/share:</strong> the shared folder on a Windows machine<br />
<strong>-o &#8230;:</strong> used to specify options. Here it&#8217;s used to specify the username/password pair to access the share on Windows<br />
<strong>/mnt/winshare:</strong> the mount point on Linux</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2010/linux-mount-windows-share.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion</title>
		<link>http://huang.yunsong.net/2010/subversion-apache.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=subversion-apache</link>
		<comments>http://huang.yunsong.net/2010/subversion-apache.html#comments</comments>
		<pubDate>Sat, 20 Mar 2010 12:41:05 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/2010/subversion-apache.html</guid>
		<description><![CDATA[1. 安装 从 tarball 安装： $ tar jxvf subversion-1.5.7.tar.bz2 $ cd subversion-1.5.7 $ ./configure --prefix=/opt/subversion --with-apxs=/opt/apache/bin/apxs --with-apr=/opt/apache/bin/apr-1-config --with-apr-util=/opt/apache/bin/apu-1-config $ make clean $ make $ sudo make install 如果在 Debian/Ubuntu 系： $ sudo apt-get install subversion libapache2-svn 2. 版本库 Subversion 支持单版本库，也支持多版本库。采用单一版本库管理所有项目，或者为每个项目建立一个独立的版本库，都是允许的，不过这两者的做法都有些极端。推荐的做法是，将关联度高的项目放在同一个版本库中管理。 &#8230; <a href="http://huang.yunsong.net/2010/subversion-apache.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>1. 安装</strong></p>
<p>从 tarball 安装：<br />
<code>$ tar jxvf subversion-1.5.7.tar.bz2<br />
$ cd subversion-1.5.7<br />
$ ./configure --prefix=/opt/subversion --with-apxs=/opt/apache/bin/apxs --with-apr=/opt/apache/bin/apr-1-config --with-apr-util=/opt/apache/bin/apu-1-config<br />
$ make clean<br />
$ make<br />
$ sudo make install</code></p>
<p>如果在 Debian/Ubuntu 系：<br />
<code>$ sudo apt-get install subversion libapache2-svn</code></p>
<p><strong>2. 版本库</strong></p>
<p>Subversion 支持单版本库，也支持多版本库。采用单一版本库管理所有项目，或者为每个项目建立一个独立的版本库，都是允许的，不过这两者的做法都有些极端。推荐的做法是，将关联度高的项目放在同一个版本库中管理。</p>
<p>以下步骤中，我将创建一个版本库 psearch，管理着两个项目 core、client。</p>
<p>新建版本库目录<br />
<code>$ cd /data<br />
$ mkdir -p svn-repos/psearch</code></p>
<p>初始化版本库<br />
<code>$ svnadmin create /data/svn-repos/psearch</code><br />
这一操作生成必要的目录与文件。版本库创建完成。</p>
<p><strong>3. 添加项目</strong></p>
<p>添加两个项目 core 和 client 到上一步中创建的版本库中。</p>
<p>首先在一个临时目录下建立以下目录结构：<br />
/home/huangys/temp<br />
&#8211;core<br />
&#8212;-branches<br />
&#8212;-tags<br />
&#8212;-trunk<br />
&#8211;client<br />
&#8212;-branches<br />
&#8212;-tags<br />
&#8212;-trunk</p>
<p>然后用 svn import 指令来进行项目导入：<br />
<code>$ svn import /home/huangys/temp/ file:///data/svn-repos/psearch/ --message "init"</code><br />
这种方式非常适合于将已经存在的项目迅速导入到版本库中。</p>
<p>说明：以上使用的三个目录名称 trunk、tags、branches 只是一种约定俗成的习惯，它们在 Subversion 中没有特别含义。<br />
&#8220;trunk&#8221; 是项目的开发主线，你也可以称之为 &#8220;main&#8221;, &#8220;mainline&#8221;, &#8220;production&#8221; 或任何你喜欢的名字；<br />
&#8220;branches&#8221; 是放置分支的地方；<br />
&#8220;tags&#8221; 指明一个时间点的快照，与 branches 的区别是 tags 一旦创建不能修改。你也可以用 &#8220;releases&#8221;, &#8220;snapshots&#8221;, &#8220;baselines&#8221; 或任何你喜欢的名字来代替 &#8220;tags&#8221;。</p>
<p><strong>4. 建立用户</strong></p>
<p><code>$ htpasswd -b dav_svn.passwd theuser thepwd</code></p>
<p>这条指令将新建一个用户 theuser，其密码是 thepwd。<br />
用户密码存储在文件 dav_svn.passwd 中，这个文件名可以任意起。如果这个文件当前不存在，加一个 -c 参数即可，如下：<br />
<code>$ htpasswd -cb dav_svn.passwd theuser thepwd</code></p>
<p>附带，删除用户的指令：<br />
<code>$ htpasswd -D dav_svn.passwd theuser</code></p>
<p><strong>5. 建立访问控制策略</strong></p>
<p>该策略文件名和放置的位置可随意。这里我起名为 <span style="font-family: courier new,courier;">dav_svn.authz</span>，放在 <span style="font-family: courier new,courier;">/data/svn-repos/psearch/conf/</span> 中。</p>
<p>文件内容如下：</p>

<div class="wp_syntax"><div class="code"><pre class="vim" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>groups<span style="color: #000000;">&#93;</span>
admins = user1
core_dev = user2, user3
client_dev = user4, user5
&nbsp;
<span style="color: #000000;">&#91;</span><span style="color: #000000;">/</span><span style="color: #000000;">&#93;</span>
<span style="color: #000000;">@</span>admins = rw
&nbsp;
<span style="color: #000000;">&#91;</span><span style="color: #000000;">/</span>core<span style="color: #000000;">&#93;</span>
<span style="color: #000000;">@</span>core_dev = rw
<span style="color: #000000;">@</span>client_dev = r
&nbsp;
<span style="color: #000000;">&#91;</span><span style="color: #000000;">/</span>client<span style="color: #000000;">&#93;</span>
<span style="color: #000000;">@</span>core_dev = r
<span style="color: #000000;">@</span>client_dev = rw
user6 = r</pre></div></div>

<p>r 表示读，w 表示写，空表示无权限。<br />
@ 起头表示组，没有 @ 符号起头的是具体用户名，* 表示所有人。</p>
<p><strong>6. 配置 Apache</strong></p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;">&lt;<span style="color: #000000; font-weight:bold;">VirtualHost</span> *:<span style="color: #ff0000;">80</span>&gt;
...
<span style="color: #00007f;">ServerName</span> dev.openow.net
...
&lt;<span style="color: #000000; font-weight:bold;">Location</span> /svn&gt;
<span style="color: #00007f;">DAV</span> svn
<span style="color: #00007f;">SVNPath</span> /data/svn-repos/psearch
<span style="color: #00007f;">AuthType</span> Basic
<span style="color: #00007f;">AuthName</span> <span style="color: #7f007f;">&quot;psearch Subversion Repository&quot;</span>
<span style="color: #00007f;">AuthUserFile</span> /data/svn-repos/psearch/conf/dav_svn.passwd
<span style="color: #00007f;">AuthzSVNAccessFile</span> /data/svn-repos/psearch/conf/dav_svn.authz
<span style="color: #00007f;">Require</span> valid-<span style="color: #00007f;">user</span>
&lt;/<span style="color: #000000; font-weight:bold;">Location</span>&gt;
...
&lt;/<span style="color: #000000; font-weight:bold;">VirtualHost</span>&gt;</pre></div></div>

<p>注1：dav_svn.passwd 和 dav_svn.authz 随便放到哪里都行。<br />
注2：因为这里是经由 Apache HTTP Server 来提供对 Subversion 的访问，所以需要将版本库的拥有者修改为 Apache HTTP Server 的运行者：<br />
<code>$ sudo chown -R apacheuser.apachegroup /data/svn-repos/psearch</code></p>
<p>最后记得重启 Apache 使之生效。</p>
<p>通过浏览器或者 SVN 客户端工具访问 http://dev.openow.net/svn/ 就可以了。</p>
<p>如果你需要加装 SSL 以保安全，配置 Apache 使用 mod_ssl 即可。</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2010/subversion-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 9.10 Quick Guide</title>
		<link>http://huang.yunsong.net/2009/ubuntu-910-karmic-quick-guide.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-910-karmic-quick-guide</link>
		<comments>http://huang.yunsong.net/2009/ubuntu-910-karmic-quick-guide.html#comments</comments>
		<pubDate>Sat, 07 Nov 2009 15:47:23 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/2009/ubuntu-910-karmic-quick-guide.html</guid>
		<description><![CDATA[1. partitioning If you&#8217;re using alternative image to install Ubuntu from ISO without CD, you&#8217;ll find that the problem of unable partitioning hard disk is solved. That problem exists in both 8.10 and 9.04 releases. In the installation wizard, there &#8230; <a href="http://huang.yunsong.net/2009/ubuntu-910-karmic-quick-guide.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>1. partitioning</strong></p>
<p>If you&#8217;re using alternative image to install Ubuntu from ISO without CD, you&#8217;ll find that the problem of unable partitioning hard disk is solved. That problem exists in both 8.10 and 9.04 releases. In the installation wizard, there is a newly added dialog to ask if you want to umount the hard disk. Choose yes if you want to partition hard disk.</p>
<p><strong>2. coexisting with Windows XP</strong></p>
<p>If your computer has Windows XP and Ubuntu coexisting, and want to keep using Windows boot loader to intialize computer. You need to install Ubuntu boot loader to a location other than MBR, for example, I installed it to /dev/sda6 which is the root partition (/) of my Ubuntu installation. Since Ubuntu 9.10, GRUB2 replaces GRUB. The <span style="font-family: courier new,courier;">dd</span> approach doesn&#8217;t work any more. The grub4dos tool offers us a workaround: NTLDR -&gt; grldr -&gt; grub -&gt; grub2 -&gt; Ubuntu. It&#8217;s not perfect but works.</p>
<ol>
<li>Extract <span style="font-family: courier new,courier;">grldr</span> from grub4dos package, and put it into Windows <span style="font-family: courier new,courier;">C:\</span> folder.</li>
<li>Create a text file <span style="font-family: courier new,courier;">menu.lst</span> under <span style="font-family: courier new,courier;">C:\</span> folder. The content of <span style="font-family: courier new,courier;">menu.lst</span> as following:

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">title grub4dos
root <span style="">&#40;</span>hd0,<span style="">5</span><span style="">&#41;</span>
kernel /boot/grub/core.img
boot</pre></div></div>

</li>
<li>Add the following to the end of <span style="font-family: courier new,courier;">boot.ini</span>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">C:\grldr<span style="color: #000066; font-weight:bold;">=</span><span style="color: #933;">&quot;grub4dos&quot;</span></pre></div></div>

</li>
</ol>
<p><strong>3. Chinese input method </strong></p>
<p>IBus replaces SCIM in Ubuntu 9.10. I like IBus, but seems that the factory settings of IBus in Ubuntu 9.10 are not correct. Open IBus Preferences, switch to the &#8220;Input Method&#8221; tab, delete all existing methods from the list, then add &#8220;PinYin&#8221; method into the list.</p>
<p><img src="http://huang.yunsong.net/data/ibus.png" alt="" width="425" height="513" /></p>
<p><strong>4. adjustments</strong></p>
<p>4.1. default font</p>
<p>By default, Ubuntu 9.10 uses the embedded bitmap font of WenQuanYi ZenHei. I don&#8217;t know why not use vector font. It&#8217;s weird. Follow <a href="http://wenq.org/forum/viewtopic.php?f=13&amp;t=904" target="_blank">this post</a> to enable vector font.</p>
<p>4.2. desktop interface</p>
<p>Open Appearance Preferences, and switch to the &#8220;Interface&#8221; tab. Make sure the item &#8220;Show icons in menus&#8221; is checked, and select &#8220;Icons only&#8221; in the drop list of &#8220;Toolbar button labels&#8221;.</p>
<p><img src="http://huang.yunsong.net/data/desktop-interface.png" alt="" width="559" height="527" /></p>
<p><strong>5. problems and workarounds</strong></p>
<p>5.1. Eclipse</p>
<p>In Ubuntu 9.10, mouse clicking on some buttons of Eclipse doesn&#8217;t work, but keyboard works. This bug is fixed in Eclipse 3.6M2. If you&#8217;re using 3.5.x or earlier release, there is a <a href="http://www.norio.be/blog/2009/10/problems-eclipse-buttons-ubuntu-910" target="_blank">workaround</a> for you.</p>
<p>5.2. Lotus Notes 8.5.x</p>
<p>Lotus Notes fails to draw several windows in Ubuntu 9.10. IBM is going to fix this bug in next minor release 8.5.2. If you&#8217;re using 8.5.1, like me, or 8.5.0, don&#8217;t worry, there is also an easy <a href="https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/398250" target="_blank">workaround</a> (in #13 reply).</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2009/ubuntu-910-karmic-quick-guide.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing with MLDonkey</title>
		<link>http://huang.yunsong.net/2009/playing-with-mldonkey.html?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=playing-with-mldonkey</link>
		<comments>http://huang.yunsong.net/2009/playing-with-mldonkey.html#comments</comments>
		<pubDate>Sun, 24 May 2009 07:30:30 +0000</pubDate>
		<dc:creator>Richard Huang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[p2p]]></category>

		<guid isPermaLink="false">http://huang.yunsong.net/2009/playing-with-mldonkey.html</guid>
		<description><![CDATA[If you&#8217;re a non-Windows user, Linux or Mac, whatever, and want a client to connect eDonkey network, probably you&#8217;ll try aMule which is a clone of eMule. I&#8217;m not saying that aMule sucks, but&#8230; it&#8217;s just not good enough. Actually &#8230; <a href="http://huang.yunsong.net/2009/playing-with-mldonkey.html">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a non-Windows user, Linux or Mac, whatever, and want a client to connect <a href="http://en.wikipedia.org/wiki/EDonkey" target="_blank">eDonkey</a> network, probably you&#8217;ll try <a href="http://www.amule.org/" target="_blank">aMule</a> which is a clone of <a href="http://www.emule-project.net" target="_blank">eMule</a>. I&#8217;m not saying that aMule sucks, but&#8230; it&#8217;s just not good enough. Actually we do have another choice, <a href="http://mldonkey.sourceforge.net" target="_blank">MLDonkey</a>. Know what&#8217;s coolest? MLDonkey is a multi-protocol P2P client. In addition to eDonkey, it also supports BitTorrent, HTTP, FTP, FastTrack, etc. Check out <a href="http://mldonkey.sourceforge.net/MLdonkeyPlugin" target="_blank">the full list</a>.</p>
<p>Ubuntu repository has MLDonkey, but the version is a bit little old. If you don&#8217;t mind, it&#8217;s easy to get it installed through <span style="font-family: courier new,courier;">apt-get</span> utility, of course. I&#8217;m going to compile MLDonkey from source code, because it&#8217;s also easy to do the compilation.</p>
<p>Firstly install the prerequisites to make your enviroment ready for compiling:</p>
<p><span style="font-family: courier new,courier;">$ sudo apt-get install ocaml libbz2-dev libgd2-xpm-dev libmagic-dev</span></p>
<p>Then get the source package and compile it:</p>
<p><span style="font-family: courier new,courier;">$ tar jxvf mldonkey-3.0.0.tar.bz2<br />
$ cd mldonkey-3.0.0<br />
$ ./configure<br />
$ make</span></p>
<p>No necessary to run any command like <span style="font-family: courier new,courier;">&#8216;sudo make install&#8217;</span> to finish the installation, because what we need is only one file. It&#8217;s <span style="font-family: courier new,courier;">mlnet</span> generated after compiling. Just copy it to any place you want, e.g., <span style="font-family: courier new,courier;">/usr/local/bin</span>.</p>
<p><span style="font-family: courier new,courier;">$ sudo cp mlnet /usr/local/bin</span></p>
<p>The installation is done!</p>
<p>Run mlnet to start MLDonkey:</p>
<p><span style="font-family: courier new,courier;">$ mlnet &amp;</span></p>
<p>A working folder, <span style="font-family: courier new,courier;">.mldonkey</span>, is created in the current logged-in user&#8217;s home directory during the first running.</p>
<p>Two official ways are provided to interact with MLDonkey:</p>
<ul>
<li>CLI via telnet. Default port is 4000. Try telnet localhost 4000</li>
<li>web interface via browser. Default port is 4080. Try http://localhost:4080</li>
</ul>
<p>If you dislike both and want a full-function GUI tool, you can try <a href="http://sancho.awardspace.com/" target="_blank">Sancho</a>. CLI is my favorite. The following is a list of common-use commands.</p>
<p>&gt; ?<br />
short help</p>
<p>&gt; ??<br />
long help</p>
<p>&gt; save<br />
save options into the configuration files</p>
<p>&gt; kill<br />
shutdown MLDonkey</p>
<p>&gt; q<br />
exit the CLI admin console</p>
<p>&gt; users<br />
print all MLDonkey users</p>
<p>&gt; whoami<br />
print the current logged-in MLDonkey user</p>
<p>&gt; passwd &lt;thepwd&gt;<br />
change your password</p>
<p>&gt; auth &lt;username&gt; &lt;password&gt;<br />
authicate yourself before executing any directive</p>
<p>&gt; networks<br />
print the enabled networks currently</p>
<p>&gt; disable &lt;num&gt;<br />
disable the specified network</p>
<p>&gt; set client_name &lt;new-client-name&gt;<br />
set the client name</p>
<p>&gt; set allowed_ips &#8220;ip1 ip2 ip3&#8243;<br />
set which IPs have access to admin consoles.<br />
For example,<br />
&gt; set allowed_ips &#8220;127.0.0.1 192.168.0.157&#8243;</p>
<p>&gt; set max_hard_download_rate &lt;digit&gt;<br />
set the maximal download rate. 0 means umlimited.<br />
For example,<br />
&gt; set max_hard_download_rate 0</p>
<p>&gt; servers &lt;URL&gt;<br />
load servers from a file or a URL<br />
For example,<br />
&gt; servers http://www.emule.org.cn/server.met</p>
<p>&gt; n &lt;server name or IP&gt; [&lt;port&gt;]<br />
add a new server manually<br />
For example,<br />
&gt; n no1.eserver.emule.org.cn 8080<br />
&gt; n no2.eserver.emule.org.cn 8080</p>
<p>&gt; vm<br />
print the connected servers</p>
<p>&gt; dllink &lt;download-link&gt;<br />
add a download task</p>
<p>&gt; vd<br />
print the downloading tasks</p>
<p>&gt; reshare<br />
check shared files for removal</p>
<p>By default the downloaded files can be found in <span style="font-family: courier new,courier;">$HOME/.mldonkey/incoming/files</span> or <span style="font-family: courier new,courier;">$HOME/.mldonkey/incoming/directories</span>. Just move the downloaded files out, then run the above <span style="font-family: courier new,courier;">&#8216;reshare&#8217;</span> command.</p>
<p>BTW, I&#8217;m using Ubuntu Linux 9.04 when playing MLDonkey.</p>
]]></content:encoded>
			<wfw:commentRss>http://huang.yunsong.net/2009/playing-with-mldonkey.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

