Best Interoperability Innovation: Moodle Simple Learning Tools for Interoperability Installing git into your Mac OS X Leopard
May 18

This post describes step by step how to install Trac using MacOS X Leopard’s Apache and mod_python.

trac logo

First of all, you must install mod_python. I have written a post in this blog explaning how. There are options like WSGI or FCGI modules, but I have chosen this one.

After this initial configuration, you must download and install Trac. You can do it by downloading this application from its home page but I’m going to choose the easiest way.

Mac OS X includes easy_install tool that lets us to automatically download, build, install python applications.

So typing in a Terminal app this line:

sudo easy_install trac

Trac will be downloaded and installed, and you will not have to worry about it.

Next step, create a directory to store your projects, for instance: trac-projects and allow write access to Apache user (www). So type:

mkdir /trac-projects
sudo chown www:www /trac-project

Last step is to configure Apache to execute Trac and setup your projects path.

You must edit /etc/apache2/httpd.conf file adding the following lines:

<Location /projects>

SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /trac-projects/

</Location>

Now, Trac is fully configured to work with Apache. You only need to create some instance of a project. Using a Terminal app and typing:

sudo -u www trac-admin /trac-projects/projectname initenv

a wizard will help you to configure your new project.

Once finished this, you will be able to access to http://localhost/projects and see the list of all your projects and start working in one of them.

This how-to is a resume of the oficial TracInstall Guide, so don’t forget to read it for extra information.

Related Posts

Leave a Reply