<?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>Daniel Skinner: News and Articles on Web Development &#187; Guides</title>
	<atom:link href="http://www.daniel-skinner.co.uk/tag/guides/feed" rel="self" type="application/rss+xml" />
	<link>http://www.daniel-skinner.co.uk</link>
	<description>Daniel Skinner&#039;s Blog: Web Development news and articles</description>
	<lastBuildDate>Wed, 18 Mar 2009 15:11:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Install phpUnderControl on CentOS 5</title>
		<link>http://www.daniel-skinner.co.uk/php-under-control-svn-centos-5/12/06/2008</link>
		<comments>http://www.daniel-skinner.co.uk/php-under-control-svn-centos-5/12/06/2008#comments</comments>
		<pubDate>Thu, 12 Jun 2008 15:19:56 +0000</pubDate>
		<dc:creator>Daniel Skinner</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpundercontrol]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.daniel-skinner.co.uk/?p=26</guid>
		<description><![CDATA[If you follow this guide you should start with a basic CentOS 5 installation with Subversion setup correctly and end up with a working installation of phpUnderControl.]]></description>
			<content:encoded><![CDATA[<p>A while back now I started setting up a server to use as a development machine. From a standard CentOS 5 installation I have installed <a title="CentOS SVN" href="http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008">SubVersion and Trac</a>. Now I have finally got round to installing <a title="phpUnderControl" href="http://www.phpundercontrol.org/">phpUnderControl</a> for continuous integration and build management.</p>
<p>As usual, there are many great guides already on the net but getting everything to work usually requires a few of these references and a few additional changes. I will point out where I got the information from where applicable but the aim of this guide is to be complete and comprehensive.</p>
<p>If you follow this guide you should start with a basic <a title="CentOS 5 SVN and Trac" href="http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008">CentOS 5 installation with Subversion</a> setup correctly and end up with a working installation of phpUnderControl.</p>
<p><span id="more-26"></span></p>
<h2>The Environment</h2>
<p>I am aiming for the following:</p>
<ul>
<li>CentOS 5 with SubVersion installed</li>
<li>PHP 5.2.X installed</li>
<li>CruiseControl binary installed, running on Sun JDK 6</li>
<li>phpUnderControl installed</li>
<li>A working build process for the example project</li>
</ul>
<h2>Here it is&#8230;</h2>
<h3>Upgrade CentOS 5 with PHP5.2</h3>
<p>To get PHP5.2 installed on CentOS 5 (required for phpUC) we need to add an additional repository that has it. I am going to use the <a href="http://www.jasonlitka.com/yum-repository/">Yum Repository</a> provided by <a href="http://www.jasonlitka.com/">Jason Litka</a>. Detailed instructions can be found at his site. In summary, for CentOS 5 this consists of:</p>
<pre>rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
vi /etc/yum.repos.d/utterramblings.repo</pre>
<p>Add the following lines:</p>
<pre>[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka</pre>
<p>Now Yum can update PHP to 5.2. We also need a few other dependencies for phpUC:</p>
<pre>yum install -y php php-pear php-xml</pre>
<p>And the latest version of pear:</p>
<pre>pear channel-update pear.php.net
pear upgrade pear</pre>
<h3>Get phpUnderControl</h3>
<p>Using pear to install phpUC:</p>
<pre>pear config-set preferred_state beta
pear channel-discover components.ez.no
pear channel-discover pear.phpunit.de
pear install --alldeps phpunit/phpUnderControl</pre>
<p>This will install phpUC and all required dependencies. It&#8217;s a good idea to set pear back to only installing stable (i.e. non beta) packages:</p>
<pre>pear config-set preferred_state stable</pre>
<h3>Sun Java JDK 6</h3>
<p>phpUC needs CruiseControl and CruiseControl needs Sun JDK. Again, a full guide for getting this done can be found on the <a title="Java on CentOS" href="http://www.jasonlitka.com/">CentOS wiki</a>. The steps I took are:</p>
<p>Set up rpmbuild:</p>
<pre>vi ~/.rpmmacros</pre>
<p>Make sure the file contents is:</p>
<pre>%_topdir /home/&lt;username&gt;/rpmbuild
%_tmppath %{_topdir}/tmp</pre>
<p>with &lt;username&gt; replaced with your logon name (if you are using root the path would be /root/rpmbuild).</p>
<pre>mkdir -p ~/rpmbuild/{SOURCES,SRPMS,SPECS,RPMS,tmp,BUILD}
yum install -y rpm-build gcc gcc-c++ redhat-rpm-config jpackage-utils</pre>
<p>Download JDK6 Update 6 (or the latest version) from <a href="http://java.sun.com">java.sun.com</a>. Get the .rpm.bin version. The file I got was called jdk-6u6-linux-i586-rpm.bin.</p>
<pre>chmod +x jdk-6u6-linux-i586-rpm.bin
./jdk-6u6-linux-i586-rpm.bin
wget http://mirrors.dotsrc.org/jpackage/1.7/generic/non-free/RPMS/java-1.6.0-sun-compat-1.6.0.06-1jpp.i586.rpm
rpm -Uvh jdk-6u1-linux-i586.rpm java-1.6.0-sun-compat-1.6.0.01-1jpp.i586.rpm</pre>
<p>With the JDK successfully installed (hopefully) we use Alternatives to select the Sun JDK:</p>
<p>/usr/sbin/alternatives &#8211;config java</p>
<p>Make sure the selected version is along the lines of /usr/lib/jvm/jre-1.6.0-sun/bin/java.</p>
<p>At this point java -version should give something like:</p>
<pre>java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)</pre>
<p>Now to add some environment variables:</p>
<pre>vi /etc/profile.d/java.sh</pre>
<p>Add the following:</p>
<pre>export JAVA_HOME="/usr/java/jdk1.6.0_06"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"</pre>
<p>Note that JAVA_HOME is not set to &#8220;/usr/java/jdk1.6.0_06/bin&#8221;. I don&#8217;t think this is the standard but it&#8217;s an easy way to get CruiseControl to work (<a href="http://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&amp;topic_id=5717&amp;forum=28">see here</a>).</p>
<p>You will also need to restart your session for these changes to take effect or just export the variables directly to the prompt.</p>
<h3>Get CruiseControl</h3>
<p>Download the latest <a title="CruiseControl" href="http://sourceforge.net/project/showfiles.php?group_id=23523&amp;package_id=16338">2.7.X CruiseControl binary</a>. My version is cruisecontrol-bin-2.7.2.zip.</p>
<pre>unzip cruisecontrol-bin-2.7.2.zip -d /opt
ln -s /opt/cruisecontrol-bin-2.7.2/ /opt/cruisecontrol</pre>
<p>CruiseControl is bow installed in /opt/cruisecontrol-bin-2.7.2/ which is symlinked by /opt/cruisecontrol/</p>
<h3>Setup phpUnderControl and CruiseControl</h3>
<p>A more thorough guide can be found in the <a title="phpUnderControl" href="http://www.phpundercontrol.org/documentation.html">phpUnderControl Documentation</a>.</p>
<p>To patch the CruiseControl installation you should be able to simply to:</p>
<pre>phpuc install /opt/cruisecontrol</pre>
<p>If not, try this:</p>
<pre>cd /opt/
<code>svn co svn://www.phpunit.de/browser/phpUnderControl/tags/0.4.2 phpundercontrol
phpundercontrol/bin/phpuc.php install /opt/cruisecontrol</code></pre>
<p>And that&#8217;s pretty much it! I&#8217;ll just set up the example project so you can see it all in action:</p>
<pre>phpuc example /opt/cruisecontrol</pre>
<p>And to start cruisecontrol:</p>
<pre>cd /opt/cruisecontrol/
./cruisecontrol.sh</pre>
<p>Give it a while to setup. Once it&#8217;s all done you should be able to access the interface at:</p>
<p>http://localhost:8080/</p>
<p>By now you should have a working phpUC setup on your CentOS 5 machine and the example project failing the build process. Setting up your own projects is a bit more involved &#8211; follow the guide in the documentation for more details. As for the best way to make use of phpUC and optimal project layouts etc. I will have to get back to you as I haven&#8217;t yet played around much.</p>
<p>Please let me know if this helped you. If you come across any problems I will be happy to try and help.</p>
<h2>Resources</h2>
<ul>
<li>Setting up <a title="CentOS 5 SVN and Trac" href="http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008">S</a><a title="CentOS 5 SVN and Trac" href="http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008">VN (and optionally Trac) on CentOS 5</a></li>
<li>Alternative <a title="Install PHPUnderControl on CentOS 5.1" href="http://f13o.blogspot.com/2008/06/install-phpundercontrol-on-centos-51.html">PHP5.2 and phpUC Setup</a></li>
<li><a title="Yum Repository" href="http://www.jasonlitka.com/yum-repository/">Jason Litka&#8217;s Yum Repository</a></li>
<li>Detailed guide to installing <a title="Java on CentOS" href="http://wiki.centos.org/HowTos/JavaOnCentOS">Java on CentOS</a></li>
<li><a href="http://www.phpundercontrol.org/documentation.html">phpUnderControl documentation</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.daniel-skinner.co.uk/php-under-control-svn-centos-5/12/06/2008/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Chaining with MooTools 1.2 &#8211; Tutorial</title>
		<link>http://www.daniel-skinner.co.uk/chaining-with-mootools-12-tutorial/31/01/2008</link>
		<comments>http://www.daniel-skinner.co.uk/chaining-with-mootools-12-tutorial/31/01/2008#comments</comments>
		<pubDate>Thu, 31 Jan 2008 22:30:11 +0000</pubDate>
		<dc:creator>Daniel Skinner</dc:creator>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[chain]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.daniel-skinner.co.uk/chaining-with-mootools-12-tutorial/31/01/2008</guid>
		<description><![CDATA[A short tutorial on how to use Chaining in MooTools.]]></description>
			<content:encoded><![CDATA[<p>This guide will show how powerful the <strong>MooTools Chain class</strong> is. In MooTools chaining facilitates the execution of a stack of functions sequentially and is extremely powerful. I have only tested this in <strong>MooTools v1.2 beta 2</strong>.</p>
<p>I will be posting more of these short guides on using MooTools in the upcoming weeks. Each will focus on a small problem and solve it with MooTools with the aim of being a useful way to learn the framework.</p>
<p><span id="more-15"></span></p>
<h3>Chaining you say!</h3>
<p><strong>Chaining</strong> is very powerful and whilst it is similar to <code>Effect.Queue</code> in Script.aculo.us, it can do much more! The aim of this brief tutorial is to show you how to use <strong>MooTools Chaining</strong> in the context of queueing effects coupled with other arbitrary actions. However, you will see that you can easily apply Chaining to do much more than that.</p>
<p>From the MooTools 1.2 Docs:</p>
<blockquote><p>A Utility Class which executes functions one after another, with each function firing after completion of the previous. Its methods can be implemented with <code><a href="http://docs12b.mootools.net/Class/Class/#Class:implement" title="MooTools Documentation: Class:implement" rel="external nofollow">Class:implement</a></code> into any <code><a href="http://docs12b.mootools.net/Class/Class" title="MooTools Documentation: Class" rel="external nofollow">Class</a></code>, and it is currently implemented in <code>Fx</code> and <code>Request</code>. In <code>Fx</code>, for example, it is used to create custom, complex animations.</p></blockquote>
<p><code>Chain</code> can be used as a stand-alone class but becomes much more powerful if you implement it into classes of your own.</p>
<p>In this tutorial I will be creating a class which implements <code>Chain</code>. The <code>Chain</code> class belongs to the <code>Class.Extras</code> component so you will need to make sure that you select <code>Class.Extras</code> and all its dependencies when downloading MooTools.</p>
<h3>Implementing Chain</h3>
<p>First of all we need to implement the methods and properties of the <code>Chain</code> class into our own class:</p>
<pre lang="javascript">var ChainExample = new Class({

  Implements: [Chain]

});</pre>
<p>Our class now has the following methods available to it:</p>
<ul>
<li><strong><code>Chain::chain</code></strong> &#8211; Pass any number of functions to add them to the bottom of the call stack.</li>
<li><strong><code>Chain::callChain</code></strong> &#8211; Pops a function off the top of the call stack and executes it.</li>
<li><strong><code>Chain::clearChain</code></strong> &#8211; Removes all functions from the call stack without executing any.</li>
</ul>
<h3>Using Chain to Execute Actions in Order</h3>
<p>Now we have implemented <code>Chain</code> into our <code>ChainExample</code> class we are ready to make use of the functionality it provides.</p>
<p>The <code>ChainExample</code> class will add events to three button elements. When a button element is clicked a corresponding panel will appear. Before this happens all other panels will be faded out. Chaining is used to make sure that these events happen in the order we want.</p>
<p>The full code for <code>ChainExample</code> is:</p>
<pre lang="javascript">
/**

 * Add events to buttons. Clicking a button will hide all panels before showing the panel corresponding to that button

 */

var ChainExample = new Class({

    Implements: [Chain],

    /**

     * Define the element ID of the button and the element ID of the corresponding panel

     */

    actions: new Hash({

        'button-one': 'panel-one',

        'button-two': 'panel-two',

        'button-three': 'panel-three'

    }),

    /**

     * An Array to store an effect instance for each panel

     */

    effects: [],

    initialize: function()

    {

        /**

         * Add an onclick event to each button. Clicking a button calls the showPanel method

         */

        this.actions.getKeys().each(function(buttonId) {

            $(buttonId).addEvent('click', this.showPanel.bindWithEvent(this));

        },this);

        /**

         * Create an Fx object for each panel

         */

         this.actions.getValues().each(function(panelId) {

            this.effects[panelId] = new Fx.Tween($(panelId), 'opacity', { duration: 'short', onComplete: function() { this.callChain();}.bind(this)});

         }, this);         /**

          * Initialize by hiding all panels, note the call to callChain to cause stuff to happen

          */

        this.hideAll();

        this.callChain();

    },

    /**

     * Add the a actions required to hide all panels to the Chain call stack

     */

    hideAll: function()

    {

        /**

         * loop each panel and Chain: 1. fade the panel, 2. set the display property to "none" after the effect has finished.

         *

         * Note that this function does not actually cause anything to happen, it simply adds actions to the Chain

         */

        this.actions.getValues().each(function(panelId) {

            this.chain(

                function() { this.effects[panelId].start(0); },

                function() { $(panelId).setStyles({'display': 'none'}); this.callChain(); }

            );

        },this);

    },

    /**

     * Handle a button click by fading and hiding all open panels and then appearing the corresponding panel

     */

    showPanel: function(event)

    {

        this.hideAll();

        var panel = this.actions.get(event.target.get('id'));

        this.chain(

            function() { $(panel).setStyles({'display': 'block', 'opacity': '0'}); this.callChain(); },

            function() { this.effects[panel].start(1); }

        );

        this.callChain(); //this call starts the chain. Since each function in the call also makes a call to callChain the entire stack will be executed

    }

});

window.addEvent('domready',

    function()

    {

        var myChain = new ChainExample();

    }

);</pre>
<p>I will only go through the code relevant to chaining in detail. Lets have a look at each important part:</p>
<h4><code>ChainExample::initialize</code></h4>
<p>In the constructor we bind behaviours to the buttons and create <code>Fx</code> objects for the panels. Notice the custom <code>onComplete</code> callback provided for each <code>Fx</code> instance. This tells the internal chain stack to pop the next function and run it right after the effect has finished. We are now able to execute any function as soon as the effect completes.</p>
<h4><code>ChainExample::hideAll</code></h4>
<p>Look at this method carefully. A call to <code>ChainExample::hideAll()</code> does not actually hide the panels. The method adds to the chain stack a set of functions that will fade and hide each panel in order. To get the panels to actually hide we must execute the chain stack using <code>this.callChain()</code>.</p>
<p>Notice how the second function passed to <code>this.chain</code> invokes <code>this.callChain()</code>. The function is telling the chain stack to continue onto the next function by itself.</p>
<p>Another important thing to note is that there is no need to bind the function passed to <code>this.chain</code> as this is dealt with internally.</p>
<h4><code>ChainExample::showPanel</code></h4>
<p>This is the event handling function that will show a panel.</p>
<p>First off a call to <code>ChainExample::hideAll()</code> is made. Remember that this method doesn&#8217;t cause anything to happen immediately. At this point we have added all the steps needed to hide all the panels to the chain stack. We then proceed to add steps which will show the correct panel.</p>
<p>Once the entire chain stack is set up <code>this.callChain()</code> is executed and the entire stack will be called because each step makes its own call to <code>this.callChain()</code> once it has finished.</p>
<p>That&#8217;s the basics of <code>Chain</code>. We have created a class which allows us to combine any number of effects and arbitrary functions and ensure that the are executed in the order we want. Hence the basic idea of <code>Chain</code> is to create a stack of functions and execute them in the order you please whenever you please.</p>
<h3>Downloadable Demo</h3>
<p>I have put together a quick demo so that you can see the code in action. Download the demo <a href="http://www.destiny-denied.co.uk/files/moo-chain.zip">here</a>.</p>
<h3>Further Considerations</h3>
<p>In my example, every function in the chain stack makes a call to <code>this.callChain()</code> once is has completed.  This means that as soon as the first function is executed (by manually invoking <code>this.callChain()</code>) the entire stack will run from start to finish automatically. <code>Chain</code> can be used in a different fashion where <code>Chain::callChain()</code> is always invoked externally. As a crude modification to my example, every click on a button could invoke <code>this.callChain()</code>. Thus each button click takes one further step to completion of the actions.</p>
<p>If you need to add timings and delays consider using <code><a href="http://docs12b.mootools.net/Native/Function#Function:delay" title="MooTools Documentation: Function:Delay" rel="external nofollow">Function:delay</a></code> to delay the invocation of <code>Chain::callChain()</code>.</p>
<p>It is also possible to use multiple chains in the same class for even more complex behaviour. This would involve using separate instances of the Chain class directly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.daniel-skinner.co.uk/chaining-with-mootools-12-tutorial/31/01/2008/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Setup Subversion and Trac on CentOS 5</title>
		<link>http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008</link>
		<comments>http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008#comments</comments>
		<pubDate>Sun, 06 Jan 2008 17:19:17 +0000</pubDate>
		<dc:creator>Daniel Skinner</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Guides]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008</guid>
		<description><![CDATA[Recently I set up a virtual server to use as a development machine. It runs on CentOS 5 and hosts several Subversion repositories with associated Trac projects.
There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across a [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I set up a virtual server to use as a development machine. It runs on CentOS 5 and hosts several <a href="http://subversion.tigris.org/" title="Subversion" rel="external">Subversion</a> repositories with associated <a href="http://trac.edgewall.org/" title="Trac" rel="external">Trac</a> projects.</p>
<p>There are many guides and plenty of help on the net to help you setup such a system. However, when I tried to do it I came across a few problems and I hope this post may help at least a few people trying to do the same as me. I am not going to rewrite the great tutorials out there, I will just point you to them and note what things I did differently.</p>
<p>This &#8216;guide&#8217; should get you from a fresh install of CentOS 5 linux to one or more working Subversion (<abbr title="Subversion">SVN</abbr>) repositories and associated Trac wiki&#8217;s. Apache/WebDAV is used as the network layer. I have only tested this on a fresh install of CentOS 5.</p>
<p><span id="more-18"></span></p>
<h2>The Environment</h2>
<p>I am aiming for the following:</p>
<ul>
<li>CentOS 5, <abbr title="Subversion">SVN</abbr> installed. Apache2 as the network layer using mod_dav_svn.</li>
<li>Trac running on Apache with mod_python</li>
<li><abbr title="Subversion">SVN</abbr> repositories located at: /srv/svn (e.g. /srv/svn/my-project), accessible via http://server/svn/my-project</li>
<li>Trac projects located at: /srv/trac (e.g /srv/trac/my-project) accessible via http://server/trac/my-project</li>
</ul>
<h2>How I did it</h2>
<p>Not all the steps are vital (probably) but this is how I got it working. Feel free to skip any non-relevant steps (i.e. there is probably no need for a fresh install). Replace any occurence of <span class="inline-code">&lt;project&gt;</span> with the name of your first project.</p>
<p><strong>1.</strong> Fresh install of CentOS. I followed most of the <a href="http://www.howtoforge.com/perfect_setup_centos5.0" title="The Perfect Setup: CentOS 5.0" rel="external">Perfect Setup Guide</a>, except the mail and ISPConfig stuff. The important part is setting up the Apache2 web server.</p>
<p><strong>2.</strong> Make sure <abbr title="Subversion">SVN</abbr> and mod_dav_svn are installed. As root:</p>
<pre>yum install subversion mod_dav_svn</pre>
<pre>vim /etc/httpd/conf/httpd.conf</pre>
<p>If the following two lines are not present, add them:</p>
<pre>LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so</pre>
<p><strong>3.</strong> Install Trac: Follow <a href="http://www.techyouruniverse.com/software/installing-trac-with-subversion-on-cent-os-5-with-neon-and-quicksilver" title="Installing Trac with SubVersion on CentOS 5" rel="external">Nick&#8217;s guide</a> with the alternative Clearsilver installation below. Skip the Apache Configuration part.</p>
<p>Follow all of parts 1 and 2. Instead of part 3 do:</p>
<pre>wget http://dag.wieers.com/rpm/packages/clearsilver/clearsilver-0.10.4-1.el5.rf.i386.rpm
rpm -i clearsilver-0.10.4-1.el5.rf.i386.rpm
wget http://dag.wieers.com/rpm/packages/clearsilver/python-clearsilver-0.10.4-1.el5.rf.i386.rpm
rpm -i python-clearsilver-0.10.4-1.el5.rf.i386.rpm</pre>
<p>Continue with parts 4.1 and 4.2 of Nick&#8217;s guide. Remember, leave out Apache configuration section.</p>
<p><strong>4. </strong>Create your first <abbr title="Subversion">SVN</abbr> Repository:</p>
<pre>svnadmin create --fs-type fsfs /srv/svn/&lt;project&gt;</pre>
<p><strong>5.</strong> Initialise a Trac project for your new repository:</p>
<pre>trac-admin /srv/trac/&lt;project&gt; initenv</pre>
<p>For the trac-admin command use the defaults if not sure, giving a descriptive name for the project. The `Path to repository` is: <span class="inline-code">/srv/svn/&lt;project&gt;</span>.</p>
<p><strong>6.</strong> Set the correct file permissions for apache</p>
<pre>chown -R apache.apache /srv/svn/&lt;project&gt;
chown -R apache.apache /srv/trac/&lt;project&gt;</pre>
<p><strong>7.</strong> Tell apache where to find the new repository. Here we create an additional Apache configuration file specifically for the <abbr title="Subversion">SVN</abbr> repositories.</p>
<pre>vim /etc/httpd/conf.d/subversion.conf</pre>
<p>Add the following directive:</p>
<pre>&lt;Location /svn/&lt;project&gt;&gt;
	DAV svn
	SVNPath /srv/svn/&lt;project&gt;
	AuthType Basic
	AuthName "&lt;project&gt; Repository"
	AuthzSVNAccessFile /srv/svn/svn-acl-conf
	AuthUserFile /srv/svn/&lt;project&gt;.htpasswd
	Require valid-user
&lt;/Location&gt;</pre>
<p><strong>8.</strong> Add a repository user:</p>
<pre>touch /srv/svn/&lt;project&gt;.htpasswd
htpasswd -m /srv/svn/&lt;project&gt;.htpasswd &lt;username&gt;</pre>
<p><strong>9. </strong>Create the Access Control List for the SVN Repository</p>
<pre>vim /srv/svn/svn-acl-conf</pre>
<p>Add the following directives:</p>
<pre>[&lt;project&gt;:/]
&lt;username&gt; =  rw</pre>
<p>Where <span class="inline-code">&lt;username&gt;</span> represents the username of the repository user you created earlier.</p>
<p><strong>10.</strong> Tell apache where to find the new Trac project. Here we create an additional Apache configuration file specifically for the Trac projects.</p>
<pre>vim /etc/httpd/conf.d/trac.conf</pre>
<p>Add the following directives:</p>
<pre>&lt;Location /trac/&lt;project&gt;&gt;
	SetHandler mod_python
	PythonHandler trac.web.modpython_frontend
	PythonOption TracEnv /srv/trac/&lt;project&gt;
	PythonOption TracUriRoot /trac/&lt;project&gt;
&lt;/Location&gt;

&lt;Location "/trac/&lt;project&gt;/login"&gt;
	AuthType Basic
	AuthName "trac"
	AuthUserFile /srv/trac/&lt;project&gt;.htpasswd
	Require valid-user
&lt;/Location&gt;</pre>
<p><strong>11.</strong> Add a Trac user:</p>
<pre>touch /srv/trac/&lt;project&gt;.htpasswd
htpasswd -m /srv/trac/&lt;project&gt;.htpasswd &lt;username&gt;</pre>
<p><strong>12.</strong> Give admin permissions to the Trac user you just created:</p>
<pre>trac-admin /srv/trac/&lt;project&gt; permission add &lt;username&gt; TRAC_ADMIN</pre>
<p>Where <span class="inline-code">&lt;username&gt;</span> represents the username of the Trac user you just created.</p>
<p><strong>13.</strong> Restart Apache:</p>
<pre>service httpd restart</pre>
<p>You should now have <abbr title="Subversion">SVN</abbr> and Trac installed. You will have an <abbr title="Subversion">SVN</abbr> repository setup (http://server/svn/&lt;project&gt;) and the Trac wiki (http://server/trac/&lt;project&gt;) associated with the repository.</p>
<p>Please let me know if this helped you. If you come across any problems I will be happy to try and help.</p>
<h2>Resources</h2>
<p>The last part of <a href="http://" title="CentOS HowTos: Subversion">CentOS HowTos: Subversion</a> will give you a quick introduction on how to use <abbr title="Subversion">SVN</abbr>.</p>
<p>Subversion setup guides: <a href="http://www.jimohalloran.com/2006/01/15/subversion-server-on-centos-42/" title="Subversion setup guide" rel="external">here</a> and <a href="http://www.techyouruniverse.com/software/installing-trac-with-subversion-on-cent-os-5-with-neon-and-quicksilver" title="Subversion setup guide" rel="external">here</a></p>
<p>Trac setup guides: <a href="http://trac.edgewall.org/wiki/TracOnRhel4" title="Trac setup guide" rel="external">here</a> and <a href="http://trac.edgewall.org/wiki/TracOnFedoraCore" title="Trac setup guide" rel="external">here</a>.</p>
<p><a href="http://www.clearsilver.net/" title="ClearSilver" rel="external">ClearSilver template system</a> (used by Trac).</p>
<p><a href="http://www.howtoforge.com/perfect_setup_centos5.0_p7" title="The Perfect Setup: CentOS 5.0" rel="external">Setting up CentOS 5.0</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.daniel-skinner.co.uk/setup-subversion-and-trac-on-centos-5/06/01/2008/feed</wfw:commentRss>
		<slash:comments>63</slash:comments>
		</item>
	</channel>
</rss>
