<?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>The Rambling Chronicles: Notes &#187; shared host</title>
	<atom:link href="http://notes.theramblingchronicles.co.uk/tags/shared-host/feed/" rel="self" type="application/rss+xml" />
	<link>http://notes.theramblingchronicles.co.uk</link>
	<description>Making sense is optional</description>
	<lastBuildDate>Thu, 26 Aug 2010 10:09:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>trac-bzr setup</title>
		<link>http://notes.theramblingchronicles.co.uk/2009/12/15/trac-bzr-setup/</link>
		<comments>http://notes.theramblingchronicles.co.uk/2009/12/15/trac-bzr-setup/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 15:21:50 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[stuff]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[bzr]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[shared host]]></category>

		<guid isPermaLink="false">http://theramblingchronicles.co.uk/2009/12/15/trac-bzr-setup/</guid>
		<description><![CDATA[Not so easy on a shared host: First, get bazaar. Because we have no gcc ability, we need to set up a config file to change some values in. First create ~/.pydistutils.cfg. You need to add the lines: [build_ext] allow-python-fallback=1 This now allows us to build bazaar: easy_install --prefix=~ bzr With Bazaar installed fetch the [...]]]></description>
			<content:encoded><![CDATA[<p>Not so easy on a shared host:</p>

<p>First, get bazaar. Because we have no gcc ability, we need to set up a config file to change some values in. First create <code>~/.pydistutils.cfg</code>. You need to add the lines:</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">[build_ext]
allow-python-fallback=1</pre></div></div>



<p>This now allows us to build bazaar:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">easy_install <span style="color: #660033;">--prefix</span>=~ bzr</pre></div></div>



<p>With Bazaar installed fetch the latest version of trac-bzr:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bzr branch <span style="color: #c20cb9; font-weight: bold;">lp</span>:trac-bzr</pre></div></div>



<p>You then need to set it up. Navigate to the trac-bzr folder and run:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">python setup.py <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">--prefix</span>=~</pre></div></div>



<p>Once installed, you need to add/change some lines in your <code>trac.ini</code> file.</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Add
tracbzr.* = enabled</pre></div></div>



<p>To the components section and</p>


<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Change
repository_dir = /your/repository/location
repository_type = bzr</pre></div></div>



<p>Once that is complete, you need to get the stuff into your repository. First run <code>bzr repo-init</code> and then change to your working repository and run <code>bzr push sftp:/location/of/repo</code>.</p>]]></content:encoded>
			<wfw:commentRss>http://notes.theramblingchronicles.co.uk/2009/12/15/trac-bzr-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>64bit, virtual-python.py and anoyances caused</title>
		<link>http://notes.theramblingchronicles.co.uk/2009/12/08/64bit-virtual-python-py-and-anoyances-caused/</link>
		<comments>http://notes.theramblingchronicles.co.uk/2009/12/08/64bit-virtual-python-py-and-anoyances-caused/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 11:12:55 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[stuff]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[shared host]]></category>
		<category><![CDATA[shared server]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[virtual-python]]></category>

		<guid isPermaLink="false">http://theramblingchronicles.co.uk/2009/12/08/64bit-virtual-python-py-and-anoyances-caused/</guid>
		<description><![CDATA[Host broke, gave us a new server. This however was 64bit and broke Trac. To get it working again: Modify the virtual-python file line stdlib_dir = join&#40;prefix, 'lib', py_version&#41; to stdlib_dir = join&#40;prefix, 'lib64', py_version&#41; and run. Then re-follow the first few steps in guide on installing Trac, up to and including the easy_install of [...]]]></description>
			<content:encoded><![CDATA[<p>Host broke, gave us a new server. This however was 64bit and broke Trac. To get it working again:</p>


<ul>
<li>Modify the virtual-python file line</li>
</ul>




<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">stdlib_dir = join<span style="color: black;">&#40;</span>prefix, <span style="color: #483d8b;">'lib'</span>, py_version<span style="color: black;">&#41;</span></pre></div></div>



<p>to</p>


<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">stdlib_dir = join<span style="color: black;">&#40;</span>prefix, <span style="color: #483d8b;">'lib64'</span>, py_version<span style="color: black;">&#41;</span></pre></div></div>



<p>and run.</p>


<ul>
<li>Then re-follow the first few steps in guide on installing Trac, up to and including the easy_install of Trac, <a href="http://theramblingchronicles.co.uk/2009/10/23/python-trac-and-shared-hosting/">found here</a></li>
</ul>




<ul>
<li>Now rename the library in the home folder from lib to lib64</li>
</ul>



<p>All should now be working!</p>]]></content:encoded>
			<wfw:commentRss>http://notes.theramblingchronicles.co.uk/2009/12/08/64bit-virtual-python-py-and-anoyances-caused/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python, Trac and shared hosting</title>
		<link>http://notes.theramblingchronicles.co.uk/2009/10/23/python-trac-and-shared-hosting/</link>
		<comments>http://notes.theramblingchronicles.co.uk/2009/10/23/python-trac-and-shared-hosting/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 10:34:14 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[stuff]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[shared host]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://theramblingchronicles.co.uk/?p=300</guid>
		<description><![CDATA[Easy, step by step: Set up a &#8220;virtual&#8221; python installation by running this script: virtual-python, then add these to your .bash_profile: export PYTHONPATH=&#34;$HOME/lib/python2.4/site-packages&#34; export LD_LIBRARY_PATH=&#34;$HOME/packages/lib&#34; export PATH=&#34;$HOME/packages/bin:$PATH&#34; then reload your bash profile with source .bash_profile Next get the easy install package: EasyInstall and run it: sh setuptools-0.6c9-py2.4.egg --prefix=~ This now allows you to install Trac [...]]]></description>
			<content:encoded><![CDATA[<p>Easy, step by step:</p>

<p>Set up a &#8220;virtual&#8221; python installation by running this script: <a href="http://peak.telecommunity.com/dist/virtual-python.py">virtual-python</a>, then add these to your .bash_profile:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PYTHONPATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/lib/python2.4/site-packages&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/packages/lib&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/packages/bin:<span style="color: #007800;">$PATH</span>&quot;</span></pre></div></div>



<p>then reload your bash profile with <code>source .bash_profile</code></p>

<p>Next get the easy install package: <a href="http://pypi.python.org/pypi/setuptools">EasyInstall</a> and run it:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span> setuptools-0.6c9-py2.4.egg <span style="color: #660033;">--prefix</span>=~</pre></div></div>




<p>This now allows you to install Trac in an easier way:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">easy_install <span style="color: #660033;">--prefix</span>=~ Trac</pre></div></div>




<p>Next setup the Trac environment:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project initenv</pre></div></div>




<p>then deploy it for use on a webserver. Due to a bug you need to create another directory to deploy to and then copy over:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project deploy <span style="color: #000000; font-weight: bold;">/</span>other<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">dir</span>
<span style="color: #c20cb9; font-weight: bold;">mv</span> <span style="color: #000000; font-weight: bold;">/</span>other<span style="color: #000000; font-weight: bold;">/</span>dir<span style="color: #000000; font-weight: bold;">/*</span> <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>project</pre></div></div>




<p>Now the fun begins &#8211; you need to makes sure all permissions are correct. Navigate to the <code>cgi-bin</code> directory and run:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">chmod</span> +rx trac.cgi</pre></div></div>




<p>You also need to change <code>#!/usr/bin/python</code> to your python path</p>

<p>The next step is to create an index.cgi page to fix the shared server path bugs:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">HOME</span>=<span style="color: #ff0000;">&quot;/your/site/home&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">TRAC_ENV</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/path/to/trac&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PYTHONPATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/lib/python2.4/site-packages&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/bin:<span style="color: #007800;">$PATH</span>&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LD_LIBRARY_PATH</span>=<span style="color: #ff0000;">&quot;<span style="color: #007800;">$HOME</span>/lib&quot;</span>
<span style="color: #000000; font-weight: bold;">/</span>full<span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>cgi-bin<span style="color: #000000; font-weight: bold;">/</span>trac.cgi</pre></div></div>




<p>and as before, run <code>chmod +rx index.cgi</code> to get it working</p>

<p>Now we need to setup up a .htaccess file to ensure it all works:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">DirectoryIndex cgi-bin<span style="color: #000000; font-weight: bold;">/</span>index.cgi
&nbsp;
AuthType Basic
AuthName <span style="color: #ff0000;">&quot;Trac&quot;</span>
AuthUserFile <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>.htpasswd<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">file</span>
Require valid-user</pre></div></div>




<p>The auth stuff is needed for later. You need to create a htpasswd file with the name of the user you would like to add as admin to it to initially get it running. A better approach will be used when it&#8217;s running.</p>

<p>The next step is to check it all works! Once you&#8217;ve checked it is in fact live and kicking, you need to add the permissions to access it.</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trac-admin <span style="color: #000000; font-weight: bold;">/</span>path<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>trac<span style="color: #000000; font-weight: bold;">/</span>site
<span style="color: #000000; font-weight: bold;">&gt;&gt;</span> permissions add admins TRAC_ADMIN
<span style="color: #000000; font-weight: bold;">&gt;&gt;</span> permissions add <span style="color: #7a0874; font-weight: bold;">&#123;</span>your_name<span style="color: #7a0874; font-weight: bold;">&#125;</span> admins</pre></div></div>




<p>And you should now be able to log in!</p>

<p>The next step is to get the some better authentication working. First:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">easy_install http:<span style="color: #000000; font-weight: bold;">//</span>trac-hacks.org<span style="color: #000000; font-weight: bold;">/</span>svn<span style="color: #000000; font-weight: bold;">/</span>accountmanagerplugin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">0.9</span></pre></div></div>



<p>to install the <a href="http://trac-hacks.org/wiki/AccountManagerPlugin">account manager</a> plugin.</p>

<p>Then simply add the location of the password file in the htpasswd section of the account manager admin. You now need to disable your authentication in the .htaccess file you originally setup so that the <span class="caps">HTML </span>login will work. simply comment out the authentication lines.</p>

<p>Next, edit <code>trac.ini</code> , adding <code>trac.web.auth.LoginModule = disabled</code> to the components section (or disable in the trac admin).</p>

<p>Finally, we need to set up Trac so that it uses a static location for files seen as we&#8217;re stuck using <span class="caps">CGI.</span> Simply edit the <code>trac.ini</code> section so that the <code>htdocs_location</code> reads the full <span class="caps">URL </span>to it: http://your-site.com/htdocs/common/.</p>

<p>Now all should be working!</p>]]></content:encoded>
			<wfw:commentRss>http://notes.theramblingchronicles.co.uk/2009/10/23/python-trac-and-shared-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl, cPanel and Bugzilla</title>
		<link>http://notes.theramblingchronicles.co.uk/2009/10/14/perl-cpanel-and-bugzilla/</link>
		<comments>http://notes.theramblingchronicles.co.uk/2009/10/14/perl-cpanel-and-bugzilla/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 11:22:55 +0000</pubDate>
		<dc:creator>Tom</dc:creator>
				<category><![CDATA[stuff]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[shared host]]></category>

		<guid isPermaLink="false">http://theramblingchronicles.co.uk/2009/10/14/perl-cpanel-and-bugzilla/</guid>
		<description><![CDATA[There are a few things that need to be done to get it working: Firstly, in 4 Perl scripts (checksetup.pl, testserver.pl, index.cgi and Bugzilla.pm) you need to add the path to the alternative Perl modules that cPanel has installed: BEGIN &#123; my $homedir = &#40; getpwuid&#40;$&#62;&#41; &#41;&#91;7&#93;; my @user_include; foreach my $path &#40;@INC&#41; &#123; if [...]]]></description>
			<content:encoded><![CDATA[<p>There are a few things that need to be done to get it working:</p>

<p>Firstly, in 4 Perl scripts (checksetup.pl, testserver.pl, index.cgi and Bugzilla.pm) you need to add the path to the alternative Perl modules that cPanel has installed:</p>


<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">BEGIN</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$homedir</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span> <span style="color: #000066;">getpwuid</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">7</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@user_include</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$path</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">@INC</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">-</span>d <span style="color: #0000ff;">$homedir</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">'/perl'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$path</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000066;">push</span> <span style="color: #0000ff;">@user_include</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$homedir</span> <span style="color: #339933;">.</span> <span style="color: #ff0000;">'/perl'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">$path</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #000066;">unshift</span> <span style="color: #0000ff;">@INC</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">@user_include</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>




<p>When you run the <code>./checksetup.pl</code> file you may need to specify more options, especially if your Perl installation constantly runs out of memory:</p>


<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>checksetup.pl <span style="color: #660033;">--no-templates</span> <span style="color: #660033;">--make-admin</span></pre></div></div>



<p>and all should work.</p>]]></content:encoded>
			<wfw:commentRss>http://notes.theramblingchronicles.co.uk/2009/10/14/perl-cpanel-and-bugzilla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
