<?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>phxis.net</title>
	<atom:link href="http://blog.phxis.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.phxis.net</link>
	<description></description>
	<lastBuildDate>Wed, 19 Oct 2011 03:43:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>The Galaxy Nexus / ICS</title>
		<link>http://blog.phxis.net/2011/10/18/the-galaxy-nexus-ics/</link>
		<comments>http://blog.phxis.net/2011/10/18/the-galaxy-nexus-ics/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 03:43:43 +0000</pubDate>
		<dc:creator>phxis</dc:creator>
				<category><![CDATA[uncategorized]]></category>
		<category><![CDATA[google android4.0 android ics ice_cream_sandwich samsung nexus prime galaxy]]></category>

		<guid isPermaLink="false">http://blog.phxis.net/?p=62</guid>
		<description><![CDATA[Just finished watching the broadcast announcement between Google and Samsung. The first thing that comes to mind is, &#8220;WOW&#8221;. Ok, so I&#8217;ve always been more of an Android user than I have ever been an iOS user but some of &#8230; <a href="http://blog.phxis.net/2011/10/18/the-galaxy-nexus-ics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just finished watching the broadcast announcement between Google and Samsung. The first thing that comes to mind is, &#8220;WOW&#8221;. Ok, so I&#8217;ve always been more of an Android user than I have ever been an iOS user but some of these new, subtle, changes to the OS are sweet! I&#8217;m really looking forward to the new Ice Cream Sandwich version of Android and the new Galaxy Nexus (though I wish they kept it as the Nexus Prime). I just seriously hope that they&#8217;re going to release it across all networks in the US, specifically T-Mobile. I know TMo may not be the greatest network, but I&#8217;ve been with T-Mobile since the first release of Android, so I see it as THE Android carrier. Don&#8217;t even bring up Verizon and their &#8220;Droid&#8221; bullshit.  What they&#8217;ve done to the cute cuddly little green android is outrageous. I know at some point I&#8217;ll probably join into the LTE network and succumb to their bullshit, but for now, I&#8217;m holding firm and staying with T-Mobile. The first true Android carrier.</p>
<p>That is all.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phxis.net/2011/10/18/the-galaxy-nexus-ics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The new iPhone 4s</title>
		<link>http://blog.phxis.net/2011/10/04/the-new-iphone-4s/</link>
		<comments>http://blog.phxis.net/2011/10/04/the-new-iphone-4s/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 18:54:20 +0000</pubDate>
		<dc:creator>phxis</dc:creator>
				<category><![CDATA[news]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone 4]]></category>
		<category><![CDATA[iPhone 4s]]></category>

		<guid isPermaLink="false">http://blog.phxis.net/2011/10/04/the-new-iphone-4s/</guid>
		<description><![CDATA[Well I just finished watching the live blogs for the Apple event this morning and I have to say I&#8217;m severely disappointed. Don&#8217;t get me wrong, I&#8217;m not an iPhone user. I love my Nexus S Android phone. But I &#8230; <a href="http://blog.phxis.net/2011/10/04/the-new-iphone-4s/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well I just finished watching the live blogs for the Apple event this morning and I have to say I&#8217;m severely disappointed. Don&#8217;t get me wrong, I&#8217;m not an iPhone user. I love my Nexus S Android phone. But I was really interested in what Apple was releasing to compete with the soon to be announced Nexus Prime. I would&#8217;ve liked to have seen a newly designed iPhone instead of just an upgraded phone. Especially after, what, 18 months?! Anyway, what do you think, are the changes really worth the upgrade?  Or should they have just named this the iPhone 5 and given the masses what they were expecting? </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phxis.net/2011/10/04/the-new-iphone-4s/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Another Year&#8230;</title>
		<link>http://blog.phxis.net/2011/06/19/another-year/</link>
		<comments>http://blog.phxis.net/2011/06/19/another-year/#comments</comments>
		<pubDate>Mon, 20 Jun 2011 05:20:20 +0000</pubDate>
		<dc:creator>phxis</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://blog.phxis.net/?p=60</guid>
		<description><![CDATA[Wow, that was fast&#8230; Another year has gone by and I swore that I would blog more, whoops! Well hopefully things will become more of a routine and I&#8217;ll update some of the new things that have been going on. &#8230; <a href="http://blog.phxis.net/2011/06/19/another-year/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wow, that was fast&#8230; Another year has gone by and I swore that I would blog more, whoops!  Well hopefully things will become more of a routine and I&#8217;ll update some of the new things that have been going on. As for right now, just got back from an awesome trip to Tahoe for a wedding and now I&#8217;m working on something special for the bride and groom. I&#8217;m also leaving to go back home to Boston in a couple weeks to see the fam and catch a Red Sox game. That should be fun, the Sox have been red hot lately. I can&#8217;t wait!  Anyway, that&#8217;s that for now, I&#8217;ll update some more stuff soon&#8230; I promise! <img src='http://blog.phxis.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phxis.net/2011/06/19/another-year/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>In The Works</title>
		<link>http://blog.phxis.net/2010/06/03/in-the-works/</link>
		<comments>http://blog.phxis.net/2010/06/03/in-the-works/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 17:52:24 +0000</pubDate>
		<dc:creator>phxis</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://www.phxis.net/?p=43</guid>
		<description><![CDATA[Hey everyone, I know it&#8217;s been quite a while since I&#8217;ve posted anything. Between a new full-time job, late night development sessions, and now back in school, things have been extremely B-U-S-Y. However, I&#8217;ve got some things in the works &#8230; <a href="http://blog.phxis.net/2010/06/03/in-the-works/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hey everyone,<br />
I know it&#8217;s been quite a while since I&#8217;ve posted anything. Between a new full-time job, late night development sessions, and now back in school, things have been extremely B-U-S-Y. However, I&#8217;ve got some things in the works right now that I feel are going to be <em>HUGE</em>!!! For starters there&#8217;s a new event management framework soon to be released along with many new Android apps. I&#8217;m also working on changing the theme for this blog to something that I feel will fit better with the direction of the company. Check back soon to keep up on all these new changes!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phxis.net/2010/06/03/in-the-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Setting Up Trac on a Shared Server</title>
		<link>http://blog.phxis.net/2008/12/25/how-to-setting-up-trac-on-a-shared-server/</link>
		<comments>http://blog.phxis.net/2008/12/25/how-to-setting-up-trac-on-a-shared-server/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 23:50:16 +0000</pubDate>
		<dc:creator>phxis</dc:creator>
				<category><![CDATA[how to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[walkthrough]]></category>

		<guid isPermaLink="false">http://www.phxis.net/?p=9</guid>
		<description><![CDATA[I&#8217;ve spent countless days scouring the web on a simple way to install Trac 0.10.4 on a host that allowed ssh access. Now, throughout my research, the two hosts that have the best chance of successful install are Hostmonster and &#8230; <a href="http://blog.phxis.net/2008/12/25/how-to-setting-up-trac-on-a-shared-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent <em>countless</em> days scouring the web on a simple way to install <a title="The Trac Project" href="http://trac.edgewall.org/" target="_blank">Trac 0.10.4</a> on a host that allowed ssh access. Now, throughout my research, the two hosts that have the best chance of successful install are <a title="Hostmonster Web Hosting" href="http://www.hostmonster.com" target="_blank">Hostmonster</a> and <a title="Bluehost Web Hosting" href="http://www.bluehost.com/" target="_blank">Bluehost</a>. Both offer <span style="text-decoration: underline;">extremely</span> low priced options, and with the features they provide, you can&#8217;t go wrong either way. Now, I&#8217;m running on <a title="Hostmonster Web Hosting" href="http://www.hostmonster.com" target="_blank">Hostmonster</a> and haven&#8217;t been able to test this with <a title="Bluehost Web Hosting" href="http://www.bluehost.com/" target="_blank">Bluehost</a>, but I&#8217;ve kept the steps pretty simple and generic so they should work without a problem. If anyone does have any issues or come across any differences, let me know so I can update this <strong>How To</strong>.</p>
<p>Anyway, I&#8217;ve compiled this <strong>How To</strong> together for others that may be having difficulties. These are the <span style="text-decoration: underline;">exact</span> steps and commands that I ran in my ssh session to get everything up and running. All the code snippets are ready to run, so just copy &amp; paste them into your terminal. After you&#8217;re done you should <em>hopefully</em> have a working Trac site, with the bonus of a working <a title="Subversion" href="http://subversion.tigris.org/" target="_blank">subversion</a>.</p>
<p>The following are a list of sites that I managed to pull my information from:</p>
<ul>
<li> <a href="http://heidisoft.com/blog/installing-trac-hostmonster-or-bluehost" target="_blank">http://heidisoft.com/blog/installing-trac-hostmonster-or-bluehost</a></li>
<li><a href="http://fitri.manzanisimo.net/2008/05/23/hostmonster-python-25-subversion-14-django-svn-mysqldb-fcgid/" target="_blank">http://fitri.manzanisimo.net/2008/05/23/hostmonster-python-25-subversion-14-django-svn-mysqldb-fcgid/</a></li>
</ul>
<h2>The Requirements</h2>
<p><em>These are mainly pulled from the Trac requirements</em></p>
<ul>
<li>Linux</li>
<li>Apache</li>
<li>SSH access</li>
</ul>
<p>Everything else that is required will be installed and setup in the following steps.</p>
<h2>The Goods</h2>
<p>First setup the three directories that we&#8217;ll be using throughout this <strong>How To</strong>. It&#8217;s best to create these directories in your <em>~/home</em> directory.</p>
<p><code>mkdir install_files<br />
mkdir svn<br />
mkdir trac_sites<br />
mkdir packages</code></p>
<p>Pretty self-explanatory, <em>install_files</em> will be a location where you&#8217;ll download all the needed files to, <em>svn</em> will be where you will house all your projects under version control, <em>trac_sites</em> is the location where the <strong>Trac</strong> projects will be stored, and finally <em>packages</em> will be where we are going to install and run all the needed scripts.</p>
<h3>Setting Your Environment</h3>
<p>There are a couple files that you will need to modify. The first is to add a few variables to your <em>~/.bash_profile</em>.</p>
<p><code>export PYTHONPATH="$HOME/packages/lib/python2.5/site-packages"<br />
export LD_LIBRARY_PATH="$HOME/packages/lib"<br />
export PATH="$HOME/packages/bin:$PATH"</code></p>
<p>Save the file and then run.</p>
<p><code>source ~/.bash_profile</code></p>
<p>Next is your <em>~/.bashrc</em> file, just add the following line to the end.</p>
<p><code>PATH=~/packages/bin:$PATH</code></p>
<p>Save the file and then run.</p>
<p><code>source ~/.bashrc</code></p>
<p>These will setup all the needed references for the following steps.</p>
<h3>Installing Python</h3>
<p>Trac requires python in order to run, so I decided to install version <em>2.5.2</em>. I chose this version because it already includes the <strong>SQLite</strong> database, which is another requirement of Trac. First, make sure you&#8217;re in the <strong>install_files</strong> directory then run:</p>
<p><code>wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tar.bz2<br />
tar xjf Python-2.5.2.tar.bz2<br />
cd Python-2.5.2<br />
make clean<br />
./configure --prefix=$HOME/packages<br />
make &amp;&amp; make install<br />
cd ..</code></p>
<h3>Installing Clearsilver</h3>
<p>You should be back in the <em>~/install_files</em> directory. If you&#8217;re not, navigate yourself back so you are for the next step. <strong>Clearsilver</strong> is part of the templating system that <strong>Trac</strong> uses. Because I went with version<em> 2.5.2</em> of <strong>Python</strong> you need to make sure that you install version <em>10.4+</em> of <strong>Clearsilver</strong>.</p>
<p><code>wget http://www.clearsilver.net/downloads/clearsilver-0.10.4.tar.gz<br />
tar zxf clearsilver-0.10.4.tar.gz<br />
cd clearsilver-0.10.4<br />
make clean<br />
sed -i "s@/usr/local/bin/python@/usr/bin/env python@g" \<br />
scripts/document.py<br />
PYTHON_SITE=`$HOME/packages/bin/python -c \<br />
"import sys; print [path for path in sys.path if \<br />
path.find('site-packages') != -1][0]"` \<br />
./configure --with-python=$HOME/packages/bin/python \<br />
--prefix=$HOME/packages \<br />
--disable-ruby --disable-java --disable-apache --disable-csharp --disable-perl<br />
make &amp;&amp; make install<br />
cd ..</code></p>
<h3>Installing easy_install</h3>
<p>This will setup and install the <strong>Python</strong> module <strong>easy_install</strong>. Trac uses this command frequently to install additional plugins and addons. Again, make sure you&#8217;re in the <em>~/install_files</em> directory.</p>
<p><code>wget http://peak.telecommunity.com/dist/ez_setup.py<br />
python ez_setup.py --prefix=$HOME/packages</code></p>
<h3>Installing SWIG</h3>
<p><strong>SWIG</strong> are the bindings that <strong>Trac</strong> uses to work and communicate with <strong>Subversion</strong>.</p>
<p><code>wget http://dl.sourceforge.net/sourceforge/swig/swig-1.3.31.tar.gz<br />
tar zxf swig-1.3.31.tar.gz<br />
cd swig-1.3.31<br />
make clean<br />
./configure --prefix=$HOME/packages<br />
make &amp;&amp; make install<br />
cd ..</code></p>
<h3>Installing Subversion</h3>
<p>Setting up <strong>Subversion</strong> is a little more difficult than the other packages.  I had a difficult time getting everything to work properly with <strong>Trac</strong>. First, I needed to make sure that I had the <em>dep</em> package for <strong>Subversion</strong> as well. These included the tools to communicate with <strong>Apache</strong> (<em>apr, apr-util, and neon)</em>. However, even after configuring the package with the <em>dep</em> tools, I was still getting an error when trying to use <strong>Subversion</strong>. The solution turned out that I needed to compile the tools separately prior to compiling <strong>Subversion</strong>. I&#8217;ve already taken the liberty of breaking out those steps for you here. But first, let&#8217;s get the <strong>Subversion</strong> files&#8230; you are again in the <em>~/installed_files</em> directory, right?</p>
<p><code>wget http://subversion.tigris.org/downloads/subversion-1.4.6.tar.bz2<br />
wget http://subversion.tigris.org/downloads/subversion-deps-1.4.6.tar.bz2<br />
tar xjf subversion-1.4.6.tar.bz2<br />
tar xjf subversion-deps-1.4.6.tar.bz2<br />
cd subversion-1.4.6</code></p>
<h4>apr</h4>
<p><code>cd apr<br />
make clean<br />
./configure --enable-shared --prefix=$HOME/packages<br />
make &amp;&amp; make install</code></p>
<h4>apr-util</h4>
<p><code>cd ../apr-util<br />
make clean<br />
./configure --enable-shared --prefix=$HOME/packages \<br />
--with-expat=builtin --with-apr=$HOME/packages \<br />
--without-berkeley-db<br />
make &amp;&amp; make install</code></p>
<h4>neon</h4>
<p><code>cd ../neon<br />
make clean<br />
./configure --enable-shared --prefix=$HOME/packages \<br />
--with-libs=$HOME/packages --with-ssl<br />
make &amp;&amp; make install</code></p>
<h4>and finally, subversion</h4>
<p><code>cd ..<br />
make clean<br />
./configure --prefix=$HOME/packages --without-berkeley-db \<br />
--with-editor=/usr/bin/vim --with-apr=$HOME/packages \<br />
--with-apr-util=$HOME/packages --with-neon=$HOME/packages \<br />
--with-swig=$HOME/packages/bin/swig \<br />
--with-ssl --with-zlib --with-expat=builtin<br />
make &amp;&amp; make install<br />
make swig-py &amp;&amp; make install-swig-py<br />
cd ~/packages/lib/python2.5/site-packages<br />
echo $HOME/packages/lib/svn-python &gt; subversion.pth<br />
ln -s ~/packages/lib/svn-python/libsvn<br />
ln -s ~/packages/lib/svn-python/svn<br />
python -c "from svn import client"<br />
cd ~/install_files</code></p>
<p><strong>Note:</strong> At times I would get errors when compiling these packages. I&#8217;m not sure why, but if I ran the <em>make</em> and <em>make install</em> on separate lines, it seemed to fix the issue.</p>
<h4>Create your first repository</h4>
<p>Just run the following command to create a new repository. <em>Replace the {rep_name} with whatever you&#8217;d like to call your project.</em></p>
<p><code>svnadmin create $HOME/svn/{rep_name}</code></p>
<h3>Installing Trac</h3>
<p>For this <strong>How To</strong> I decided to go with version 0.<em>10.4</em> of <strong>Trac</strong>. I attempted to try for version <em>0.11</em> but I had difficulty logging in to administer the site and never found a solution to the problem.</p>
<p><code>wget http://ftp.edgewall.com/pub/trac/trac-0.10.4.tar.gz<br />
tar zxf trac-0.10.4.tar.gz<br />
cd trac-0.10.4<br />
python setup.py install --prefix=$HOME/packages<br />
cd ..</code></p>
<h4>Creating your first environment</h4>
<p>The next few commands will help you setup your first environment, including setting up permissions. For this, I&#8217;ve gone with a pretty strict set of permissions. I only want users that I give access to, to be able to view my source code and edit the wiki pages. You can, of course, set it up however you would like. <em>Replace {trac_env} with whatever environment name you would like.</em></p>
<p><code>trac-admin $HOME/trac_sites/{trac_env} initenv</code></p>
<h4>Permissions</h4>
<p><code>trac-admin $HOME/trac_sites/{trac_env} permission remove anonymous '*'<br />
trac-admin $HOME/trac_sites/{trac_env} permission remove authenticated '*'<br />
trac-admin $HOME/trac_sites/{trac_env} permission add admin TRAC_ADMIN<br />
trac-admin $HOME/trac_sites/{trac_env} permission add {admin_username} admin<br />
trac-admin $HOME/trac_sites/{trac_env} permission add anonymous WIKI_VIEW<br />
trac-admin $HOME/trac_sites/{trac_env} permission add authenticated ROADMAP_VIEW WIKI_MODIFY<br />
trac-admin $HOME/trac_sites/{trac_env} permission add authenticated TICKET_VIEW TICKET_CREATE<br />
trac-admin $HOME/trac_sites/{trac_env} permission add authenticated REPORT_VIEW MILESTONE_VIEW<br />
trac-admin $HOME/trac_sites/{trac_env} permission add {authenticate_username} authenticated</code></p>
<h3>Installing Trac Modules</h3>
<p>There are a lot of modules out there that expand <strong>Trac</strong> to do quite a bit beyond it&#8217;s initial setup. I&#8217;ve only needed three additional modules, <em>WebManager, AccountManager</em> and <em>Pygments</em>.</p>
<h4>WebManager</h4>
<p>This is a <strong>MUST!</strong> Allows you to manage the <strong>Trac</strong> environment and settings directly from the web.</p>
<p><code>svn co http://svn.edgewall.com/repos/trac/sandbox/webadmin/<br />
cd webadmin<br />
python setup.py egg_info<br />
python setup.py bdist_egg<br />
cd dist<br />
easy_install --prefix=$HOME/packages *.egg<br />
cd ~/install_files</code></p>
<h4>AccountManager</h4>
<p>Better handles the login and users of the <strong>Trac</strong> environment to the web.</p>
<p><code>svn co http://trac-hacks.org/svn/accountmanagerplugin/0.10 accountmanagerplugin<br />
cd accountmanagerplugin<br />
python setup.py bdist_egg<br />
cd dist<br />
easy_install --prefix=$HOME/packages *.egg<br />
cd ~/install_files</code></p>
<h4>Pygments</h4>
<p>Pygments is a plugin that will color the syntax of your code when you&#8217;re browsing the source. I chose this plugin because I do a lot of <strong>PHP</strong> programming, and <strong>Trac</strong> did not display <strong>PHP</strong> scripts at all without it.</p>
<p><code>easy_install --prefix=$HOME/packages Pygments</code></p>
<p>Once you&#8217;ve installed all the plugins, they now need to be configured in the <em>trac.ini</em> file. This file is located within your trac environment. If you&#8217;ve been following these steps, it should be located at <em>~/trac_sites/{trac_env}/conf/trac.ini</em>. Use your editor of choice to modify this file and add the following to the end of it. But before you do that, let&#8217;s add an initial user. <em>These must be the same usernames that you created when setting up the permissions for the trac environment.</em></p>
<p><code>htpasswd -c ~/trac_sites/trac.htpasswd {username}</code></p>
<p>Append this to the <em>trac.ini</em> file.</p>
<p><code>[account-manager]<br />
password_format = htpasswd<br />
password_file = /home/{your username}/trac_sites/trac.htpasswd</code></p>
<p><code>[components]<br />
acct_mgr.* = enabled<br />
trac.mimeview.api.plaintextrenderer = disabled<br />
trac.mimeview.enscript.enscriptrenderer = enabled<br />
trac.mimeview.php.phprenderer = disabled<br />
trac.mimeview.silvercity.silvercityrenderer = disabled<br />
trac.web.auth.loginmodule = disabled<br />
tracpygments.* = enabled<br />
webadmin.* = enabled</code></p>
<h2>Finalize</h2>
<p>Well, you&#8217;ve made it this far. Only a few more steps and you should be good to go!</p>
<h3>Making Trac Web Accessible</h3>
<p>These next few steps will allow you to access <strong>Trac</strong> from the web. Now, I&#8217;ve set it up so that <strong>Trac</strong> is a subdomain of my site. So it&#8217;s something like <em>trac.your-domain.com</em>. Within the root of my site I&#8217;ve created a <em>trac</em> directory for the subdomain to point to. Again, this is preference, and you can have it however you&#8217;d like. But the first step is to navigate to whatever directory that you&#8217;d like to view <strong>Trac</strong> from. Once there you&#8217;re going to create a new file <em>index.cgi</em>. Since it&#8217;s a <em>.cgi</em> file, you <strong>must</strong> make sure that it has execute permissions. Then open your favorite editor and drop this in.</p>
<p><code>#!/bin/bash<br />
export HOME="/home/{username}"<br />
export TRAC_ENV="$HOME/trac_sites/{your trac project id}"<br />
export PYTHONPATH="$HOME/packages/lib/python2.5/site-packages"<br />
export PATH="$HOME/packages/bin:$PATH"<br />
export LD_LIBRARY_PATH="$HOME/packages/lib"<br />
exec $HOME/packages/share/trac/cgi-bin/trac.cgi</code></p>
<p>Next we&#8217;re going to make a link to the common files that <strong>Trac</strong> uses to help speed up the display of the page. Things like the stylesheets, images, and javascript that help the site function. Again, make sure you&#8217;ve navigated to the directory where you are viewing <strong>Trac</strong> from.</p>
<p><code>mkdir chrome<br />
ln -s $HOME/packages/share/trac/htdocs ./chrome/common</code></p>
<p>Finally, we need to modify the <em>.htaccess</em> file so that the site knows that <em>index.cgi</em> is the default page of the directory and we must make sure that <em>mod_rewrite</em> is on. So open <em>.htaccess</em> with your editor and drop this in.</p>
<p><code>Setup Rewrite Rule<br />
Edit .htaccess located in the {domain name} directory<br />
DirectoryIndex index.cgi<br />
Options ExecCGI FollowSymLinks</code></p>
<p><code>RewriteEngine On<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule ^(.*)$ /index.cgi/$1 [L]</code></p>
<p>And with that, you&#8217;re done! Ok, not quite&#8230; this final snippet is to replace and clean up the links within the <strong>Trac</strong> environment.  Since every link will pass through <em>index.cgi</em> the addressbar will always show it in the link. Like so: <em>http://trac.your-domain.com/index.cgi/wiki</em>. You can fix this like so, first navigate to this directory.</p>
<p><code>cd $HOME/packages/lib/python2.5/site-packages/trac/web</code></p>
<p>Then make a backup of the <em>api.py</em> file</p>
<p><code>cp api.py api.py.backup</code></p>
<p>Now open <em>api.py</em> in your editor and find this line.</p>
<p><code>base_path = property(fget=lambda self: self.environ.get('SCRIPT_NAME', ''), doc='The root path of the application')</code></p>
<p>and change it to</p>
<p><code>base_path = property(fget=lambda self: os.path.dirname(self.environ.get('SCRIPT_NAME', '')), doc='The root path of the application')</code></p>
<p>NOW, you&#8217;re done! Please feel free to leave a comment. Remember, results may vary, I tried to keep this as generic as possible, but sometimes things don&#8217;t always work the way you expect them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.phxis.net/2008/12/25/how-to-setting-up-trac-on-a-shared-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

