Installing Trac on Debian etch

The following is a no-frills install guide for getting Trac up and running on a Debian ‘etch’ Linux system.

The assumption is that you’ve already got mysql and subversion working and have created a subversion repository (tip: apt-get install mysql-server subversion).

The first thing that we need to do is install Python, easy_install and the mysql & python bindings:
apt-get install python python-setuptools python-mysqldb python-subversion

To install trac via the easy_install command I suggest that you see what is the newest version of trac:
svn list http://svn.edgewall.com/repos/trac/tags

I then picked the newest tag and then installed:
easy_install http://svn.edgewall.com/repos/trac/tags/trac-0.11b1

I want to use the – note: experimental – MySQL support so I create a mysql db and create a trac user:

mysql> create database trac;
mysql> grant all on trac.* to trac@localhost identified by 'password';

To test it is all working I create our first project:

trac-admin /export/trac/MY_PROJECT initenv

A number of self explanitory questions are asked, here are selected answers:

Database connection string [sqlite:db/trac.db]> mysql://trac:password@localhost:3306/trac
Path to repository [/path/to/repos]> /export/svn/MY_SVN_REPOSITORY

Finally, test it is working:
tracd --port 8000 /export/trac/MY_PROJECT

Visiting http://server:8000/MY_PROJECT gives me the standard trac web interface and I can browse the SVN repository. There, that wasn’t too bad was it? We do still need to get it all sensibly configured so once I’ve done that I’ll post another article.

Related:
http://trac.edgewall.org/wiki/TracInstall


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *