Tuesday 8 February 2011

Installing Redmine + SVN on Ubuntu 10.04

I've got a new workstation pc. It's not much (no hardware supported virtualization, onboard graphics) but it does the job. I've decided to take it and basically turn it into the ultimate development machine. That is to say, start right from the beginning and do things properly. The last sentence probably means a lot of different things to a lot of different programmers, so what does it mean to me? Well basically:

* Ability to access the machine remotely (Dynamic DNS + SSH/Web access)
* A Version Control System (Subversion, thank you very much)
* Project management/issue tracking software
* Development web server + database (Tomcat & MySQL)

So, today I will be writing how to get Subversion + Redmine up and running on Ubuntu 10.04. Partly to help someone out there that might be having the same problem and partly because I'll probably be having to install it again in the future and having a written record might save some time :-)

I've installed both Subversion and Redmine from the repositories and generally used the sample configuration which came with the packages, with a little bit of tweaking of course.

Installing Subversion is as easy as running:

sudo apt-get install subversion libapache2-svn

Next, I mostly followed the subversion install instructions found on the ubuntu wiki page, setting up a private repository. The wiki writeup is excellent, telling you how to get up and running quickly, whether you use subversion over HTTP/HTTPS/SVN/SVN+SSH.

Redmine was a little more tricky to install, although still a lot easier than I remember it being before it was in the repositories. Start by running:

sudo apt-get install redmine redmine-mysql

If you don't use MySQL, use one of the alternates (redmine-sqlite, redmine-pgsql). The sample configuration for Apache can be found at /usr/share/doc/redmine/examples/. I used the 'apache2-alias.conf' file by pasting it into /etc/apache2/sites-available/redmine and running:

sudo a2ensite redmine
sudo /etc/init.d/apache2 restart

After this I got an error saying that one of the apache directives was in the wrong place:

... waiting Syntax error on line 14 of /etc/apache2/sites-enabled/redmine:
SocketPath cannot occur within section


I then tried moving the directive to the /etc/apache2/mods-available/fcgid.conf, however this ended up giving me a different set of errors in the apache error log:

[Sun Feb 13 16:23:33 2011] [error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /var/run/redmine/sockets/default/6126.28
[Sun Feb 13 16:23:33 2011] [warn] (13)Permission denied: mod_fcgid: spawn process /usr/share/redmine/public/dispatch.fcgi error

Finally, I commented this line out from both sections and was able to get redmine going without fcgi (Later I realised that I had installed passenger and it was running and that this was probably the reason that fcgi kept throwing the errors.

So, then you can navigate to http://localhost/redmine/ and configure the admin user (default username/pass is admin:admin) and you should have a working Redmine install.

2 comments: