Install Redmine 2.1.0 on Debian 6.0

Sep 27, 2012

Install necessary packages

aptitude update
aptitude install ruby rubygems libruby libapache2-mod-passenger libmysqlclient-dev libmagickcore-dev libmagickwand-dev mysql-server

Install Not So necessary packages

aptitude install vim git

Download redmine + untar + move it

tar xzvf redmine-2.1.0.tar.gz
mv redmine-2.1.0 /usr/local/share/redmine-2.1.0
ln -s /usr/local/share/redmine-2.1.0 /usr/local/share/redmine
chown -R root:root /usr/local/share/redmine-2.1.0

Create a redmine user

adduser redmine

Ruby/Gem thingies...

gem install bundler
cd /usr/local/share/redmine
/var/lib/gems/1.8/bin/bundle install --without development test postgresql sqlite

DB setup

mysql -uroot -p -e "create database redmine character set utf8;create user 'redmine'@'localhost' identified by 'redmine_password';grant all privileges on redmine.* to 'redmine'@'localhost';"
cp config/database.yml.example config/database.yml
vi config/database.yml
.. --- config/database.yml ---
 adapter: mysql
 database: redmine
 host: localhost
 username: redmine
 password: redmine_password
RAILS_ENV=production /var/lib/gems/1.8/bin/rake db:migrate
RAILS_ENV=production /var/lib/gems/1.8/bin/rake redmine:load_default_data
/var/lib/gems/1.8/bin/rake db:encrypt RAILS_ENV=production

Apache setup

echo '
DocumentRoot /usr/local/share/redmine/public
    AllowOverride all
    Options -MultiViews
' > /etc/apache2/sites-available/
a2dissite 000-default
service apache2 restart

Email setup (through Gmail)

cp config/configuration.yml.example config/configuration.yml
vi config/configuration.yml
.. --- config/configuration.yml ---
# Outgoing emails configuration (see examples above)
 delivery_method: :smtp
   enable_starttls_auto: true
   address: ""
   port: 587
   domain: ""
   authentication: :plain
   user_name: ""
   password: "PASSWORD"

Visit page and modify "Host name and path" value (so the links published in the emails are correct)

Git + Github integration

gem install json
# This is how to install a plugin!
cd plugins
git clone
RAILS_ENV=production /var/lib/gems/1.8/bin/rake redmine:plugins:migrate


In case you do not have SSH keys...

ssh-keygen -t rsa -C ""

Visit and add the newly generated public key (see

su redmine
git clone --mirror
cd project.git
git fetch -q --all
echo '*/5 * * * * redmine cd /PATH/TO/REPOS/project.git && git fetch -q --all' > /etc/cron.d/sync_git_repos

Note : here you will have to configure you *ssh keys* :

Add the repo to Redmine :

  • Now on github :
    • Visit
    • Add a new *WebHook URL* : (if your project ID in Redmine is NOT the same as the project name in github :
  • Access Redmine through
  • Default admin user is already created : admin:admin




  • [2012-10-02] replace cron + vhost setup from vi XXX to echo 'YYY' > XXX so a simple copy/paste is enough
comments powered by Disqus