Version 19 (modified by 17 years ago) ( diff ) | ,
---|
Installing Trac on OpenBSD
trac is in ports now, which helps but in 4.1 and 4.2 require the installation of all X Server base packages. trac's build in ports is dependent up on expat. expat is distributed through a commendation of X Server packages.
If you did not install those packages, download them from your favorite repository and extract them at the root level while preserving permissions. The X Server base packages are: xbase4n.tgz, xetc4n.tgz, xshare4n.tgz, xfont4n.tgz, and xserv4n.tgz. Where n is the minor version number. You should be able to build trac without installing the xfont package. When installing, do not forget to preserve file permissions. These are not package files installably via add_pkg. Use the following commands to install the X Server base packages:
$ cd / $ tar xzvphf <package>
Once the base system is put together, simply build the package within ports:
$ cd /usr/ports/www/trac $ make install
This will also install all dependencies. Ports picks python-2.4 instead of python-2.3, and everything appears to work fine.
As of OpenBSD 4.1, 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 automatically installs any dependencies.
Manual Install
Taken from TracOnRedhat with a few modifications.
-
Installing Trac on OpenBSD
- Manual Install
-
Installation
- Install APR
- Install sleepycat database
- Install APR utilities
- Install libxml
- Install Python 2.3.5
- Install gmake-3.8
- Install Neon
- Install Apache 2
- Install SWIG
- Install Subversion
- Fix apr.h
- Install Python bindings for Subversion
- Install Sqlite
- (Optional) Install SilverCity
- Install ClearSilver
- Install PySqlite
- Install Trac
- Fix libsvn paths
- Create the Subversion repository
- Create the Trac project environment
Required Software
Note: 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.
- 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
.
-
/usr/local/apr/include/apr-1/apr.h
old new 389 389 #define APR_PATH_MAX PATH_MAX 390 390 #elif defined(_POSIX_PATH_MAX) 391 391 #define APR_PATH_MAX _POSIX_PATH_MAX 392 #elif !defined(PATH_MAX) 393 #define PATH_MAX 1024 392 394 #else 393 395 #error no decision has been made on APR_PATH_MAX for your platform 394 396 #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/" <Location "/cgi-bin/trac.cgi"> SetEnv TRAC_ENV "/var/trac" </Location> $ chmod -R a+rw /var/svn/repo