= Installing Trac on OpenBSD = trac is in ports now, so you can do a simple: {{{ $ cd /usr/ports/www/trac # make install }}} Ports picks python-2.4 instead of python-2.3, and everything appears to work fine. You do have to install Apache manually, however. I'm using 2.2.2. == Manual Install == Taken from TracOnRedhat with a few modifications. [[PageOutline]] ---- === Required Software === * Python-2.3.5.tgz * pysqlite-1.0.1.tar.gz * clearsilver-0.10.1.tar.gz * sqlite-2.8.16.tar.gz * db-4.4.16.tar.gz * SilverCity-0.9.5.tar.gz * subversion-1.2.3.tar.gz * httpd-2.0.55.tar.gz * apr-1.2.2.tar.gz * swig-1.3.27.tar.gz * apr-util-1.2.2.tar.gz * neon-0.25.4.tar.gz * trac-0.9.tar.gz == Installation == Make sure you have the latest libtool15 and autoconf259 (Install from ports) === Install APR === {{{ $ tar -xvzf apr-1.2.2.tar.gz $ cd apr-1.2.2 $ ./configure --prefix=/usr/local/apr $ make $ su root -c 'make install' }}} === Install sleepycat database === {{{ $ tar -xvzf db-4.4.16.tar.gz $ cd db-4.4.16/build_unix $ ../dist/configure $ make $ su root -c 'make install' }}} === Install APR utilities === {{{ $ tar -xvzf apr-util-1.2.2.tar.gz $ cd apr-util-1.2.2 $ export CPPFLAGS="-I/usr/local/BerkeleyDB.4.4/include" $ export LD_LIBRARY_PATH="/usr/local/BerkeleyDB.4.4/lib" $ ./configure --with-apr=/usr/local/apr --with-berkeley-db=/usr/local/BerkeleyDB.4.4 $ make $ su root -c 'make install' }}} === Install libxml === {{{ $ cd /usr/ports/textproc/libxml $ make install }}} === Install Python 2.3.5 === {{{ $ pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.8/packages/i386/python-2.3.5p2.tgz }}} === Install gmake-3.8 === {{{ $ pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/3.8/packages/i386/gmake-3.80p1.tgz }}} === Install Neon === {{{ $ tar -xvzf neon-0.25.4.tar.gz $ mv neon-0.25.4 neon $ cd neon $ ./configure --prefix=/usr/local/neon --with-ssl $ make $ su root -c 'make install' }}} === Install Apache 2 === {{{ $ tar -xvzf httpd-2.0.55.tar.gz $ cd httpd-2.0.55 $ ./configure --prefix=/usr/local/apache2 --enable-dav --enable-dav-fs $ make $ su root -c 'make install' }}} === Install SWIG === {{{ $ tar -xvzf swig-1.3.27.tar.gz $ cd swig-1.3.27 $ ./configure --prefix=/usr/local/swig --with-python=/usr/local/bin/python $ make $ su root -c 'make install' }}} (note: Had problems with subversion not detecting neon in /usr/local/neon, had to take out the option --with-neon=/usr/local/neon in the configure, it then detected neon 0.24.7, presumably the neon folder inside the subversion folder once untarred.) === Install Subversion === {{{ $ tar -xvzf subversion-1.2.3.tar.gz $ cd subversion-1.2.3 $ ./configure --disable-mod-activation --with-zlib \ --enable-swig-bindings=python --with-apr=/usr/local/apr/bin/apr-1-config \ --with-apr-util=/usr/local/apr/bin/apu-1-config --with-apxs=/usr/local/apache2/bin/apxs \ --with-swig=/usr/local/swig --with-httpd=../httpd-2.0.55 $ gmake $ su root -c 'gmake install' }}} === Fix apr.h === Make the following change to {{{/usr/local/apr/include/apr-1/apr.h}}}. {{{ #!diff --- /usr/local/apr/include/apr-1/apr.h.old Tue Mar 21 13:21:07 2006 +++ /usr/local/apr/include/apr-1/apr.h Tue Mar 21 13:21:59 2006 @@ -389,6 +389,8 @@ #define APR_PATH_MAX PATH_MAX #elif defined(_POSIX_PATH_MAX) #define APR_PATH_MAX _POSIX_PATH_MAX +#elif !defined(PATH_MAX) +#define PATH_MAX 1024 #else #error no decision has been made on APR_PATH_MAX for your platform #endif }}} === Install Python bindings for Subversion === {{{ $ gmake swig-py $ su root -c 'gmake install-swig-py' }}} === Install Sqlite === {{{ $ tar -xvzf sqlite-2.8.16.tar.gz $ ./configure $ gmake $ su root -c 'gmake install' }}} === (Optional) Install SilverCity === {{{ $ tar -xvzf SilverCity-0.9.5.tar.gz $ cd SilverCity-0.9.5 $ python setup.py build $ su root -c 'python setup.py install' }}} === Install ClearSilver === {{{ $ tar -xvzf clearsilver-0.10.1.tar.gz $ cd clearsilver-0.9.6 $ ./configure --with-python=/usr/local/bin/python --with-apache=/usr/local/apache2 $ gmake $ vi scripts/document.py, change 1st line #!/bin/env python to #!/usr/local/bin/python $ su root -c 'gmake install' $ cd python $ su root -c 'python setup.py install' }}} === Install PySqlite === {{{ $ tar -xvzf pysqlite-1.0.1.tar.gz $ cd pysqlite $ python setup.py build $ su root -c 'python setup.py install' }}} === Install Trac === {{{ $ tar -xvzf trac-0.9.tar.gz $ cd trac-0.9 $ python setup.py build $ su root -c 'python setup.py install' }}} === Fix libsvn paths === This will create symbolic link for libsvn library to the Python 2.3 library {{{ $ cd /usr/local/lib/python2.3/site-packages $ ln -s /usr/local/lib/svn-python svn-python $ ln -s /usr/local/lib/svn-python/svn svn $ ln -s /usr/local/lib/svn-python/libsvn libsvn }}} === Create the Subversion repository === {{{ $ svnadmin create --fs-type=fsfs /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 "/usr/local/share/trac/htdocs/" SetEnv TRAC_ENV "/var/trac" $ chmod -R a+rw /var/svn/repo }}}