The Complete, Working Trac Install instructions for OS X

So you want to install Trac, the rad Wiki / Ticket system / Subversion front-end / Juicer, but server administration crap really isn’t your thing? Daunted by the disgustingly long list of instructions sprayed across 20 different websites? Never fear, I’ll hold your hand. This will only hurt a little…
download SWIG (simplified wrapper and interface generator — binds c/c++ code to scripting languages) from swig.org
compile and install swig: ./configure; make; sudo make install
verify that it worked: swig -version (should print SWIG Version 1.3.31 or something similar)
download Subversion (svn) from subversion.tigris.org
configure svn: (i.e. run ./configure), verifying that the svn ./configure script finds both swig & python (you should see “checking swig version… 1.3.31” and “configure: Configuring python swig binding” near the end of ./configure’s output)
compile and install svn: make; sudo make install (this takes awhile)
verify that svn installed: svn –version (should print something like “svn, version 1.4.2 (r22196)…” etc)
compile and install the svn swig bindings:
make swig-py; sudo make install-swig-py (inside the subversion source)
tell python where to find the svn bindings you just installed:
echo /usr/local/lib/svn-python (greater than sign) /opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/…
…python2.4/site-packages/subversion.pth (do that as root)
verify that python can see the bindings (and therefore talk to svn):
python -c “from svn import client” (should give no errors)
create a new svn repository:
svnadmin create /var/svn (or use an existing one if you have one)
install Darwin Ports from darwinports.opendarwin.org
install ClearSilver (templating language):
sudo port install clearsilver
install SQlite database:
sudo port install sqlite2
install the python bindings for SQlite:
sudo port install pysqlitewhateverthefuckitscalled
dowload trac from trac.edgewall.org/wiki/TracDownload and install it:
sudo python ./setup.py install
symlink (i.e. ln -s) the just-installed trac folder (/opt/local/Library/Frameworks/Python.framework/Versions/2.4/share/trac) to /usr/share/trac
add the trac binaries’ directory to your $PATH variable in your ~/.bashrc so your shell can find the trac commands:
PATH=$PATH:/opt/local/Library/Frameworks…
…/Python.framework/Versions/2.4/bin
create a trac root directory (mkdir /var/trac) to house your trac projects and make it read-/writeable according to your security policy (which for me means chmod a+rwx /var/trac)
make a folder to house your first trac project:
mkdir /var/trac/funk
init your project:
trac-admin /var/trac/funk initenv
test trac in standalone mode:
tracd –port 8000 /var/trac/funk (you should see your trac web interface)
{fix any permissions crap}
edit your apache config file (/etc/httpd/httpd.conf) and enable mod_Env by uncommenting the mod_env-related lines
add the configs listed in trac.edgewall.org/wiki/TracCgi to your apache config file (including the static htdocs alias)
test your configs: sudo apachectl configtest
(re-) start your apache server: sudo apachectl graceful
download FastCGI from fastcgi.com
compile FastCGI as an apache DSO (dynamic shared object, aka module):
apxs -o mod_fastcgi.so -c *.c
install FastCGI module to apache’s modules directory:
apxs -i -a -n fastcgi mod_fastcgi.so
enable mod_fastcgi in your apache config file:
add LoadModule fastcgi_module modules/mod_fastcgi.so to the end of the LoadModule stanza
add AddModule mod_fastcgi.c to the end of the AddModules stanza
add the configs from trac.edgewall.org/wiki/TracFastCgi to your apache config
test the configs and restart apache
reload reload reload — you should now have a working Trac with SVN running on the robust FastCGI platform.

Do some whippets and send some tickets — you’re done!