<?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>Michel Hiemstra - Web Development &#38; Internet Marketing &#187; trac</title>
	<atom:link href="http://www.michelhiemstra.nl/blog/tag/trac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michelhiemstra.nl/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 30 Mar 2011 14:59:03 +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>HowTo: Installing Subversion and Trac on CentOS 4</title>
		<link>http://www.michelhiemstra.nl/blog/howto-installing-subversion-and-trac-on-centos/</link>
		<comments>http://www.michelhiemstra.nl/blog/howto-installing-subversion-and-trac-on-centos/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 10:14:58 +0000</pubDate>
		<dc:creator>Michel Hiemstra</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://www.michelhiemstra.nl/blog/?p=49</guid>
		<description><![CDATA[I installed Subversion on a CentOS box with Trac, and although there are many, many howto&#8217;s on the web none of them seemed to work for my configuration. This is what i did, and worked for me on CentOS 4.


Installing Subversion
Installing Trac
Configuring Apache and Authentication

So, lets begin with installing Subversion. I used the Yum package <a href="http://www.michelhiemstra.nl/blog/howto-installing-subversion-and-trac-on-centos/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I installed Subversion on a CentOS box with Trac, and although there are many, many howto&#8217;s on the web none of them seemed to work for my configuration. This is what i did, and worked for me on CentOS 4.</p>
<p><span id="more-49"></span></p>
<ul>
<li>Installing Subversion</li>
<li>Installing Trac</li>
<li>Configuring Apache and Authentication</li>
</ul>
<p>So, lets begin with installing Subversion. I used the Yum package manager but whether you install it from source or not doesn&#8217;t matter that much. We are going to need the packages &#8217;subversion&#8217; and &#8216;mod_dav_svn&#8217;, the last one is for serving Subversion repositories through Apache HTTP Server, which i assume you already have installed.</p>
<pre class="brush:bash">[root@repobox ~] yum install mod_dav_svn subversion</pre>
<p>Thats basicly it for installing, the configuration was where i lost time, now lets continue installing Trac.</p>
<p>I installed Trac also again in combination with Apache, now we need python and mod_python:</p>
<pre class="brush:bash">[root@repobox ~] yum install python mod_python</pre>
<p>And we need the mysql-python plugin so python can connect to MySQL, you can download the tarball from <a title="Mysql Python" href="http://sourceforge.net/projects/mysql-python/" target="_blank">http://sourceforge.net/projects/mysql-python</a>, then compile the package:</p>
<pre class="brush:bash">[root@repobox ~] tar xvzf mysql-python-tarball
[root@repobox ~] cd mysql-python-dir
[root@repobox ~] python setup.py build &amp;&amp; python setup.py install</pre>
<p>Install Clearsilver, this is a templating package used by Trac, you can download it from <a title="Clearsilver" href="http://www.clearsilver.net/downloads/" target="_blank">http://www.clearsilver.net/downloads/</a></p>
<pre class="brush:bash">[root@repobox ~] tar xvzf clearsilver-tarball
[root@repobox ~] cd clearsilver-dir
[root@repobox ~] ./configure â€“with-python=/path/to/python &amp;&amp; make &amp;&amp; make install</pre>
<p>Usually the python path is /usr/lib/python2.4 or whatever version you installed</p>
<p>When you have installed all of the above we can continue with installing Trac, first download Trac from <a title="Trac download" href="http://trac.edgewall.org/wiki/TracDownload" target="_blank">http://trac.edgewall.org/wiki/TracDownload</a></p>
<pre class="brush:bash">[root@repobox ~] tar xvzf trac-tarball
[root@repobox ~] cd trac-dir
[root@repobox ~] python ./setup.py install</pre>
<p>All done, now we can configure both subversion and Trac with Apache, and create some user authentication.</p>
<p>We are going to create config files for apache, vhost and trac:</p>
<pre class="brush:bash">[root@repobox ~] cd /etc/httpd/conf.d/
[root@repobox ~] touch vhosts.conf</pre>
<p>Now, <span style="text-decoration: underline;"><em>nano subversion.conf</em></span> and put in the following:</p>
<pre class="brush:bash">   DAV svn
   SVNParentPath /var/www/svn

   # Limit write permission to list of valid users.

      AuthType Basic
      AuthName "SVN Authorisation"
      AuthUserFile /etc/svn_trac-auth-conf
      Require valid-user</pre>
<p>This allows you to view the repository&#8217;s using http://example.org/repos</p>
<p>Now first lets create a svn repository</p>
<pre class="brush:bash">[root@repobox ~] svnadmin create /var/www/svn/projectname
[root@repobox ~] chown -R apache.apache /var/www/svn/projectname</pre>
<p>And a trac project to go along with it</p>
<pre class="brush:bash">[root@repobox ~] trac-admin /var/www/trac/projectname initenv
[root@repobox ~] chown -R apache.apache /var/www/trac/projectname</pre>
<p>Now lets add some security</p>
<pre class="brush:bash">[root@repobox ~] touch /etc/svn_trac-auth-conf
[root@repobox ~] htpasswd -m /etc/svn_trac-auth-conf username</pre>
<p>Now trac has been setup, lets create a apache link to it:</p>
<pre class="brush:bash">[root@repobox ~] nano /etc/httpd/conf.d/trac.conf</pre>
<p>Add the following:</p>
<pre class="brush:bash">        SetHandler mod_python
        PythonInterpreter main_interpreter
        PythonHandler trac.web.modpython_frontend
        PythonOption TracEnv /var/www/trac/projectname
        PythonOption TracUriRoot /trac/projectname</pre>
<p>Now you can open trac on http://example.org/trac/projectname</p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelhiemstra.nl/blog/howto-installing-subversion-and-trac-on-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

