Trac and Agilo on Windows Server for Agile project management

Trac AgiloWe are going to start using Agile development for some of our new projects so I was asked to get an project management tool set up. I had used Trac in the past and heard of the Agile42 Agilo plugin for it. I had also used VersionOne professionally but that is a paid app. I eventually decided to give Trac + Agilo a go on our Windows Server 2003 virtual image server called “myserver”. Our project will be called “myproject”.

The main Trac install doc can be found at which I used a bit, but also deviated from as well.


The files that I required were:

Installation Steps

Our server has a C: drive for OS files, D: drive for installed apps, and E: drive for data and content. If you see these drive listings in the instructions then you now know our reasoning.

  1. Apache Install: run the httpd-2.2.19-win32-x86-openssl-0.9.8r.msi file to install Apache. Choose the default options except for the screens below:
    • Server Information
      • Administrator’s Email Address:
    • Setup Type
      • Custom: select
    • Cusom Setup
      • Change install location to: D:Apache2.2
  2. Apache Config: create the empty folder E:logs. Also create the file E:wwwindex.html with content
    <h1>It workz!</h1>

    Next, open up the D:Apache2.2confhttpd.conf and edit the following lines:

    • DocumentRoot
      DocumentRoot "E:/www"
    • Directory
      <Directory "E:/www">
    • DirectoryIndex
      DirectoryIndex index.html index.php
    • ErrorLog
      ErrorLog "E:/logs/error.log"
    • CustomLog
      CustomLog "E:/logs/access.log" common
    • Save the file and restart Apache. Test http://myserver to make sure that your “It workz!” message appears.
  3. MySQL Installation: run the mysql-5.5.12-win32.msi file to install MySQL. Choose the default options except for the screens below:
    • Choose Setup Type
      • Custom button
    • Custom Setup
      • MySQL Server: D:MySQL Server 5.5
      • Server data files: E:MySQL Server 5.5 Data
  4. MySQL Server Instance Configuration Wizard: This will auto open at the end of the installation but it can also be opened from the Start menu. Choose the default options except for the screens below:
    • Configuration type: Detailed Configuration
    • Server Type: Server Machine
    • Database Usage: Mulitfunctional Database
    • Drive: E:MySQL Datafiles
    • Concurrent connections: Decision Support (DSS)/OLAP
    • Networking options
      • Enable TCP/IP Networking: enabled
      • Port Number: 3306
      • Enable Strict Mode: enabled
    • Character Set: Best Support for Multilingualism (UTF8)
    • Windows Options
      • Install As Windows Service: enabled
      • Service Name: MySQL
      • Launch the MySQL Server automatically: enabled
      • Include Bin Directory in Windows PATH: enabled
    • Security
      • Modify Security Settings: enabled
      • New root password: <some password>
      • Enable root access from remote machines: enabled
    • Execute and finish.
  5. PHP Installation: run the php-5.3.6-Win32-VC9-x86.msi file to install PHP. Choose the default options except for the screens below:
    • Destination Folder: D:PHP
    • Web Server Setup: Apache 2.2.x Module
    • Apache Configuration Directory: D:Apache2.2conf
    • Finish the installation. Try to restart Apache to be sure that you have the correct PHP version for your install of Apache.
  6. phpMyAdmin Installation: Unzip the file to E:wwwphpMyAdmin and ensure that you can navigate to http://myserver/phpMyAdmin and login using your MySQL root user.
  7. Python Installation: run the python-2.7.1.msi file to install Python. Choose the default options except for the screens below:
    • Select Destination Directory: D:Python27
    • Finish the install.
  8. Python Configuration: open the Environment Variables for Windows and add a new System Variable as Variable name: PYTHON_HOME and Variable value: D:Python27. Edit the Path System Variable and add to the end of the Variable value: ....;%PYTHON_HOME%;%PYTHON_HOME%Scripts
  9. Python setuptools Installation: run the setuptools-0.6c11.win32-py2.7.exe file to install Python setuptools. It is a pretty straight forward install.
  10. Genshi Installation: run the Genshi-0.6.win32.exe file to install Python setuptools. It is a pretty straight forward install.
  11. mod_wsgi Module Installation: Copy the file to D:Apache2.2modules directory. Edit the D:Apache2.2confhttpd.conf file and add the following line at the bottom of the file:
    LoadModule wsgi_module modules/

    Restart Apache to make sure that the module loads successfully.

  12. MySQL-Python Installation: run the MySQL-python-1.2.3.win32-py2.7.exe file to install MySQL-Python. It is a pretty straight forward install.
  13. Prepare Trac database: from documentation at
    1. Go to phpMyAdmin (http://myserver/phpMyAdmin) and press the Databases tab. In the Create New Database section enter:
      • Name: trac
      • Collation: utf8_bin
    2. Select the new ‘trac’ database and then go into SQL tab. Run the statemtent
      SHOW VARIABLES WHERE variable_name IN ('character_set_database', 'collation_database');

      and ensure that the output looks like

      | Variable_name          | Value    |
      | character_set_database | utf8     |
      | collation_database     | utf8_bin |
      2 rows in set (0.01 sec)
    3. Select the Privileges tab and select Add a new User.
      • Name: tracadm
      • Password: <some pass>
      • Database for user: Grant all privileges on database “trac”
      • Press Go
    4. Your connection string for Trac will be “mysql://tracadm:<some pass>@localhost/trac” when prompted.
  14. Trac Installation:
    • For Trac 0.12.2, run the following commands from the command line:
      easy_install Babel==0.9.5
      easy_install Trac

      Ensure that these install successfully.

    • Create the folder E:/trac/myproject then create a new project (doc: by running the following from command line:
      trac-admin E:/trac/myproject initenv

      and input the parameters when asked for name and connection string:

      Creating a new Trac environment at E:tracmyproject
      Trac will first ask a few questions about your environment
      in order to initialize and prepare the project database.
       Please enter the name of your project.
       This name will be used in page titles and descriptions.
      Project Name [My Project]> myproject
       Please specify the connection string for the database to use.
       By default, a local SQLite database is created in the environment
       directory. It is also possible to use an already existing
       PostgreSQL database (check the Trac documentation for the exact
       connection string syntax).
      Database connection string [sqlite:db/trac.db]> mysql://tracadm:<some pass>@local
      Creating and Initializing Project
       Installing default wiki pages
      Project environment for 'myproject' created.
      You may now configure the environment by editing the file:
      If you'd like to take this new project environment for a test drive,
      try running the Trac standalone web server `tracd`:
        tracd --port 8000 E:tracmyproject
      Then point your browser to http://localhost:8000/myproject.
      There you can also browse the documentation for your installed
      version of Trac, including information on further setup (such as
      deploying Trac to a real web server).
      The latest documentation can also always be found on the project
    • Create a folder called E:traceggs which will store the egg cache. Also, create a file E:tractrac.wsgi (which is the WSGI mod so Apache can use Python, doc: ( with the following content:
      import os
      os.environ['TRAC_ENV_PARENT_DIR'] = 'E:/trac'
      os.environ['PYTHON_EGG_CACHE'] = 'E:/traceggs'
      import trac.web.main
      application = trac.web.main.dispatch_request

      we are using the TRAC_ENV_PARENT_DIR so that if there are more projects added they can be shown in the project index at http://myserver/trac.

    • Open the Apache config D:Apache2.2confhttpd.conf, go to the bottom of the file where the _+LoadModule wsgi_module …+- was added and below that add:
      <Directory E:/trac>
          WSGIApplicationGroup %{GLOBAL}
          Order deny,allow
          Allow from all

      this will force all calls to http://myserver/trac to look in E:trac. Restart Apache and ensure that there are no errors.

    • Try to go to http://myserver/trac, click on the Available Project: myproject, and you should see the skeleton of a Trac site!
  15. Authentication: Using the instruction found at we will start with Digest Authentication.
    • In a command window run:
      trac-admin E:tracmyproject permission add admin TRAC_ADMIN

      This will map the user ‘admin’ with the role of TRAC_ADMIN. However the user ‘admin’ needs to be created still.

    • Open the system Environment Variables and create a new System Variable with Variable name: APACHE_HOME and Variable value: D:Apache2.2. Next, edit the Path System variable and add the following the the END of the Variable value: ...;%APACHE_HOME%bin. Save all of these changes and open a NEW command window.
    • Create a new password file by running the command:
      htdigest -c E:/trac/trac.htpasswd trac admin
    • Open the Apache config again (D:/Apache2.2/conf/httpd.conf) and enable the auth_digest_module by un-commenting it:
      LoadModule auth_digest_module modules/

      and at the very bottom of the file add the following:

      <LocationMatch "/trac/[^/]+/login">
        AuthType Digest
        AuthName "trac"
        AuthDigestDomain /trac
        AuthUserFile E:/trac/trac.htpasswd
        Require valid-user
    • Restart Apache and ensure that there are no errors. Navigate to http://myserver/trac/myproject and select ‘login’. A popup will ask for credentials. Enter ‘admin’ and the password that was entered into the htdigest file from above. You should be logged in and see the new Admin tab that was not there before.
  16. Agile42 Installation: Note: The site instructions can be found at
    • Extract the agilo-0.9.3.tar.gz archive into E:tempagilo.
    • From command prompt run:
      E:tempagilo> python install

      this will compile and install Agilo to the Python sites.

    • Open the project trac.ini file that you want to Agilo enable. For our example, open E:tracmyprojectconftrac.ini and add the following to the end of the file:
      agilo.* = enabled
      # the following lines are only required to use Agilo Pro
      #agilo_common.* = enabled
      #agilo_pro.* = enabled

      save the file.

    • From the command prompt also run:
      trac-admin E:/trac/myproject upgrade
      trac-admin E:/trac/myproject wiki upgrade
    • Restart Apache then visit the http://myserver/trac/myproject again. The Trac project should now be Agilo enabled (with new skins).

Configuration Steps

Look and Feel

Edit the E:tracmyprojectconftrac.ini and set the following:

admin =
admin_trac_url = .
descr = Project management tool for the MyProject project.
footer = Visit the Trac open source project at<br /><a href=""></a>
icon = site/favicon.ico
name = myproject
url = http://myserver/trac/myproject

alt = MyProject Project
height = -1
link = /trac/myproject
src = site/logo.png
width = -1

The site/ content is actually found in E:tracmyprojecthtdocs and copy the favicon.ico from D:Python27Libsite-packagesagilo-0.9.3-py2.7.eggagilohtdocsimages and put it into the project htdocs folder. Also copy the logo.png image for the header to the project htdocs folder.

Email Notification

To enable the email features for Trac edit the E:tracmyprojectconftrac.ini and set the following:

admit_domains =
always_notify_owner = false
always_notify_reporter = false
always_notify_updater = true
ambiguous_char_width = single
email_sender = SmtpEmailSender
ignore_domains =
mime_encoding = none
sendmail_path = sendmail
smtp_always_bcc =
smtp_always_cc =
smtp_default_domain =
smtp_enabled = true
smtp_from =
smtp_from_name = Trac - MyProject
smtp_password =
smtp_port = 25
smtp_replyto =
smtp_server = mailhost
smtp_subject_prefix = __default__
smtp_user =
ticket_subject_template = $prefix #$ $summary
use_public_cc = false
use_short_addr = false
use_tls = false


To enable the logging features for Trac edit the E:tracmyprojectconftrac.ini and set the following:

log_file = trac.log
log_level = WARNING
log_type = file

The log file will be found under the project log folder in E:tracmyprojectlog.

Alternative Authentication

We can optionally install the Trac AccountManagerPlugin ( to let Trac handle logins via an form instead of Apache HTTP login.

  1. Disable the Apache HTTP Digest Authentication: In the steps above we enable HTTP Digest Authentication via Apache. Go into the D:Apache2.2confhttpd.conf and comment out the LocationMatch directive:
    #<LocationMatch "/trac/[^/]+/login">
    #  AuthType Digest
    #  AuthName "trac"
    #  AuthDigestDomain /trac
    #  AuthUserFile E:/trac/trac.htpasswd
    #  Require valid-user

    Restart Apache.

  2. Download Subversion (SVN)_: The AccountManagerPlugin needs Subversion to download so go to (if Windows 32bit is the OS) and grab the MSI. For example Setup-Subversion-1.6.16.msi.
  3. Install SVN: Run the installer being sure to install to D:Subversion. Once the install is complete, go into the Environment Variables and create a new System Variable with Variable name: SVN_HOME and Variable value: D:Subversion. Next, edit the Path System Variable and add to the end of the Variable value: ....;%SVN_HOME%bin. Press OK out of all of the dialogs.
  4. Install the Trac AccountManagerPlugin: For Trac 0.12 open a command window and enter the command:

    If you are installing a different version of Trac, please verify what the correct location of the AccountManagerPlugin you should install from the website Restart Apache for the new plugin to load.

  5. Configure: Open the Trac Admin Plugin page (http://myserver/trac/myproject/admin/general/plugin).
    • Find the ‘trac 0.12.2’ section (usually at the top) and then scroll to the ‘trac.web.auth.*’ property and deselect the LoginModule which handles the Apache HTTP authentication. Save and verify that E:tracmyprojectconftrac.ini has the line:
      trac.web.auth.loginmodule = disabled

      disabled. It is not enough for it to just not exist, it needs to be explicitly disabled.

    • Scroll down to the ‘tracaccountmanager 0.3dev-r10250’ section (bottom) and enable the following:
      • acct_mgr.admin.AccountGuardAdminPage
      • acct_mgr.admin.AccountManagerAdminPage
      • acct_mgr.api.AccountManager
      • acct_mgr.guard.AccountGuard
      • acct_mgr.htfile.AbstractPasswordFileStore
      • acct_mgr.htfile.HtDigestStore
      • acct_mgr.notification.AccountChangeListener
      • acct_mgr.notification.AccountChangeNotificationAdminPanel
      • acct_mgr.pwhash.HtDigestHashMethod
      • acct_mgr.web_ui.AccountModule
      • acct_mgr.web_ui.EmailVerificationModule
      • acct_mgr.web_ui.LoginModule
    • Apply all changes. Once applied, there should be an Accounts > Configuration option in the navigation. Go there and set the following:
      • HTDigestStore: set drop down to 1 (ie first)
      • filename: E:tractrac.htpasswd which is the same file that we set up above for Apache HTTP Digest Authentication
      • realm: trac
      • Allow the user to be remembered across sessions without needing to re-authenticate: deselect
      • Force users to change passwords after a password reset: check
      • Force users to verify their email addresses: check
    • Then go to Accounts > Notification and select __ALL_ check boxes and put in the administrator’s email (ie: and Save.
    • Go to Accounts > Users and add in your users manually. Once added, you should see the entry in the E:tractrac.htpasswd file.

That is it! Now on to adding backlog and sprints.

Happy Agile’n!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s