<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Straight Ornamental: Trac setup</title>
    <link>http://grahamstratton.org/blog/public/articles/2007/02/15/trac-setup</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Ramblings from a rambler</description>
    <item>
      <title>Trac setup</title>
      <description>&lt;p&gt;Just in case I haven&amp;#8217;t already expressed my opinion on this: trac is wonderful. It&amp;#8217;s a simple integration of subversion with an issue tracker and a wiki.  It&amp;#8217;s probably not that difficult to set up by default, but for some reason I chose to use Postgres instead of SQLite, so there&amp;#8217;s a little bit to it.  I covered installing everything elsewhere, so here I&amp;#8217;m just going to describe setting up the database and configuring it all.&lt;/p&gt;


	&lt;p&gt;First we need to create a subversion repository.  This needs to be writable by the user which Apache is running as, probably www-data or similar.&lt;/p&gt;


&lt;pre&gt;sudo svnadmin create /var/svn/hippocms
sudo chown -R www-data /var/svn/hippocms/&lt;/pre&gt;

	&lt;p&gt;Now we need to configure Apache:&lt;/p&gt;


&lt;pre&gt;
  &amp;lt;Location /svn&amp;gt;
    DAV svn
    SVNParentPath /var/svn
    AuthType Basic
    AuthName "Subversion" 
    AuthUserFile /etc/svn-auth
    Require valid-user
  &amp;lt;/Location&amp;gt;
&lt;/pre&gt;

	&lt;p&gt;The SVNParentPath variable makes all the subdirectories of this directory which should be repositories available, but denies access to the directory itself.&lt;/p&gt;


	&lt;p&gt;We&amp;#8217;re only protecting the repository with BasicAuth here; you&amp;#8217;ll need to use https to make this secure.  We need to create the htpasswd file:&lt;/p&gt;


	&lt;p&gt;sudo htpasswd -c /etc/svn-auth graham&lt;/p&gt;


	&lt;p&gt;So now, you should be able to access the repository through the web at http://your.server/svn/hippocms/&lt;/p&gt;


And you should be able to check out its emptyness with 
&lt;pre&gt;svn co http://cambridgewebdevelopment.co.uk/svn/hippocms/&lt;/pre&gt;

	&lt;p&gt;Next we set up the Apache to host trac:&lt;/p&gt;


&lt;pre&gt;
  Alias /trac "/usr/share/trac/htdocs" 

  ScriptAlias /hippocms /usr/share/trac/cgi-bin/trac.cgi
  &amp;lt;Location "/hippocms"&amp;gt;
    SetEnv TRAC_ENV "/var/trac/hippocms" 
    AuthType Basic
    AuthName "hippocms" 
    AuthUserFile /var/trac/hippocms/.htpasswd
    Require valid-user
  &amp;lt;/Location&amp;gt;
&lt;/pre&gt;

And we need to add a user for Apache to authenticate:
&lt;pre&gt;sudo htpasswd -c /var/trac/hippocms/.htpasswd graham&lt;/pre&gt;

	&lt;p&gt;Finally we need to create a database and create a trac user:&lt;/p&gt;


&lt;pre&gt;
sudo su - postgres -c createdb hippocms
sudo su - postgres -c psql hippocms
# create user trac with password 'secret';
&lt;/pre&gt;

	&lt;p&gt;Now we&amp;#8217;re ready to initialise our trac environment:&lt;/p&gt;


&lt;pre&gt;sudo trac-admin /var/trac/hippocms initenv&lt;/pre&gt;

	&lt;p&gt;And everything should Just Work.&lt;/p&gt;</description>
      <pubDate>Thu, 15 Feb 2007 17:39:06 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:226aae1f-0b40-4b90-b632-6799d01a4ea9</guid>
      <author>Graham Stratton</author>
      <link>http://grahamstratton.org/blog/public/articles/2007/02/15/trac-setup</link>
      <category>Software development</category>
    </item>
    <item>
      <title>"Trac setup" by Anime News</title>
      <description>&lt;p&gt;I&amp;#8217;ve been using it with SQLite&amp;#8230; But with this handy tutorial maybe it&amp;#8217;s time to move to postgres :)&lt;/p&gt;


	&lt;p&gt;Thanks mate.&lt;/p&gt;</description>
      <pubDate>Sat, 22 Mar 2008 11:05:28 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:e6676c47-c5e6-49d7-9b6e-f6bcad9a01a9</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/02/15/trac-setup#comment-178</link>
    </item>
    <item>
      <title>"Trac setup" by Sean Tierney</title>
      <description>&lt;p&gt;Graham, thanks for the tutorial. For a truly &amp;#8220;it just works&amp;#8221; setup experience check out the JumpBox for Trac/SVN-&amp;gt; 
&lt;a href="http://www.jumpbox.com/jumpbox-for-tracsubversion-software-project-management" rel="nofollow"&gt;http://www.jumpbox.com/jumpbox-for-tracsubversion-software-project-management&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;1min install and fully portable.&lt;/p&gt;


	&lt;p&gt;sean&lt;/p&gt;</description>
      <pubDate>Tue, 28 Aug 2007 20:21:04 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f4220157-b251-4b26-8ef8-d2634d696d2e</guid>
      <link>http://grahamstratton.org/blog/public/articles/2007/02/15/trac-setup#comment-119</link>
    </item>
  </channel>
</rss>
