This how to is meant for newbies to explain basically how to install trac, first a few notes on trac
Trac is not just a bunch of files you place in a folder under your /var/www/ tree and poof it works
- IMO Trac is a very good way to callaborate on a project
- It has svn viewer (just a viewer)
- It has a wiki
- Ticketing system
- Road Map
- Trac will not make svn accessible, you will need another way to be able to access (checkout, commit, etc...) svn
Now let's do it, there are two ways to do it, both are easy (depends on your taste)
- install from distro packages
- install from sources
Install from distro package
debian/ubuntu: $apt-get install trac
Fedora/Centos/RH: $yum install trac
Install from sources
you have several dependencies to install
- python (of course)
- subversion
- setuptools (some python libs)
- database server (sqlite, mysql, postgres), i used mysql and then you need python-mysqldb libs
- apache, mod_python
- ClearSilver
now after getting all those, download trac, untar it and then
$python ./setup.py install
and poof! it is installed, but hey wait don't party yet...
Configure Trac
create a database and user with access to it
$mysql
mysql> create database tracdb;
mysql> grant all on tracdb.* to "user"@"localhost" identified by "password";mysql> flush privileges;mysql> exit
now you need to know where you will have your trac project?
>$trac-admin /path/to/myproject initenv
that will ask you some questions about your svn repo and database, you will enter the db connection string as follows
mysql://user:password@localhost/tracdb
you can ignore the svn repo location for now
and now to configure apache
<VirtualHost * >
DocumentRoot /var/www/myproject
ServerName trac.mycompany.com
<Location />
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/trac/myproject
PythonOption TracUriRoot /
</Location>
<Location /login>
AuthType Basic
AuthName "MyCompany Trac Server"
AuthUserFile /var/trac/myproject/.htpasswd
Require valid-user
</Location>
</VirtualHost>
Recent comments
6 weeks 2 days ago
29 weeks 2 days ago