Redmine

Rails uses about twice the memory in 64-bit mode (about 70mb resident for me, 210mb virtual) than in 32-bit mode.

I created a user redmine for execwrap with home directory “/srv/www/users/www-default”.

Then i installed some basic ruby packages:

1
aptitude install ruby rubygems libpgsql-ruby librmagick-ruby libfcgi-ruby libopenssl-ruby rake

You can use a different sql backend of course!

The rubygems package may be an old version, which performs very badly memorywise… if you want you can try to build your own version.

The debian rails is unusable, so i used gem to install it (rails 2.3.4)

1
gem install --no-rdoc --no-ri -v=2.3.4 rails

I guess http://www.redmine.org/wiki/1/HowTo_Install_Redmine_in_a_home_directory_on_Debian would work too.

If you don’t like the debian rake, you could install that with:

1
gem install --no-rdoc --no-ri rake

To get the sources i used bzr-svn, but you can of course use svn (or git-svn) instead:

1
bzr co svn://rubyforge.org/var/svn/redmine/trunk redmine

Don’t try to use their git-branch… they somehow just didn’t keep it updated (took me a while to figure that out).

Follow http://www.redmine.org/wiki/redmine/RedmineInstall to configure redmine.

In order to use fastcgi we need to copy the file public/dispatch.fcgi.example to public/dispatch.fcgi:

1
cp public/dispatch.fcgi.example public/dispatch.fcgi

Now download cleanurl.lua from nordisch.org (made by darix) and save it in /etc/lighttpd

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$HTTP["host"] == "redmine.example.com" {
        server.document-root = "/srv/www/users/www-default/redmine/public"

        magnet.attract-physical-path-to = ( "/etc/lighttpd/cleanurl-v5.lua" )

        fastcgi.server    = ( "dispatch.fcgi" =>
                ((
                        "socket" => "/tmp/redmine-dispatch.socket",
                        "bin-path" => "/usr/sbin/execwrap",
                        "max-procs" => 1,
                        "idle-timeout" => 20,
                        "bin-environment" => (
                                "RAILS_ENV" => "production",
                                "UID" => "10000",
                                "GID" => "10000",
                                "TARGET" => "/srv/www/users/www-default/redmine/public/dispatch.fcgi",
                                "CHECK_GID" => "1",
                                "LANG" => "en_US.UTF-8",
                        ),
                        "bin-copy-environment" => (
                                "PATH",
                        ),
                        "broken-scriptfilename" => "enable"
                ))
        )
}

I am not sure why the encoding of my bzr commits was wrong first, so i added that LANG environment setting. It could have been the redmine encoding setting too (Admin → Settings → Repositories encodings).

I needed to empty some sql tables to purge the cache to get it working…

lighttpd2

See Howto Redmine for my current setup.

Daemontools

You can manage redmine / rails application instances with daemontools or runit instead of using execwrap in lighttpd.

Generated using nanoc and bootstrap - Last content change: 2011-06-10 07:41