Personal tools
You are here: Home GNU / Linux Debian 4.0 Etch Install the Redmine project management application on Debian 4.0 Etch
Document Actions
  • Send this page to somebody
  • Print this page
  • Add Bookmarklet

Install the Redmine project management application on Debian 4.0 Etch

by Pierre-Yves Landuré last modified 2011-12-10 09:50

Redmine is a project management application written in Ruby (using the now famous Ruby on Rails framework). Having already tried Trac, and used for some time Bugzilla, i've been seduced by the simplicity and the functionalities of this software. If you want a powerfull project manager, with a bug tracker, forums, wiki, project time line management and some other functionalities, Redmine is for YOU ! I just love it :D

Warning

This guide use exclusively LigHTTPd. I have done this choice for many reasons : ease of install, light memory usage, but also because I was not wanting to use the Apache proxy module.

If you really want to use Apache 2, I encourage you to read this guide : Mongrel : Apache best practice deployment. A part of the following guide is still valid, but you will have to think and understand what you are doing in order to know witch it is :D.

Dependencies

Before anything else, you need to install Redmine dependencies :

/usr/bin/apt-get install ruby rake librmagick-ruby subversion libmysql-ruby mysql-client rubygems
We also install LigHTTPd and the FastCGI Ruby library :
/usr/bin/apt-get install lighttpd libfcgi-ruby1.8

The LigHTTPd configuration is created later in this guide, since it depends of the install path of Redmine.

Installation

First, enter the URL of the version of Redmine you want to install (you can find a list of Redmine downloads in the Redmine RubyForge):

SOURCE_URL=http://rubyforge.org/frs/download.php/34650/redmine-0.7.0_RC1.tar.gz

And download the Redmine sources archive :

/usr/bin/wget $SOURCE_URL \
--output-document=/tmp/redmine.tar.gz

Untar the downloaded file to an appropriate folder :

/bin/tar --directory /tmp -xzf /tmp/redmine.tar.gz

And move the new folder to its final emplacement :

/bin/mv /tmp/redmine-* /opt/redmine

You can now delete the downloaded file :

/bin/rm /tmp/redmine.tar.gz

Before configuring Redmine, you need to create a MySQL database.

If you have followed my MySQL database creation guide, you can jump this step. Otherwise, run the following command lines updated with the informations of your database :

MYSQL_DB=REDMINE
MYSQL_USERNAME=redmine
MYSQL_USERPWD=mot_de_passe

Then, configure Redmine to use this new database :

/bin/echo "# MySQL database configuration
production:
adapter: mysql
database: $MYSQL_DB
host: localhost
username: $MYSQL_USERNAME
password: $MYSQL_USERPWD" > /opt/redmine/config/database.yml

Once this done, go into your Redmine installation folder :

cd /opt/redmine

Create the database tables :

/usr/bin/rake db:migrate RAILS_ENV="production"

And update its contents :

/usr/bin/rake redmine:load_default_data RAILS_ENV="production"

At this time, you are asked to choose the install language.

We now clean up a little the default permissions since they are really too much permissive.

/bin/chmod -R go-w /var/www/redmine

We create a new Redmine folder in /var/lib :

/bin/mkdir --parent /var/lib/redmine

We move concerned folders to this new emplacement :

/bin/mv /opt/redmine/log /var/lib/redmine
/bin/mv /opt/redmine/tmp /var/lib/redmine
/bin/mv /opt/redmine/files /var/lib/redmine

We create symbolic links to replace the moved folders :

/bin/ln -s /var/lib/redmine/log /opt/redmine/log
/bin/ln -s /var/lib/redmine/tmp /opt/redmine/tmp
/bin/ln -s /var/lib/redmine/files /opt/redmine/files

We now change theses folders permissions in order to make them writable by the HTTP server :

/bin/chown -R www-data:www-data /var/lib/redmine

Notifications configuration

Redmine is able to send email notification for some events. But the default SMTP configuration does not work out of the box. We need to comment some parameters so that it work in a standard environment (this depends of your local SMTP server configuration). Simply run this command line :

/bin/sed -i \
  -e 's/\(.*domain\)/#\1/' \
  -e 's/\(.*authentication\)/#\1/' \
 -e 's/\(.*user_name\)/#\1/' \
 -e 's/\(.*password\)/#\1/' \
  /opt/redmine/config/environment.rb

The resulting environment.rb file should now contain the following lines for the email send configuration:

        # SMTP server configuration
config.action_mailer.smtp_settings = {
:address => "127.0.0.1",
:port => 25,
# :domain => "somenet.foo",
# :authentication => :login,
# :user_name => "redmine@somenet.foo",
# :password => "redmine",
}

