= Using MacPorts = Installation steps: 1. sudo port install apache2 1. sudo port install subversion +mod_dav_svn 1. sudo port install trac Optional: 1. 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. Also note that on Leopard with XCode 3.0 you might run into an error when you try to install mod_python25 using macports: {{{ nih$ sudo port install mod_python25 ---> Fetching mod_python25 ---> Verifying checksum(s) for mod_python25 ---> Extracting mod_python25 ---> Configuring mod_python25 ---> Building mod_python25 with target all Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_python25/work/mod_python-3.3.1" && make all " returned error 2 Command output: Compiling for DSO. /opt/local/apache2/bin/apxs -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_python25/work/mod_python-3.3.1/src/include -I/opt/local/apache2/include -I/opt/local/include/python2.5 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c -L/opt/local/lib -Wl,-F/opt/local/Library/Frameworks -L/opt/local/lib/python2.5/config -u _PyMac_Error -L/opt/local/lib -lm -lpython2.5 -ldl /opt/local/share/apr-1/build/libtool --silent --mode=compile /usr/bin/gcc-4.0 -prefer-pic -O2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/opt/local/include -I/opt/local/apache2/include -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -I/opt/local/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_mod_python25/work/mod_python-3.3.1/src/include -I/opt/local/apache2/include -I/opt/local/include/python2.5 -c -o mod_python.lo mod_python.c && touch mod_python.slo libtool: compile: unable to infer tagged configuration libtool: compile: specify a tag with `--tag' apxs:Error: Command failed with rc=65536 . make[1]: *** [mod_python.so] Error 1 make: *** [do_dso] Error 2 Error: Status 1 encountered during processing. }}} The fix (from [http://boorad.weebly.com/1/post/2008/01/wrastling-macports-mod_python25.html here]) seems to be to edit /opt/local/apache2/bin/apxs and change (near line 50): {{{ $ltflags or $ltflags = "--silent"; }}} to {{{ $ltflags or $ltflags = "--silent --tag=CC"; }}} Then re-run {{{ sudo port install 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 {{{ # # 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..com DocumentRoot "/Projects/Trac" # # don't forget to give httpd permission to read your trac docs and your trac root! # Order allow,deny Allow from all Order allow,deny Allow from all # # 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/" # 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" # # trac authenticates with URLs of the form .../login, # so we must match appropriately according to our TracUriRoot above # # 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 " Trac" AuthUserFile "/opt/local/etc/trac-auth-file" Require valid-user }}} == 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: 1. sudo port uninstall trac 1. sudo port uninstall subversion-python25bindings 1. sudo port install subversion-python25bindings +no_bdb 1. sudo port install trac