First I installed some packages (not all are required):
apt-get install python-setuptools python-setuptools-git python-genshi python-pygresql subversion subversion-tools git python-babel postfix bsd-mailx
Then I downloaded trac from svn and installed it:
svn co http://svn.edgewall.org/repos/trac/tags/trac-1.1.3 trac_svn cd trac_svn python setup.py install
Just choose a name for your project and for small projects a local sqlite-db is fine. After this you can go on create a trac environment that can be hosted.