It is configured to connect to the local SMTP server without using login.

Note : If this configuration does not work (you can test it from the notifications administration page of Redmine), i encourage you to manually edit the file /opt/redmine/config/environment.rb to replace the default STMP server by the one your Internet service provider.

HTTP server configuration

Now that we have installed Redmine, we need to configure our HTTP server in order to access it.

First, create the Redmine FastCGI dispatch file :

/bin/cp /opt/redmine/public/dispatch.fcgi.example /opt/redmine/public/dispatch.fcgi

We update our hosts file to that redmine is a name for 127.0.0.1 :

/bin/sed -i -e 's/\(127\.0\.0\.1.*\)/\1 redmine/' /etc/hosts

We create a virtual host configuration for Redmine in LigHTTPd :

echo '## Redmine virtual hosting

server.modules += ( "mod_simple_vhost" , "mod_rewrite" , "mod_fastcgi" )

$HTTP["host"] == "redmine" {
server.document-root = "/opt/redmine/public/"
server.follow-symlink = "enable"

alias.url = ()

server.indexfiles = ( "dispatch.fcgi" )
server.error-handler-404 = "/dispatch.fcgi"
url.rewrite-once = (
"^/(.*\..+(?!html))$" => "$0",
"^/(.*)\.(.*)" => "$0",
  )

fastcgi.server = (
".fcgi" => (
"redmine" => (
"bin-path" => "/usr/bin/ruby /opt/redmine/public/dispatch.fcgi",
"socket" => "/tmp/redmine.socket",
"min-procs" => 1,
"max-procs" => 4,
"idle-timeout" => 120,
"check-local" => "disable",
"bin-environment" => ( "RAILS_ENV" => "production" ),
)
)
)
}' > /etc/lighttpd/conf-available/10-redmine.conf

We enable the new virtual host :

/usr/sbin/lighty-enable-mod redmine

And we reload LigHTTPd configuration :

/etc/init.d/lighttpd force-reload

You can now access Redmine by using this URL :

Repositories watching

By default, Redmine download repositories informations only when you visit the "Repository" tab of your project. For this download to be done regularly, uncheck the "Autofetch commits" option in Redmine configuration, and create the needed cron script with the following command lines :

/bin/echo '#!/bin/sh
#
# Cron script to update Redmine repositories informations.

/usr/bin/ruby /opt/redmine/script/runner "Repository.fetch_changesets" -e production' \
| /usr/bin/tee /etc/cron.hourly/redmine-repositories
/bin/chmod +x /etc/cron.hourly/redmine-repositories

DST management (aka. summer and winter time)

In its default configuration, Redmine does not support automatic DST. In order to enable it, you need to install a plugin. In order to do this, you must install tzinfo for Ruby:

/usr/bin/gem install tzinfo --remote

Then, go to the root of your Redmine install:

cd /opt/redmine

And install the needed plugin:

/usr/bin/ruby script/plugin install tzinfo_timezone

Going deeper

I encourage you to read the Redmine guide.

In my opinion, i find Redmine so simple that you can learn it by simply exploring its configuration menus.

If you don't have a Subversion repository, I encourage you to create one... (at the present time, i'm too lazy to do a Google search for you :D)

Thanks

Attachments

Install

Posted by John Z at 2008-03-16 05:05
I'm working through the install (using Kubuntu 7.10).

Some notes:
1) Remind the user they need to install MySQL clients and server first.
2) Please show the actual end result of the SMTP config. Your script didn't work for me.
3) You mention "cp /var/www/redmine/public/dispatch.fcgi.example" but you haven't put anything into /var/www/redmine yet according to your instructions. My install didn't put anything there at least.

Guide

Posted by uberamd at 2008-10-18 06:38
Also in this guide, you indicate to chmod /var/www/redmine, however you never tell us to create that directory, or place files in that area.

Mongrel Apache deployment page obsolete

Posted by Jerome Warnier at 2008-11-23 22:13
I guess the new, good one, is: http://mongrel.rubyforge.org/wiki/Apache

thank you for the info

Posted by Pierre-Yves Landuré at 2008-11-23 22:19
I've updated the link.

Redmine in Ubuntu Jaunty 9.04

Posted by macada at 2009-05-01 13:26

I have created a howto for ubuntu 9.04 about how to install Redmine.

http://wiki.ousli.org/index.php/RedmineUbuntu

Hope this helps

Installed Redmine+SVN

Posted by Andrew at 2010-09-10 13:49
You can use following link. You do not need to install or configure anything. You can directly satrt to use redmine and svn. Their integration is already made by following web site.
http://billing.sourcerepo.com/aff.php?aff=067

BlogBang
Navigation
 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards:

Wikio