<?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>DevOnLinux &#187; howto</title>
	<atom:link href="http://blog.devonlinux.net/category/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.devonlinux.net</link>
	<description>ICT solutions that work</description>
	<lastBuildDate>Tue, 02 Feb 2010 23:54:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remember jCarousel position</title>
		<link>http://blog.devonlinux.net/2009/10/10/remember-jcarousel-position/</link>
		<comments>http://blog.devonlinux.net/2009/10/10/remember-jcarousel-position/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 09:00:31 +0000</pubDate>
		<dc:creator>ed0t</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jCarousel]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.devonlinux.net/?p=104</guid>
		<description><![CDATA[In these months i have worked on an ecommerce project with a lot of products&#8217; list. Since the customer had asked a carousel solution to show her products, we have chosen for jCarousel, an amazing plugin for jQuery. jCarousel is great and highly configurable but it has a small lack: it does not remember the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-105 alignright" title="jQuery Logo" src="http://blog.devonlinux.net/wp-content/uploads/2009/09/jquery_logo.jpg" alt="jQuery logo: write less, do more" width="246" height="96" align="right" /></p>
<p>In these months i have worked on an ecommerce project with a lot of products&#8217; list. Since the customer had asked a carousel solution to show her products, we have chosen for <a title="Take a look at this amazing jQuery plugin" href="http://sorgalla.com/jcarousel/">jCarousel</a>, an amazing plugin for jQuery.</p>
<p>jCarousel is great and highly configurable but it has a small lack: it does not remember the position of the carousel when a user came back to product list page after a quick view of a product detail.</p>
<p>I came out with a simple but practical solution that solves this problem using the support of cookies.</p>
<p>To do this we need few lines of Javascript.<span id="more-104"></span></p>
<p>First of all we have to manage our cookies. We can use pure javascript or jQuery thanks to <a title="Go to jQuery Cookie plugin page" href="http://plugins.jquery.com/project/cookie">jQuery Cookie</a>. I&#8217;ll use the latter in the example above.</p>
<pre style="overflow:auto;">var inNum;
var outNum;
var COOKIE_NAME = "my_carousel_position";

// MANAGE COOKIES
function setCookie(cName, cValue, cDaysNum)
{
  var date = new Date();
  date.setTime(date.getTime() + (cDaysNum * 24 * 60 * 60 * 1000));
  $.cookie(cName, cValue, {  expires: date });
  return false;
}

function getCookie(cName)
{
  return $.cookie(cName);
}

function delCookie(cName)
{
  date = "Thu, 01-Jan-70 00:00:01 GMT";
  $.cookie(cName, null, {  expires: date });
  return false;
}
// END MANAGE COOKIES

function mycarousel_itemVisibleOutCallback(carousel, item, i, state, evt)
{
  outNum = i;
  setPosition();
};

function mycarousel_itemVisibleInCallback(carousel, item, i, state, evt)
{
  inNum = i;
};

// calculate first visible item
function getFirstVisibleItemId(inNum, outNum)
{
  minVal = Math.min(inNum, outNum);
  if(inNum == minVal){
    minVal--;
  }
  return minVal;
}

//set new carousel position in cookie
function setPosition()
{
  position = getFirstVisibleItemId(inNum, outNum)
  if(position &gt;= 0 ){
    value = position+1;
    setCookie(COOKIE_NAME, value, 1);
  }
}

//retrieves carousel position from cookie
function getPosition()
{
  startVal = 1;
  var cookieVal = getCookie(COOKIE_NAME);
  if(cookieVal != ""){
    startVal = parseInt(cookieVal);
  }else{
    delCookie(COOKIE_NAME);
  }
  return startVal;
}

jQuery(document).ready(function() {
  startPosition = getPosition();
  jQuery('#mycarousel').jcarousel({
    scroll: 1,
    animation: 500,
    start: startPosition,
    itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback},
    itemVisibleInCallback: {onAfterAnimation: mycarousel_itemVisibleInCallback}
  });

});</pre>
<p>First of all i declare three vars. The last of the three ( <strong>COOKIE_NAME</strong> ) is the name to assign to your cookie. Next there are three functions to manage cookies using jQuery Cookie plugin: <strong>getCookie</strong>, <strong>setCookie</strong> and <strong>delCookie</strong>.</p>
<p>Next there are <strong>mycarousel_itemVisibleInCallback </strong>and <strong>mycarousel_itemVisibleOutCallback</strong>. These functions simply retrieve the position of the carousel&#8217;s edges and store them in two global vars <strong>inNum</strong> and <strong>outNum</strong> previously declared.</p>
<p>mycarousel_itemVisibleOutCallback function also calls <strong>setPosition</strong> function that stores the correct carousel start value inside the specified cookie.</p>
<p>At the end there is <strong>getPosition</strong> function, that retrieves the starting position value from the cookie. This value is assigned to <strong>start</strong> parameter inside jcarousel initialization.</p>
<p>You can see an <a title="Look at my example" href="http://blog.devonlinux.net/wp-content/uploads/examples/jcarousel/">example here</a> (i have edited an example of jCarousel website) or <a href="http://blog.devonlinux.net/wp-content/uploads/2009/10/jcarousel_with_cookie.zip">download it</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devonlinux.net/2009/10/10/remember-jcarousel-position/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Mirror Thunderbird calendars to Evolution Data Server</title>
		<link>http://blog.devonlinux.net/2009/04/16/mirror-thunderbird-calendars-to-evolution-data-server/</link>
		<comments>http://blog.devonlinux.net/2009/04/16/mirror-thunderbird-calendars-to-evolution-data-server/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 08:33:42 +0000</pubDate>
		<dc:creator>ed0t</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[evolution]]></category>
		<category><![CDATA[evolution mirror]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[syncit]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://blog.devonlinux.net/?p=83</guid>
		<description><![CDATA[I have recently discovered Evolution Mirror, an interesting Thunderbird add-on that aims to mirror Thunderbird calendars to Evolution Data Server. This lets me to manage my calendars with Thunderbird as usual and to see my events in the Gnome Clock applet. It is still in development but it is a great intitiative of Teester because [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently discovered <a title="Go to Evolution Mirror add-on" href="https://addons.mozilla.org/en-US/thunderbird/addon/9656">Evolution Mirror</a>, an interesting Thunderbird add-on that aims to mirror Thunderbird calendars to Evolution Data Server. This lets me to manage my calendars with Thunderbird as usual and to see my events in the Gnome Clock applet.</p>
<p><img class="alignright size-full wp-image-89" title="gnomeclock" src="http://blog.devonlinux.net/wp-content/uploads/2009/04/gnomeclock.jpg" alt="gnomeclock" width="200" height="195" align="right" />It is still in development but it is a great intitiative of <a title="Go to user page" href="https://addons.mozilla.org/en-US/thunderbird/user/36228">Teester</a> because it&#8217;s a good way to integrate Thunderbird with Gnome.</p>
<p>The plugin is written in Python, and <strong>it needs the python-evolution binding</strong>. Now i will explain you how to install it. I am using Ubuntu 8.10 Intrepid Ibex 64 bit version.</p>
<p>Obviously you need on your system Thunderbird and its calendar extension: <a title="Go to Lightning add-on page" href="https://addons.mozilla.org/en-US/thunderbird/addon/2313">Lightning</a>.</p>
<p>Open <em>Synaptic</em> and install these packages and their dependencies:</p>
<pre>python2.5-dev, python-gtk2-dev, libecal1.2-dev,
libgdk-pixbuf-dev, libebook1.2-dev</pre>
<p>or using a terminal:</p>
<pre>sudo apt-get install python2.5-dev python-gtk2-dev libecal1.2-dev \
libgdk-pixbuf-dev libebook1.2-dev</pre>
<p>Download the evolution-python binding from <a title="Go to evolution-python page" href="http://www.conduit-project.org/wiki/evolution-python">Conduit site</a>.</p>
<p>Open a terminal and digit:</p>
<pre>tar zxvf evolution-python-0.0.4
cd evolution-python-0.0.4
./configure
make
sudo make install</pre>
<p>Well done, now evolution-python bindings are installed. Now <a title="Download Evolution Mirror" href="https://addons.mozilla.org/en-US/thunderbird/addon/9656">download Evolution Mirror</a> add-on and add it to your Thunderbird Add-ons.</p>
<p>Open Evolution, create an account. You have to do this because it creates some basic data such as the <em>Personal</em> calendar.</p>
<p>Now open your Thunderbird and start add Tasks or Events and you&#8217;ll see them on the Gnome Clock applet.</p>
<p>As i have already said, the plugin is still in development, for now it does not add events and tasks that has been already inserted before. It also merge all calendars&#8217; data in one unique Evolution calendar. These are some missing but i think and hope that they will be fixed soon.</p>
<p>Anyway is a great work! I hope to have time to help the developer in this add-on, also because it will be very useful with my still-in-development tool called <a title="Go to SyncIt Trac page" href="http://syncit.ed0t.devonlinux.net/">SyncIt</a>. Take a look on my Trac to know something about it even if it is not updated and poorly documented.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devonlinux.net/2009/04/16/mirror-thunderbird-calendars-to-evolution-data-server/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Use Eclipse with Mylyn and Trac via TracXMLRPC</title>
		<link>http://blog.devonlinux.net/2009/04/14/use-eclipse-with-mylyn-and-trac-via-tracxmlrpc/</link>
		<comments>http://blog.devonlinux.net/2009/04/14/use-eclipse-with-mylyn-and-trac-via-tracxmlrpc/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 14:09:04 +0000</pubDate>
		<dc:creator>ed0t</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[bug tracking]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[mylyn]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://blog.devonlinux.net/?p=47</guid>
		<description><![CDATA[Today i&#8217;ve decided to add to my Eclipse IDE the Mylyn plugin, an add-on that lets manage bugs and planning of a project inside the IDE itself. Mylyn can be used with a lot of bug tracking tools and since i use Trac i&#8217;ve decided to link them together inside Eclipse. I assume you have [...]]]></description>
			<content:encoded><![CDATA[<p>Today i&#8217;ve decided to add to my Eclipse IDE the <a title="Go to Mylyn plugin offical site" href="http://www.eclipse.org/mylyn/">Mylyn plugin</a>, an add-on that lets manage bugs and planning of a project inside the IDE itself. Mylyn can be used with a lot of bug tracking tools and since i use Trac i&#8217;ve decided to link them together inside Eclipse.</p>
<p>I assume you have <a title="Read how to install Trac on Dreamhost" href="http://blog.devonlinux.net/2008/04/21/install-trac-on-dreamhost/">installed Trac on your local server, or on your Dreamhost account</a>. To enable communication between Trac and Mylyn we have to install and enable the XmlRpcPlugin that you can download from <a title="Go to Trac-hacks plugin" href="http://trac-hacks.org/wiki/XmlRpcPlugin">trac-hacks</a>.</p>
<p>After the download, copy your plugin on the system where Trac is installed. Uncompress the archive and go to the <em>0.10</em> folder if you have Trac 0.10 or <em>trunk</em> folder otherwise.</p>
<p>Now digit these commands:</p>
<pre>chmod 755 -R *
python setup.py bdist_egg</pre>
<p>Wait until the Python egg is created and then copy it into the <em>plugins</em> directory of your Trac environment. The egg file is in the <em>dist</em> directory created during the egg building.</p>
<p>Now go into your Admin account of your Trac web interface and go to Plugins page. You&#8217;ll see a TracXMLRPC 0.1 field. Clicking on it you&#8217;ll see some component. You have to enable these components as shown in the next figure.</p>
<p><img class="aligncenter size-full wp-image-64" title="Trac XMLRPC plugin components" src="http://blog.devonlinux.net/wp-content/uploads/2009/04/trac.jpg" alt="Trac XMLRPC plugin components" width="500" height="429" align="center" /></p>
<p>Well we&#8217;ve almost done. Now we have to install Mylyn and Mylyn extras into Eclipse.</p>
<p>Start Eclipse and click on <em>Help</em> -&gt; <em>Software Updates</em>. Click on the <em>Availabe Software</em> tab. Click on <em>Add Site</em> button and paste these two &#8220;repository&#8221;:</p>
<pre>http://download.eclipse.org/tools/mylyn/update/e3.4

http://download.eclipse.org/tools/mylyn/update/extras</pre>
<p>Now select to install these features:</p>
<p><img class="aligncenter size-full wp-image-73" title="Mylyn Plugin" src="http://blog.devonlinux.net/wp-content/uploads/2009/04/mylyn.jpg" alt="Mylyn Plugin" width="411" height="414" align="center" /></p>
<p>Wait until Eclipse asks you to restart to update changes and then you&#8217;ll be able to use Mylyn with your Trac environment.</p>
<p><a class="external free" title="http://download.eclipse.org/tools/mylyn/update/extras" rel="nofollow" href="http://download.eclipse.org/tools/mylyn/update/extras"><br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devonlinux.net/2009/04/14/use-eclipse-with-mylyn-and-trac-via-tracxmlrpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install Oracle 10.2.0 x64 on Centos 5.2 AMD64</title>
		<link>http://blog.devonlinux.net/2008/10/28/install-oracle-1020-x64-on-centos-52-amd64/</link>
		<comments>http://blog.devonlinux.net/2008/10/28/install-oracle-1020-x64-on-centos-52-amd64/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 22:09:35 +0000</pubDate>
		<dc:creator>ed0t</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://blog.devonlinux.net/2008/10/28/install-oracle-1020-x64-on-centos-52-amd64/</guid>
		<description><![CDATA[In the past few days i&#8217;ve spent my time at work setting up a Linux server with Oracle database. Since i have had some problems i have decided to write how to install it without any trouble. In our company we have bought two Dell servers QuadCore with 4Gb of Ram and 2Tb of hard [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><img src="http://blog.devonlinux.net/wp-content/uploads/2008/10/oracleandcentos.jpg" alt="Oracle and Centos" style="border: 0px none " align="right" />In the past few days i&#8217;ve spent my time at work setting up a Linux server with Oracle database. Since i have had some problems i have decided to write how to install it without any trouble.</p>
<p>In our company we have bought two Dell servers QuadCore with 4Gb of Ram and 2Tb of hard disk. We have decided to use one of them as a powerful machine to execute some automatic tests on a complex project that requires a lot of computation.</p>
<p>Since the project uses Oracle database, Oracle Warehouse Builder and Oracle Data Integrator, available for Linux and Windows both, i have decided to setup a Linux machine instead of a Windows one to get the more benefits i could.</p>
<p>I admit, i like Ubuntu too much, so my first try has been an Ubuntu Server 8.04 installation, but i&#8217;ve had lots of problem during the installation of the database.</p>
<p>So i&#8217;ve decided to switch to a more supported Linux version and the solution has been Centos 5.2 AMD64.<span id="more-18"></span></p>
<p>I will not explain how to install Centos neither  Java, there are already a lot of complete tutorial.</p>
<p>Attention, i assume you are root, otherwise use sudo before each command. When some operations must be executed by another user it will be written.</p>
<p>First of all you have to edit a file to let Centos appear like a RedHat system. To do this edit the file <strong>/etc/redhat-release</strong>, delete the only line inside the file and write: <strong>redhat-4</strong>.</p>
<pre>vim /etc/redhat-release</pre>
<p>Then add the following lines to the file <strong>/etc/security/limits.conf</strong> :</p>
<pre>
*               soft      nproc    2047
*               hard      nproc    16384
*               soft      nofile   1024
*               hard      nofile   65536</pre>
<p>and add the following line (if it is not already there) to the file : <strong>/etc/pam.d/login</strong>:</p>
<pre>session    required     /lib/security/pam_limits.so</pre>
<p>Now it&#8217;s time to install some packages needed for the installation. So using the Add/Remove Application Tool or simply the <strong>yum</strong> command install the following packages:</p>
<pre>setarch-2.0-1.1x86_64
make-3.81-3.el5.x86_64
glibc-2.5-24.x86_64
glibc-devel-2.5-24.x86_64
glibc-headers-2.5-24.x86_64
glibc-2.5-24.i686
glibc-devel-2.5-24.i386
libaio-0.3.105-3.2.i386
libaio-0.3.105-3.2.x86_64
compat-db-4.2.52-5.1.i386
compat-db-4.2.52-5.1.x86_64
compat-libstdc++-33-3.2.3-61.i386
compat-libstdc++-33-3.2.3-61.x86_64
compat-gcc-34-3.4.6-4.x86_64
compat-gcc-34-c++-3.4.6-4.x86_64
gcc-4.1.2-42.el5.x86_64
gcc-c++-4.1.2-42.el5.x86_64
libXp-1.0.0-8.1.el5.x86_64
libXp-1.0.0-8.1.el5.i386
openmotif-2.3.0-0.5.el5.i386
openmotif-2.3.0-0.5.el5.x86_64
libstdc++-4.1.2-42.el5.x86_64
libstdc++-devel-4.1.2-42.el5.x86_64
libstdc++-4.1.2-42.el5.i386
kernel-headers-2.6.18-92.1.6.el5.x86_64
gtk+-1.2.10-56.el5.x86_64
libpng-1.2.10-7.1.el5_0.1-x86_64
gdk-pixbuf-0.22.0-25.el5.x86_64
giflib-4.1.3-7.1.el5.1.x86_64</pre>
<p>Now it&#8217;s time to add some configuration lines in <strong>/etc/sysctl.conf</strong> file:</p>
<pre>kernel.shmmni = 4096
#semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144</pre>
<p>Then reload all parameters using this command:</p>
<pre>/sbin/sysctl -p</pre>
<p>Now we have to create some groups and a user, the owner of the Oracle database:</p>
<pre>groupadd oinstallgroupadd dba
groupadd oper
useradd -g oinstall -G dba oracle
passwd oracle
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01
mkdir -p /u02/oradata
chown -R oracle.oinstall /u02</pre>
<p>Well, now we have to add some environment variables for the user just created: oracle.</p>
<pre>su - oracle
vim ~/.bashrc</pre>
<p>And add the following lines:</p>
<pre>ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH; export PATH
export DISPLAY=:0.0
JAVA_HOME=/opt/jdk1.6.0_10/; export JAVA_HOME</pre>
<p>We are almost at the end. Extract the archive, if you have not already do this:</p>
<pre>gunzip 10201_database_linux_x86_64.cpio.gzip
cpio -idmv &lt; 10201_database_linux_x86_64.cpio</pre>
<p>Now turn back to root user to execute this last command:</p>
<pre>su - root
xhost +</pre>
<p>At the end switch to oracle user and run the installer:</p>
<pre>su - oracle
cd pathToYourOracleInstallationDirectory
./runInstaller</pre>
<p>Follow instructions provided with the GUI installer and enjoy Oracle 10.2.0 x64 on your Centos 5.2 AMD64!</p>
<p>To perform a correct installation i have followed these amazing guides:</p>
<p><a href="http://bderzhavets.blogspot.com/2007/04/installing-oracle-10.html" title="Read this tutorial">http://bderzhavets.blogspot.com/2007/04/installing-oracle-10.html</a></p>
<p><a href="http://www.puschitz.com/InstallingOracle10g.shtml" title="Read this tutorial">http://www.puschitz.com/InstallingOracle10g.shtml</a></p>
<p>For the second one especially the section titled : <strong>10g R2 on RHEL AS 4 (x86_64)</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devonlinux.net/2008/10/28/install-oracle-1020-x64-on-centos-52-amd64/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Install Trac on DreamHost</title>
		<link>http://blog.devonlinux.net/2008/04/21/install-trac-on-dreamhost/</link>
		<comments>http://blog.devonlinux.net/2008/04/21/install-trac-on-dreamhost/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 21:36:10 +0000</pubDate>
		<dc:creator>ed0t</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[clearsilver]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[pysqlite]]></category>
		<category><![CDATA[sqlite]]></category>
		<category><![CDATA[swig]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[virtual-python]]></category>

		<guid isPermaLink="false">http://blog.devonlinux.net/2008/04/21/install-trac-on-dreamhost/</guid>
		<description><![CDATA[Since we wanted to install Trac on our DreamHost domain we have followed the Natmaster tutorial. Anyway we came in trouble so here we describe how we have installed Trac. The proceeding is quite similar to Natmaster one, but we found some missing pieces that we describe below. Here is the list of programs that [...]]]></description>
			<content:encoded><![CDATA[<p>Since we wanted to install Trac on our DreamHost domain we have followed the <a href="http://natmaster.com/articles/installing_trac_0.10.php" title="Read the Natmaster howto">Natmaster tutorial</a>. Anyway we came in trouble so here we describe how we have installed Trac. The proceeding is quite similar to Natmaster one, but we found some missing pieces that we describe below.</p>
<p>Here is the list of programs that we have installed:</p>
<ul>
<li>virtual-python</li>
<li>Trac 0.10.4</li>
<li>Clearsilver 0.10.3</li>
<li>SQLite 3.5.2</li>
<li>PySqlite 2.3.5</li>
<li>Swig 1.3.31</li>
</ul>
<p>If you have already tried to install Trac remove all installed programs in your directory (ex: <strong>packages</strong>) and remove the other files created (ex: <strong>.pydistutils.cfg</strong>) or paths setted in <strong>.bash_profile</strong> or <strong>.bash_rc</strong>.</p>
<p>Let&#8217;s start with a new installation!<span id="more-3"></span></p>
<p>First of all we have to create in our Home folder three directories</p>
<ul>
<li>packages: the directory where we will install all programs</li>
<li>install_files: the directory in which we put downloaded tarballs</li>
<li>trac_sites:  the directory where we put all Trac environments</li>
</ul>
<p>so:</p>
<pre>
mkdir packages
mkdir install_files
mkdir trac_sites</pre>
<h3>Install Virtual-Python</h3>
<blockquote><p>If you are on a Linux, BSD, Cygwin, or other similar Unix-like operating system, but don&#8217;t have root access, you can create your own &#8220;virtual&#8221; Python installation, which uses its own library directories and some symlinks to the site-wide Python.</p></blockquote>
<ul>
<li>cd ~/install_files</li>
<li>wget http://peak.telecommunity.com/dist/virtual-python.py</li>
<li>python virtualpython.py &#8211;prefix=$HOME/packages</li>
</ul>
<h3>Install Trac</h3>
<ul>
<li>cd ~/install_files</li>
<li>wget http://ftp.edgewall.com/pub/trac/trac-0.10.4.tar.gz</li>
<li>tar zxvf trac-0.10.4.tar.gz</li>
<li>cd trac-0.10.4</li>
<li>python setup.py install &#8211;prefix=$HOME/packages</li>
</ul>
<h3>Install ClearSilver</h3>
<ul>
<li> cd ~/install_files</li>
<li> wget http://www.clearsilver.net/downloads/clearsilver-0.10.3.tar.gz</li>
<li>tar zxvf clearsilver-0.10.3.tar.gz</li>
<li>cd clearsilver-0.10.3</li>
<li> PYTHON_SITE=`~/packages/bin/python -c \<br />
&#8220;import sys; print [path for path in sys.path if path.find('site-packages') != -1][0]&#8220;` ./configure &#8211;with-python=~/packages/bin/python &#8211;prefix=$HOME/packages &#8211;disable-ruby &#8211;disable-java &#8211;disable-apache &#8211;disable-csharp &#8211;disable-perl</li>
<li>make</li>
<li>make install</li>
</ul>
<h3>Install SQLite</h3>
<ul>
<li> cd ~/install_files</li>
<li> wget http://www.sqlite.org/sqlite-3.5.2.tar.gz</li>
<li>tar zxvf sqlite-3.5.2.tar.gz</li>
<li>cd sqlite-3.5.2</li>
<li> ./configure &#8211;prefix=$HOME/packages</li>
<li>make</li>
<li>make install</li>
<li>ln -s $HOME/packages/bin/sqlite3 $HOME/packages/bin/sqlite</li>
</ul>
<h3>Install PySQLite</h3>
<ul>
<li>unlink $HOME/packages/lib/python2.3/site-packages/pysqlite2</li>
<li> cd ~/install_files</li>
<li> wget http://initd.org/pub/software/pysqlite/releases/2.3/2.3.5/pysqlite-2.3.5.tar.gz</li>
<li>tar zxvf pysqlite-2.3.5.tar.gz</li>
<li>cd pysqlite-2.3.5</li>
<li> python setup.py install &#8211;prefix=$HOME/packages</li>
</ul>
<p>The first command is an unlink. This is needed because  pysqlite is already installed on DreamHost. But with the default pysqlite the trac-admin command fails.</p>
<h3>Install SWIG</h3>
<ul>
<li> cd ~/install_files</li>
<li>wget http://dl.sourceforge.net/sourceforge/swig/swig-1.3.31.tar.gz</li>
<li>tar zxvf swig-1.3.31.tar.gz</li>
<li>cd swig-1.3.31</li>
<li> ./configure &#8211;prefix=$HOME/packages/ &#8211;with-python=/$HOME/packages/bin/python</li>
<li>make</li>
<li>make install</li>
</ul>
<p>Now we have to create a new Trac environment, but before we have to edit the .bash_profile and add this rows:</p>
<pre>
export PYTHONPATH="$HOME/packages/lib/python2.3/site-packages"
export LD_LIBRARY_PATH="$HOME/packages/lib"
export PATH="$HOME/packages/bin:$PATH"</pre>
<p>then reload the .bash_profile:</p>
<pre>source .bash_profile</pre>
<p>To create a Trac environment use this command:</p>
<pre>trac-admin $HOME/trac_sites/PROJECTNAME initenv</pre>
<p>as you can see trac_sites folder is the third directory that we have created above. Here we store all projects.  The trac-admin command asks you some questions and we it is ended a new Trac environment is set up!</p>
<p>Now follow the Natmaster tutorial beginning at <a href="http://natmaster.com/articles/installing_trac_0.10.php" title="Read the rest of the tutorial">&#8220;Make Trac Web Accessible&#8221;</a> section.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.devonlinux.net/2008/04/21/install-trac-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.553 seconds -->
