Collaboa

Overview
Collaboa is pretty tricky to install, mostly because subversion and it's SWIG bindings are tricky. These instructions will install your own private copies of most of the dependencies, which is nice as you have control over exactly what versions to use (the installed versions on Dreamhost aren't updated that often, as they try to create a stable environment for their users). This document will get you to the point of having everything you need to run Collaboa. The INSTALL document that is included with Collaboa will walk you through the final configuration steps.

Environment Setup
Modify your .bash_profile file to include the following lines. (To edit it, type nano -w ~/.bash_profile then to exit and save, push CTRL+X then hit Enter.)

export LD_LIBRARY_PATH=$HOME/lib/ export PATH="$HOME/bin:$PATH" export PATH="$HOME/gems/bin:$PATH" export GEM_HOME=$HOME/gems export RUBYLIB=$HOME/lib/ruby/site_ruby/1.8

Then log out and log back in to get your new settings. (Or just type source .bash_profile)

Note: I had to add $HOME/lib/ruby/site_ruby/1.8/i686-linux to the RUBYLIB variable for the subversion libraries to not give me an error finding svn/ext/core:

export RUBYLIB=$HOME/lib/ruby/site_ruby/1.8:$HOME/lib/ruby/site_ruby_1.8/i686-linux

Tomfakes, Feb 2, 2007

Installing Ruby
Dreamhost, at least on my server, is using Ruby 1.8.2 for i386 -- Let's get 1.8.5 (And it'll compile to i686, for extra speed, hehe.)

wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.5.tar.gz tar zxf ruby-1.8.5.tar.gz cd ruby-1.8.5 ./configure --prefix=$HOME make make install cd ~

Installing FastCGI
(No, fcgi-2.4.0.tar.gz is not a mistake. /fcgi.tar.gz redirects to the latest version, which was 2.4.0 on 2006-04-10.)

wget http://fastcgi.com/dist/fcgi.tar.gz tar xzf fcgi-2.4.0.tar.gz cd fcgi-2.4.0 ./configure --prefix=$HOME make make install cd ~

Installing RubyGems
(Note: Make sure you've edited your ~/.bash_profile file first. See above.)

wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz tar xzf rubygems-0.9.0.tgz cd rubygems-0.9.0 ruby setup.rb config --prefix=$HOME ruby setup.rb setup ruby setup.rb install

gem install rails -y gem install mysql -y gem install redcloth bluecloth rubypants syntax xhtmldiff -y gem install fcgi -- --with-fcgi-dir=$HOME cd ~

Installing SWIG
wget http://superb-west.dl.sourceforge.net/sourceforge/swig/swig-1.3.29.tar.gz tar zxf swig-1.3.29.tar.gz cd swig-1.3.29 ./configure --prefix=$HOME --with-ruby=$HOME/bin/ruby make make install cd ~

Installing Subversion
I had trouble compiling swig-rb until I realised you had to do make install before make swig-rb. I've updated the instructions below to reflect that. -- LouisStAmour 13:45, 10 Apr 2006 (PDT)

Note: Subversion 1.4 does not ship with APR. The suggestion provided by Subversion's configure script is to check out the latest APR source and run autoconf.sh. This is a problem because (at least on my server) the autoconf utility is not installed. Instead of installing yet another tool, I chose to stick with the last version of Subversion that came with APR (1.3.2).--Mcenhillk 05:18, 28 Sep 2006 (PDT)

wget http://subversion.tigris.org/downloads/subversion-1.3.2.tar.gz tar zxf subversion-1.3.2.tar.gz cd subversion-1.3.2 ./configure RUBY=$HOME/bin/ruby --prefix=$HOME --with-swig=$HOME/bin/swig --without-berkeley-db --with-ssl --with-zlib make make install make swig-rb make install-swig-rb cd ~

Installing Collaboa
svn co http://svn.collaboa.org/svn/collaboa/trunk/ ./collaboa_svn --username=anon --password=anon

Update the "#!/usr/local/bin/ruby" paths in the script/* files to point to the local ruby you installed above.

There could be a better approach, but what worked for me (LouisStAmour) were these perl command-line snippets, run inside the collaboa_svn directory. (Note: every file perl reads will be copied to .bak ... which is why I run it only in some directories.) Now I wonder if it would have been easier to set RUBY_PATH instead.

perl -pi.bak -e "s/\/usr\/bin\/env ruby/\/home\/simplerca\/bin\/ruby/gi" script/* perl -pi.bak -e "s/\/usr\/bin\/env ruby/\/home\/simplerca\/bin\/ruby/gi" public/* perl -pi.bak -e "s/\/usr\/bin\/env ruby/\/home\/simplerca\/bin\/ruby/gi" lib/*