Edgewall Software

Version 22 (modified by Alex Holst, 15 years ago) ( diff )

Remove obsolete comments about expat in older OS releases

Installing Trac on OpenBSD

Trac is in ports now, so simply install the package shipped with the OS:

$ export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/`uname -r`/packages/`uname -m`/
$ sudo pkg_add trac

This will also install all dependencies. Ports picks python-2.4 instead of python-2.3, and everything appears to work fine.

Apache httpd 2.2 is also in the ports tree with a package available. If PKG_PATH is already set correctly, simply do:

$ sudo pkg_add apache-httpd

pkg_add(1) automatically installs any dependencies.

Manual Install Not Needed

The OpenBSD project tweaks, packages and tests thousands of pieces of software in the ports tree for every release so you don't have to. Unless you specifically know why, you should just use packages instead of compiling from ports or, even worse, try to download tarballs and compile the programs yourself.

First-time setup

Create the Subversion repository

$ svnadmin create /var/svn 

Create the Trac project environment

$ trac-admin /var/trac initenv 
Creating a new Trac environment at /var/trac 

Trac will first ask a few questions about your environment 
in order to initalize 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]> (Your project name)

 Please specify the absolute path to the project Subversion repository. 
 Repository must be local, and trac-admin requires read+write 
 permission to initialize the Trac database. 

Path to repository [/var/svn/test]> /var/svn 

 Please enter location of Trac page templates. 
 Default is the location of the site-wide templates installed with Trac. 

Templates directory [/usr/local/share/trac/templates]> (Just press enter here)
Creating and Initializing Project 
(Output removed)
Don't forget, you also need to copy (or symlink) "trac/cgi-bin/trac.cgi" 
to you web server's /cgi-bin/ directory, and then configure the server. 
cp /usr/local/share/trac/cgi-bin/trac.cgi /usr/local/apache2/cgi-bin 

If you're using Apache, this config example snippet might be helpful: 

    Alias /trac "/var/www/users/trac/htdocs/" 
    <Location "/cgi-bin/trac.cgi"> 
        SetEnv TRAC_ENV "/var/trac" 
    </Location> 
    
$ chmod -R a+rw /var/svn/repo
Note: See TracWiki for help on using the wiki.