Edgewall Software

Version 2 (modified by icebrian, 16 years ago) ( diff )

Wont go into much detail's but here is my documented steps to install Trac 11RC1 on Slackware 12.1.

This "guide" is for trac 11rc1 with MySQL, Subversion (with swith) and mod_python apache module <br><br> If you are currently using the supplied subversion package or a compiled package with no SWIG support then follow the following steps:

  • remove installed subversion
  • compile and install swig from slackbuilds
  • get subversion build scripts and source from source cd
  • edit build script and include —with-swig
  • recompile subversion & install new subversion package
  • in subversion source directory (probably in /tmp) do: make swig-py; make install-swig-py
export PYTHONPATH=$PYTHONPATH:/usr/lib/svn-python

Once subversion has been recompiled trac installion can proceed:

  • install ez_setup
python ez_setup.py
  • install Genshi
easy_install Genshi
  • install Trac
easy_install Trac==0.11rc1
  • compile and install pysetuptools from slackbuilds
  • compile and install mysql-python from slackbuilds
  • set-up database
mysql -u root -p
create database trac DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; 
USE trac;
CREATE USER tracuser IDENTIFIED BY 'password';
GRANT ALL ON trac.* TO tracuser;

For above example connection string will be: mysql://tracuser:password@localhost/trac

  • compile and install mod_python from slackbuilds
  • configure apache to test Python installation add (location only for tests)
LoadModule python_module lib/httpd/modules/mod_python.so to httpd.conf
<Location /mpinfo>
   SetHandler mod_python
   PythonInterpreter main_interpreter
   PythonHandler mod_python.testhandler
</Location>
  • stop and start apache (do not restart)
  • point browser to /mpinfo (you should see info if so location can now be removed)
  • create project
trac-admin /path/to/myproject initenv
  • add to httpd.conf virtualhost config (or any other setup you would like)
<VirtualHost *:999>
   DocumentRoot /path/to/myproject
   <Directory "/path/to/myproject">
     Allow from all
   </Directory>
   <Location />
     SetHandler mod_python
     PythonHandler trac.web.modpython_frontend
     PythonOption TracEnvParentDir /dir/to/trac
     PythonOption TracUriRoot /
   </Location>
# used for authentication (refer to manual)
#   <LocationMatch "/[^/]+/login">
#     AuthType Basic
#     AuthName "Trac"
#     AuthUserFile /path/to/myproject/.htpasswd
#     Require valid-user
#   </LocationMatch>
</VirtualHost>
  • stop and start apache
  • point to virtualhost and all should be working
Note: See TracWiki for help on using the wiki.