<?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>automaticable &#187; diy</title>
	<atom:link href="http://www.automaticable.com/category/diy/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automaticable.com</link>
	<description>adjective: of or pertaining to things that should work but go awry</description>
	<lastBuildDate>Fri, 07 May 2010 02:46:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How To: Host a Subversion Repository in Ubuntu Hardy</title>
		<link>http://www.automaticable.com/2008-06-25/how-to-host-a-subversion-repository-in-ubuntu-hardy/</link>
		<comments>http://www.automaticable.com/2008-06-25/how-to-host-a-subversion-repository-in-ubuntu-hardy/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 04:46:20 +0000</pubDate>
		<dc:creator>Scott Wegner</dc:creator>
				<category><![CDATA[deep thoughts]]></category>
		<category><![CDATA[diy]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[dd-wrt]]></category>
		<category><![CDATA[ddns]]></category>
		<category><![CDATA[dynamic dns]]></category>
		<category><![CDATA[dyndns]]></category>
		<category><![CDATA[google code]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[Scott Wegner]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[sourceforge]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.automaticable.com/?p=316</guid>
		<description><![CDATA[Have you ever wanted to set up a subversion repository on your home computer?  Whether it be for a new software project, versioning your personal documents, or any other reason, there are many benefits to using version control.  Some free websites that will host your project for you, such as SourceForge or Google [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/subversion-logo.png"><img class="alignnone size-thumbnail wp-image-327" title="Subversion Logo" src="http://www.automaticable.com/wp-content/uploads/2008/06/subversion-logo-150x150.png" alt="" width="150" height="150" /></a>Have you ever wanted to set up a subversion repository on your home computer?  Whether it be for a new software project, versioning your personal documents, or any other reason, there are many benefits to using version control.  Some free websites that will host your project for you, such as <a title="SourceForge" href="http://www.sourceforge.net">SourceForge</a> or <a title="Google Code" href="http://code.google.com">Google Code</a>, but it&#8217;s often necessary to have a little bit more control.</p>
<p>I set up a subversion repository for a new project the other day, and the process was relatively painless.  I&#8217;m using a standard Ubuntu Hardy Heron 8.04 desktop setup, with OpenDNS and DD-WRT for port-forwarding, and without an Apache web server.  Keep reading to host your own subversion repository server.</p>
<p><span id="more-316"></span></p>
<p>The entire process for setting up a subversion server and repository is relatively simple on Linux, and should take you no more than one hour.  I&#8217;ve broken this tutorial into a few different segments, so you can concentrate on only the parts you are interested in.</p>
<ol style="clear: left;">
<li><a href="#initial-setup">Initial Setup</a></li>
<li><a href="#adding-the-first-repository">Adding the First Repository</a></li>
<li><a href="#configuring-your-repository">Configuring Your Repository</a></li>
<li><a href="#access-from-the-host-computer">Access from the Host Computer</a></li>
<li><a href="#access-from-a-lan-computer">Access from a LAN Computer</a></li>
<li><a href="#access-from-outside-the-lan">Access from Outside the LAN</a></li>
<li><a href="#final-steps">Final Steps</a></li>
</ol>
<div id="initial-setup">
<h3>Initial Setup</h3>
<p>In Ubuntu Hardy, all the tools you will need for a basic subversion server are included in the subversion package.  If you haven&#8217;t already you can install it with the following command:</p>
<pre>sudo aptitude install subversion</pre>
<p>The next steps is to create a new group that will be responsible for subversion tasks.</p>
<ul>
<li>From the Panel, navigate to System &gt; Administration &gt; Users and Groups</li>
<li>If necessary, unlock the dialog, and then click &#8220;Manage Groups&#8221;</li>
<li>Click &#8220;Add Group&#8221;.  Create a group named &#8220;subversion&#8221;, and add yourself to it.</li>
<li>Log out and back re-log in for the changes to take effect.</li>
</ul>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss01-svn-group.png"><img class="alignnone size-medium wp-image-319" style="float: none;" title="Add Subversion Group" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss01-svn-group-300x229.png" alt="" width="300" height="229" /></a></p>
<p>Now that the group is created, the next step is to create the directory structure where our repositories will live.  You can create the folder wherever you&#8217;d like, but a good choice is <em>/home/svn</em></p>
<ul>
<li>In a terminal, create your new folder, using the commands:</li>
</ul>
<blockquote>
<pre>cd /home</pre>
<pre>sudo mkdir svn</pre>
</blockquote>
<p>That&#8217;s it for the basic setup.  Of course, the subversion server isn&#8217;t useful until we add a repository or two..</p></div>
<div id="adding-the-first-repository">
<h3>Adding the First Repository</h3>
<p>In subversion, each project or directory structure is contained within its own <em>repository</em>.  Each repository (or repo for short) maintains its own access control, versioning, and logs.  Let&#8217;s create a new repository called &#8220;my-project&#8221;</p>
<p>First, we need to create the repository folder:</p>
<blockquote>
<pre>cd /home/svn</pre>
<pre>sudo mkdir my-project</pre>
</blockquote>
<p>Finally, we use the &#8220;svnadmin&#8221; command to create some base files and configure the repository.</p>
<blockquote>
<pre>sudo svnadmin create /home/svn/my-project</pre>
</blockquote>
<p>Now, change the access permissions to give the subversion group the proper settings:</p>
<blockquote>
<pre>sudo chgrp -R subversion my-project</pre>
<pre>sudo chmod -R g+rws my-project</pre>
</blockquote>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss02-project-folder.png"><img class="alignnone size-medium wp-image-320" style="float: none;" title="Subversion Repository Folder" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss02-project-folder-300x219.png" alt="" width="300" height="219" /></a></p>
<p>This is the minimum work required to initialize a repository.  At this point, you could start accessing your repository from the host computer.  But, you may also want to fine-tune your configuration below.</p></div>
<div id="configuring-your-repository">
<h3>Configuring Your Repository</h3>
<p>At this point, you should have a working repository.  However, there are still a few options you might want to tweak.  In particular, the access permissions.  By default, a fresh repository will be readable by anyone and writable by authorized users.  To change these settings, open  <em>/home/svn/my-project/conf/svnserve.conf</em> in your favorite text editor&#8211; you can use the command:</p>
<blockquote>
<pre>gedit /home/svn/my-project/conf/svnserve.conf</pre>
</blockquote>
<p>The lines that control access restrictions look like:</p>
<blockquote>
<pre># anon-access = read</pre>
<pre># auth-access = write</pre>
</blockquote>
<p>These two lines control anonymous access and authenticated access, respectively.  To change from the default behavior for each value, remove the leading &#8216;#&#8217; character, and set the right-side value to &#8216;read&#8217;, &#8216;write&#8217;, or &#8216;none&#8217;, for read-only, read-write, or no access, respectively.  When you are finished, you can save the file and close it.</p>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss03-conf.png"><img class="alignnone size-medium wp-image-321" style="float: none;" title="Edit svnserve.conf File" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss03-conf-300x256.png" alt="" width="300" height="256" /></a></p>
<p>If you plan on using authenticated access to your repository, you will need to set up at least one username and password.  To do so, open the <em>/home/svn/my-project/conf/passwd</em> file in a text editor:</p>
<blockquote>
<pre>gedit /home/svn/my-project/conf/passwd</pre>
</blockquote>
<p>To create a username, simply add a line to the bottom of the form:</p>
<blockquote>
<pre>username = password</pre>
</blockquote>
<p>There are a few examples already in the file, but commented out.  You may add as many usernames as you need.  When you are finished, save the file and close it.  These are the basic configuration steps you&#8217;ll need, although more are discussed in the <a href="#final-steps">Final Steps</a>.</div>
<div id="access-from-the-host-computer">
<h3>Access From the Host Computer</h3>
<p>At this point you are ready to test out your new repository.  Any configured repositories should be accessible from the host computer as-is.  You can test it out by checking-out your first working copy:</p>
<blockquote>
<pre>svn checkout file:///home/svn/my-project ~/my-project-wc</pre>
</blockquote>
<p>Perhaps you would like to add a &#8220;trunk&#8221; directory, where you will develop your project:</p>
<blockquote>
<pre>cd ~/my-project-wc</pre>
<pre>mkdir trunk</pre>
<pre>svn add trunk</pre>
<pre>svn commit -m "Add a trunk directory for development."</pre>
</blockquote>
<p>Depending on your configuration above, you may be asked for a user name and password.  You should use the values you entered in the passwd file.</p>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss04-checkout.png"><img class="alignnone size-medium wp-image-322" style="float: none;" title="Subversion Repository Checkout" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss04-checkout-300x199.png" alt="" width="300" height="199" /></a></div>
<div id="access-from-a-lan-computer">
<h3>Access from a LAN Computer</h3>
<p>If you have another laptop or desktop in your home, then you may want to also access your repository from it.  Fortunately, extending your subversion server within a LAN isn&#8217;t too much more complicated, using the <em>svn://</em> protocol.</p>
<p>First, you will need to set up a daemon on the host computer to listen for connections, using the <em>svnserve</em> command:</p>
<blockquote>
<pre>svnserve -d -r /home/svn</pre>
</blockquote>
<p>This starts a process in the background that will silently wait for connections to the subversion server.  To run in the foreground, simply use the <em>&#8211;foreground</em> parameter.</p>
<p>Then, you can connect to your repository from any computer within your LAN, using the syntax:</p>
<blockquote>
<pre>svn checkout svn://my-host/my-project ~/my-project-wc</pre>
</blockquote>
<p>where my-host is the name your host computer.  Note that it is also possible to connect using a Windows or Mac machine, with the same syntax.</p></div>
<div id="access-from-outside-the-lan">
<h3>Access from Outside the LAN</h3>
<p>If others outside your LAN will need to use the repository, or you often work away from home, then you&#8217;ll want to set up your subversion server for access anywhere.  This will require tweaking some setting in your router.  Particularly, you will need to forward TCP port 3690 to the machine hosting the subversion server.  I used a DD-WRT based router, but most router interfaces are similar.</p>
<ul>
<li>Open the web-based router control panel, and enter the administrative username and password.  Generally, the address is similar to http://192.168.1.1</li>
<li>Locate the settings for &#8220;Port Forwarding&#8221;.  If you are using DD-WRT, navigate to NAT / QoS &gt; Port Fowarding</li>
<li>Add a new entry to forward TCP port 3690 to the IP address of your subversion host computer, with destination port also 3690.  This is the default port that subversion listens on.  Then, save your settings and close.</li>
</ul>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss05-portfwd.png"><img class="alignnone size-medium wp-image-323" style="float: none;" title="DD-WRT Port Forwarding" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss05-portfwd-300x186.png" alt="" width="300" height="186" /></a></p>
<p>You can test your forwarded port by trying to connect using your external IP address.  There are many websites that will help you find your external IP, such as http://whatismyipaddress.com/  Note that it <em>shouldn&#8217;t</em> start with 192.168&#8230;</p>
<blockquote>
<pre>svn checkout svn://{external-ip}/my-project ~/my-project-wc</pre>
</blockquote>
<p>If you plan to work away from home frequently, you may want to set up dynamic DNS&#8211; this provides you with a personalized hostname, so you don&#8217;t need to remember a cryptic IP address.  If you are using DD-WRT, you can follow the following steps:</p>
<ul>
<li>Go to DynDNS.com and sign up for an account.  Create a &#8220;Dynamic DNS&#8221; (DDNS) hostname.</li>
<li>Log in to your DD-WRT admin panel as before, and navigate to Setup &gt; DDNS.</li>
<li>Enter your DynDNS account details into the appropriate fields.</li>
<li>Hit &#8220;Apply Settings&#8221;&#8211; the DDNS status should show that your IP has updated successfully.</li>
</ul>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss09-ddns.png"><img class="alignnone size-medium wp-image-326" style="float: none;" title="DD-WRT Dynamic DNS (DDNS) Settings" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss09-ddns-300x285.png" alt="" width="300" height="285" /></a></p>
<p>Once you have your DDNS hostname set up, you can use it to access your subversion repository, using the command:</p>
<blockquote>
<pre>svn checkout svn://{ddns-hostname}/my-project ~/my-project-wc</pre>
</blockquote>
<p>This should be accessible both inside and outside your LAN.</p></div>
<div id="final-steps">
<h3>Final Steps</h3>
<p>At this point, you should have a subversion repository up and running.  However, there are still a few features you may be interested in.</p>
<p>To access your repository using the <em>svn://</em> syntax, you will need to have the <em>svnserve</em> daemon running.  You can easily set the command to run when you log in with the following steps:</p>
<ul>
<li>From the desktop panel, open System &gt; Preferences &gt; Sessions.</li>
<li>Click the &#8220;Add&#8221; button to add a new Startup program.</li>
<li>In the &#8220;Name&#8221; field, enter &#8220;Subversion Server Daemon&#8221;</li>
<li>For the command, enter: <em>svnserve -d -r /home/svn</em></li>
<li>And in the description, add a useful summary such as &#8220;Listen for connections to the subversion repository&#8221;.</li>
</ul>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss06-sessions.png"><img class="alignnone size-medium wp-image-324" style="float: none;" title="Startup Subversion Daemon" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss06-sessions-300x143.png" alt="" width="300" height="143" /></a></p>
<p>Now, your subversion repository will be accessible as long as your username is logged in.</p>
<p>Once you being using multiple repositories, you may want to share the same username database for them.  For this, you will need to configure repositories to use the same &#8220;passwd&#8221; file and belong to a common realm.  For each of the repositories that will share a username database:</p>
<ul>
<li>Open a terminal in the root directory of the repository:</li>
</ul>
<blockquote>
<pre>cd /home/svn/{repository-name}</pre>
</blockquote>
<ul>
<li>Open the svnserve.conf file located in the conf directory using a text editor:</li>
</ul>
<blockquote>
<pre>gedit conf/svnserve.conf</pre>
</blockquote>
<ul>
<li>Find and uncomment the line that starts with &#8220;passwd-db&#8221;.  Enter the location of the passwd file that will be shared between databases.  You may enter an absolute path, or a path relative to the conf directory.</li>
<li>Find and uncomment the line that starts with &#8220;realm&#8221;.  Set the right side to a name that will be shared between each of the repositories accessing the common database.  You may use a descriptive name such as &#8220;work-repository-realm&#8221;.</li>
</ul>
<p><a href="http://www.automaticable.com/wp-content/uploads/2008/06/ss07-realm.png"><img class="alignnone size-medium wp-image-325" style="float: none;" title="Subversion Repository Realm" src="http://www.automaticable.com/wp-content/uploads/2008/06/ss07-realm-300x234.png" alt="" width="300" height="234" /></a></p>
<p>Finally, you may want to use subversion from the file browser.  Although not strictly part of setting up a server, it is often useful to install the Nautilus subversion plugin.  This will allow you to right click on a subversion working copy folder and perform common subversion tasks.  To install, simply enter the command:</p>
<blockquote>
<pre>sudo aptitude install nautilus-script-collection-svn</pre>
</blockquote>
<p><strong>Update:</strong> Actually, it&#8217;s a little bit tricky to get the Nautilus plugin working.  If you&#8217;re having trouble, check out these <a title="Easy Subversion GUI for Nautilus and Ubuntu" href="http://www.automaticable.com/2008-09-15/easy-subversion-gui-for-nautilus-and-ubuntu/">instructions to enable SVN access in Nautilus</a>.</p>
<p>And that&#8217;s it!  Now, start using your repository and enjoy the benefits of version control.  Are there any other tips that you would offer for setting up subversion?  Let&#8217;s hear your experiences in the comments.</p></div>
Similar:<ul><li><a href="http://www.automaticable.com/2008-09-15/easy-subversion-gui-for-nautilus-and-ubuntu/" rel="bookmark" title="September 15, 2008">Easy Subversion GUI for Nautilus and Ubuntu</a></li>

<li><a href="http://www.automaticable.com/2008-01-18/how-to-mount-a-network-drive-in-ubuntu/" rel="bookmark" title="January 18, 2008">How-to: Mount a Network drive in Ubuntu</a></li>
</ul><!-- Similar Posts took 43.199 ms -->]]></content:encoded>
			<wfw:commentRss>http://www.automaticable.com/2008-06-25/how-to-host-a-subversion-repository-in-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Kitchen Hack: Mason Jar Magic Bullet</title>
		<link>http://www.automaticable.com/2008-02-18/kitchen-hack-mason-jar-magic-bullet/</link>
		<comments>http://www.automaticable.com/2008-02-18/kitchen-hack-mason-jar-magic-bullet/#comments</comments>
		<pubDate>Tue, 19 Feb 2008 05:47:15 +0000</pubDate>
		<dc:creator>Scott Wegner</dc:creator>
				<category><![CDATA[diy]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[food processor]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[kitchen]]></category>
		<category><![CDATA[magic bullet]]></category>
		<category><![CDATA[mason jars]]></category>
		<category><![CDATA[smoothie]]></category>

		<guid isPermaLink="false">http://www.automaticable.com/2008-02-18/kitchen-hack-mason-jar-magic-bullet/</guid>
		<description><![CDATA[So I just made the most who-woulda-thunk-it discovery.  Stumbling around the internet, I came across this blog with a tip on mason jars.  It turns out that the opening on an average mason jar is sized and threaded just right to fit on your blender.  Simply unscrew the bottom of the blender&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/patrick_q/216398236/" target="_blank" title="Mason Jars"><img src="http://www.automaticable.com/wp-content/uploads/2008/02/mason_jar.thumbnail.jpg" alt="Mason Jars" class="imageframe imgalignleft" height="224" width="300" /></a>So I just made the most who-woulda-thunk-it discovery.  Stumbling around the internet, I came across <a href="http://www.elise.com/recipes/archives/001357tip_blender_and_mason_jar.php" target="_blank">this blog</a> with a tip on mason jars.  It turns out that the opening on an average mason jar is sized and threaded just right to fit on your blender.  Simply unscrew the bottom of the blender&#8217;s normal pitcher, and screw it right on top of your mason jar.  Flip it over onto your blender base, and <em>voila</em>!  This would make a terrific food processor, or a single-serving smoothie.  In fact, you could call this a DIY <a href="http://www.buythebullet.com/">Magic Bullet</a> blender, on the cheap.</p>
<p>According to the article, this isn&#8217;t just coincidence, but dates back to a time when blenders were sold with a mason jar &#8220;attachment&#8221; included.  A local bar around us gives out logo mason jars as mugs, and we&#8217;ve got about a dozen of them piled up in our cabinets.  Now I&#8217;ve found a new use for them!</p>
Similar:<ul><li><a href="http://www.automaticable.com/2008-03-05/take-the-green-pen/" rel="bookmark" title="March 5, 2008">Take the Green Pen</a></li>

<li><a href="http://www.automaticable.com/2008-03-22/the-worlds-best-blogs-according-to-me/" rel="bookmark" title="March 22, 2008">The World&#8217;s Best Blogs (according to me!)</a></li>
</ul><!-- Similar Posts took 11.542 ms -->]]></content:encoded>
			<wfw:commentRss>http://www.automaticable.com/2008-02-18/kitchen-hack-mason-jar-magic-bullet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
