|Version 3 (modified by 15 years ago) ( diff ),|
- sudo port install apache2
- sudo port install subversion +mod_dav_svn
- sudo port install trac
- sudo port install mod_python25
Note that you must ensure that you have installed the right version of mod_python for the python version upon which trac depends. As of late August, 2007 this is python25, and thus you have to use mod_python25.
After installing mod_python you may need to add
LoadModule python_module modules/mod_python.so to your httpd.conf file.
Here is the trac configuration from my httpd.conf
<VirtualHost *> # # recall that ServerName has to be a read DNS name and # match your VirtualHost spec (esp. if you are running on a special port) # ServerName projects.<domain>.com DocumentRoot "/Projects/Trac" # # don't forget to give httpd permission to read your trac docs and your trac root! # <Directory "/opt/local/share/trac/htdocs/"> Order allow,deny Allow from all </Directory> <Directory "/Projects/Trac"> Order allow,deny Allow from all </Directory> # # trac mod_python configuration # # we must first indicate where the doc supplementary # files are so that trac's internal documentation works # Alias /trachtdocs/ "/opt/local/share/trac/htdocs/" <Location /trac> # then we indicate that, for this location, mod_python is in use SetHandler mod_python PythonInterpreter main_interpreter # next, we indicate where the "main()" is for mod_python PythonHandler trac.web.modpython_frontend # and now we configure trac via a few mod_python env variables. PythonOption TracUriRoot "/trac" PythonOption TracEnvParentDir "/Projects/Trac" </Location> # # trac authenticates with URLs of the form .../login, # so we must match appropriately according to our TracUriRoot above # <LocationMatch /trac/[[:alnum:]]+/login> # for this example, only basic file-based authentication is demonstrated, # but don't forget that many rich forms of authentication are available # including LDAP, DBM, groupfile, etc. AuthType Basic AuthName "<domain's> Trac" AuthUserFile "/opt/local/etc/trac-auth-file" Require valid-user </LocationMatch> </VirtualHost>
If you installed Subversion without Berkeley DB support
If you installed Subversion without Berkeley DB support and the rest as above you get an Trac error:
TracError: Unsupported version control system "svn". Check that the Python bindings for "svn" are correctly installed.
The reason is that the Subversion python bindings have been installed with the Berkeley DB support.
Either start again and follow the above instructions exactly or fix as follows:
- sudo port uninstall trac
- sudo port uninstall subversion-python25bindings
- sudo port install subversion-python25bindings +no_bdb
- sudo port install trac