<?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>david winter &#187; subversion</title>
	<atom:link href="http://davidwinter.me.uk/articles/tag/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidwinter.me.uk</link>
	<description>you were expecting someone else?</description>
	<lastBuildDate>Mon, 28 Jun 2010 20:37:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Subversion 1.4.0 from source via Apache 2.2 on Ubuntu Dapper</title>
		<link>http://davidwinter.me.uk/articles/2006/10/17/subversion-140-from-source-over-apache-22-on-ubuntu-dapper/</link>
		<comments>http://davidwinter.me.uk/articles/2006/10/17/subversion-140-from-source-over-apache-22-on-ubuntu-dapper/#comments</comments>
		<pubDate>Tue, 17 Oct 2006 12:39:42 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[dapper]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2006/10/17/subversion-140-from-source-over-apache-22-on-ubuntu-dapper/</guid>
		<description><![CDATA[This howto assumes you&#8217;ve already followed my Building Apache 2.2 from source article. Now we&#8217;re going to install Subversion 1.4.0 from source so that it can be access via Apache with authentication. Installing Subversion As we&#8217;ve built Apache from source, we&#8217;ll need to do the same for Subversion in order to get the Apache 2 [...]]]></description>
			<content:encoded><![CDATA[<p>This howto assumes you&#8217;ve already followed my <a href="http://davidwinter.me.uk/articles/2006/10/17/building-apache-22-from-source-for-ubuntu-dapper/">Building Apache 2.2 from source</a>  article.</p>

<p>Now we&#8217;re going to install Subversion 1.4.0 from source so that it can be access via Apache with authentication.</p>

<p><span id="more-34"></span></p>

<h3>Installing Subversion</h3>

<p>As we&#8217;ve built Apache from source, we&#8217;ll need to do the same for Subversion in order to get the Apache 2 modules <code>mod_dav_svn</code> and <code>mod_authz_svn</code>.</p>

<pre><code>wget http://subversion.tigris.org/downloads/subversion-1.4.0.tar.gz
tar xvfz subversion-1.4.0.tar.gz
cd subversion-1.4.0/
./configure --prefix=/usr/local --with-apxs=/usr/local/apache2/bin/apxs
make
sudo make install
</code></pre>

<p>This will also add the relevant <code>LoadModule</code> directives into your Apache 2 configuration for you.</p>

<h3>Creating your repository</h3>

<p>Now, create your Subversion repository:</p>

<pre><code>svnadmin create /home/yourusername/subversion/repos
</code></pre>

<p>We have to make that repository owned by Apache so that it can be accessed via the web:</p>

<pre><code>sudo chown -R apache /home/yourusername/subversion/repos
</code></pre>

<h3>Authentication File</h3>

<p>Now create a user/password file for authentication:</p>

<pre><code>htpasswd -cm /home/yourusername/subversion/dav_svn.passwd davidwinter
</code></pre>

<p>When prompted, enter your password.</p>

<h3>Configuring Apache</h3>

<p>Edit your <code>/usr/local/apache2/conf/httpd.conf</code> file with the following placed at the end:</p>

<pre><code>&lt;Location /svn&gt;
  DAV svn
  SVNPath /home/yourusername/subversion/repos

  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /home/yourusername/subversion/dav_svn.passwd
  Require valid-user
&lt;/Location&gt;
</code></pre>

<p>If you want access control based on different users, add the following line after the <code>Require valid-user</code> line:</p>

<pre><code>AuthzSVNAccessFile /home/yourusername/subversion/svn_access_control
</code></pre>

<p>Save the file. Start Apache. To find out what you need to put in the <code>svn_access_control</code> file, read <a href="http://davidwinter.me.uk/articles/2006/03/03/access-control-for-subversion-with-apache2-and-authz/">my previous Subversion authentication article here</a>. for params.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2006/10/17/subversion-140-from-source-over-apache-22-on-ubuntu-dapper/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Access Control for Subversion with Apache2 and Authz</title>
		<link>http://davidwinter.me.uk/articles/2006/03/03/access-control-for-subversion-with-apache2-and-authz/</link>
		<comments>http://davidwinter.me.uk/articles/2006/03/03/access-control-for-subversion-with-apache2-and-authz/#comments</comments>
		<pubDate>Fri, 03 Mar 2006 09:05:03 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[uni]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2006/10/13/access-control-for-subversion-with-apache2-and-authz/</guid>
		<description><![CDATA[My group project at University now consists of three smaller projects that provide an overall RSS service. I want to let the guys work on these, while still letting me keep my other coursework jut accessible to me. At the moment, I just have basic http authentication set-up which isn&#8217;t so great for pulling off [...]]]></description>
			<content:encoded><![CDATA[<p>My group project at University now consists of three smaller projects that provide an overall RSS service. I want to let the guys work on these, while still letting me keep my other coursework jut accessible to me. At the moment, I just have basic http authentication set-up which isn&#8217;t so great for pulling off what I want. </p>

<p>Please welcome on stage the Apache2 mod, <code>authz_svn</code>&#8230;</p>

<p><span id="more-22"></span></p>

<p>If you followed my other <a href="http://davidwinter.me.uk/articles/2006/02/16/subversion-over-apache-2-on-ubuntu">howto</a>, you&#8217;ll have all the pre-requisites for this.</p>

<p>First of all, we need to create an Access Control file.</p>

<pre><code>sudo nano /etc/apache2/svn_access_control
</code></pre>

<p>In this file, you&#8217;ll want to put some rules. I&#8217;ll first of all go over these and then provide some examples.</p>

<h3>Permissions</h3>

<p>There are only two types of permission:</p>

<ul>
<li>Read only &#8211; <code>r</code> &#8211; a user can check-out a copy of a project.</li>
<li>Read and Write &#8211; <code>rw</code> &#8211; a user can check-out and commit changes to a project.</li>
</ul>

<h3>Users</h3>

<p>These are the same usernames that you have set in your password file that you created in the previous <a href="http://davidwinter.me.uk/articles/2006/02/16/subversion-over-apache-2-on-ubuntu">howto</a>. You can always add more users to this file using:</p>

<pre><code>sudo htpasswd2 -m /etc/apache2/dav_svn.passwd bill
</code></pre>

<p>When prompted, enter the password for the user.</p>

<h3>Repository Location</h3>

<p>You specify the above rules in certain locations for the repository. These go between square brackets.</p>

<pre><code>[/]
</code></pre>

<p>The above will specify rules for the root of the repository.</p>

<pre><code>[/wowapp/trunk]
</code></pre>

<p>The above will specify rules for a project named &#8216;wowapp&#8217; in the trunk location.</p>

<h3>User Groups</h3>

<p>You can create groups of users and then use those for rules. You do this under a special heading in square brackets:</p>

<pre><code>[groups]
mygroup = dave, mike
</code></pre>

<p>This will create a group called &#8216;mygroup&#8217; which &#8216;dave&#8217; and &#8216;mike&#8217; belongs to.</p>

<p>And now for some examples.</p>

<h3>Examples</h3>

<pre><code>[groups]
team = bob, bill
devteam = bob, barry, brett

[/]
@team = r
bob = rw

[/wowapp/trunk]
@team = r
@devteam = rw
brenda = rw
</code></pre>

<p>In this example:</p>

<ul>
<li>Created a group <code>team</code> which has two members; <code>bob</code> and <code>bill</code>.</li>
<li>Created another group, called <code>devteam</code> which has three members; <code>bob</code>, <code>barry</code>, <code>brett</code>.</li>
<li>In the root of the repository, I&#8217;ve given the group <code>team</code> read permissions.</li>
<li>Also, in the root, <code>bob</code> has read and write permissions.</li>
<li>In the trunk of <code>wowapp</code>, the group <code>team</code> has read permission. </li>
<li>Also, the <code>devteam</code> group has read and write permissions.</li>
<li>And another user, called <code>brenda</code> has read and write permissions.</li>
</ul>

<p>Once you&#8217;ve created your desired access controll file, save the changes in nano by hitting <code>CTRL O</code>, hit enter to save the name, then <code>CTRL X</code> to quit Nano.</p>

<p>We just need to now link this access control file with our Subversion set-up.</p>

<pre><code>sudo nano /etc/apache2/mods-enabled/dav_svn.conf
</code></pre>

<p>Here&#8217;s the example from the previous how-to:</p>

<pre><code>&lt;Location /svn&gt;
  DAV svn
  SVNPath /home/svn

  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
&lt;/Location&gt;
</code></pre>

<p>All you need to add is the following line:</p>

<pre><code>AuthzSVNAccessFile /etc/apache2/svn_access_control
</code></pre>

<p>So that the file looks like this:</p>

<pre><code>&lt;Location /svn&gt;
  DAV svn
  SVNPath /home/svn

  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd

  AuthzSVNAccessFile /etc/apache2/svn_access_control

  Require valid-user
&lt;/Location&gt;
</code></pre>

<p>Save the file, and then restart Apache2:</p>

<pre><code>sudo /etc/init.d/apache2 restart
</code></pre>

<p>You should now have access control working for Subversion over Apache2.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2006/03/03/access-control-for-subversion-with-apache2-and-authz/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Subversion over Apache 2 on Ubuntu</title>
		<link>http://davidwinter.me.uk/articles/2006/02/16/subversion-over-apache-2-on-ubuntu/</link>
		<comments>http://davidwinter.me.uk/articles/2006/02/16/subversion-over-apache-2-on-ubuntu/#comments</comments>
		<pubDate>Thu, 16 Feb 2006 09:01:26 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[apache]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://davidwinter.me.uk/articles/2006/10/13/subversion-over-apache-2-on-ubuntu/</guid>
		<description><![CDATA[If your one of my regular readers (ha!), then you&#8217;ll know I&#8217;m starting a Group Project for University. We have 7 members in the group and without some sort of version control &#8211; managing the code we&#8217;re about to produce would be hell! So I&#8217;m setting up Subversion on my home server as a repository. [...]]]></description>
			<content:encoded><![CDATA[<p>If your one of my regular readers (ha!), then you&#8217;ll know I&#8217;m starting a Group Project for University. We have 7 members in the group and without some sort of version control &#8211; managing the code we&#8217;re about to produce would be hell! So I&#8217;m setting up Subversion on my home server as a repository. Following are the steps I used to set-up Subversion over Apache 2 on my Ubuntu server.</p>

<p><span id="more-17"></span></p>

<p>I&#8217;m assuming you have Apache 2 already set-up. The only extra packages to download and install are <code>subversion</code> and <code>libapache2-svn</code>.</p>

<pre><code>sudo apt-get install subversion libapache2-svn
</code></pre>

<p>This will download and install Subversion and the SVN module for Apache 2. The module itself uses WebDAV to transmit files between Subversion &#8211; so this means everything can go across port 80 without the hassle of having to worry about a firewall.</p>

<p>The install should automatically enable the module, but just to check:</p>

<pre><code>sudo a2enmod dav_svn
</code></pre>

<p>It should come up saying it&#8217;s already enabled. If not, it will enable it for you.</p>

<p>You&#8217;ll need to configure Apache now:</p>

<pre><code>sudo nano /etc/apache2/mods-enabled/dav_svn.conf
</code></pre>

<p>Edit the file to look something like this:</p>

<pre><code>&lt;Location /svn&gt;
  DAV svn
  SVNPath /home/svn

  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
&lt;/Location&gt;
</code></pre>

<p>Change <code>/home/svn</code> to whatever the location of your repository is. If you haven&#8217;t created one yet, then do:</p>

<pre><code>sudo mkdir /home/svn
sudo svnadmin create /home/svn
</code></pre>

<p>Now, you need to make Apache the owner of the repository:</p>

<pre><code>sudo chown -R www-data /home/svn
</code></pre>

<p>To secure Subversion, do the following to create a password file:</p>

<pre><code>sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd bob
</code></pre>

<p>Replace <code>bob</code> with whatever username you want to use, and then when prompted enter a password.</p>

<p>Now restart Apache:</p>

<pre><code>sudo /etc/init.d/apache2 restart
</code></pre>

<p>That should now all be set-up. You can try it by visiting your server <code>http://you.server/svn</code>. You should get a username/password dialog which you enter the details you created.</p>
]]></content:encoded>
			<wfw:commentRss>http://davidwinter.me.uk/articles/2006/02/16/subversion-over-apache-2-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
	</channel>
</rss>
