Table of Contents

Redmine

A free and open source, web-based project management and issue tracking tool. It allows users to manage multiple projects and associated subprojects. It features per project wikis and forums, time tracking, and flexible role based access control. It includes a calendar and Gantt charts to aid visual representation of projects and their deadlines. Redmine integrates with various version control systems and includes a repository browser and diff viewer.

Installation

  1. install required packages:
     apt-get install redmine-mysql
  2. do not setup database connection during setup
  3. create new database
    CREATE DATABASE redmine;
    GRANT ALL privileges ON redmine.* TO redmine@localhost IDENTIFIED BY 'redmine';
  4. (optionally) put DB dump from older version into newly created DB
  5. setup database manually in /etc/redmine/database.yaml:
    production:
      adapter: mysql2
      database: redmine
      host: localhost
      port: 
      username: redmine
      password: redmine
      encoding: utf8
  6. create database structure:
    cd /usr/share/redmine/
    bundle exec rake db:migrate RAILS_ENV=production
  7. create a symlink to working directory:
    ln -s /usr/share/redmine /var/lib/redmine/default/passenger
  8. install passenger module to apache:
    apt-get install libapache2-mod-passenger
  9. setup default user for passenger in /etc/apache2/mods-available/passenger.conf:
    <IfModule mod_passenger.c>
      PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini
      PassengerDefaultRuby /usr/bin/ruby
      PassengerDefaultUser www-data
    </IfModule>
  10. create apache configuration /etc/apache2/sites-available/redmine.conf:
    Listen 3000
    <VirtualHost *:3000>
            # ServerName my.domain.name
            # this is the passenger config
            RailsEnv production
            # create a link in /var/lib/redmine/default/passenger to /usr/share/redmine
            PassengerAppRoot /var/lib/redmine/default/passenger
            SetEnv X_DEBIAN_SITEID "default"
            Alias "/plugin_assets/" /var/cache/redmine/default/plugin_assets/
            DocumentRoot /usr/share/redmine/public
            <Directory "/usr/share/redmine/public">
                    Order allow,deny
                    Allow from all
            </Directory>
    </VirtualHost>
  11. reload apache
    apache2ctl graceful
  12. access the redmine on port 3000

Migration

https://www.redmine.org/projects/redmine/wiki/HowTo_Migrate_Redmine_to_a_new_server_to_a_new_Redmine_version

  1. setup new server following the previous steps
  2. copy files from old server to new (files are in /var/lib/redmine/default/files) and don't forget to grant permissions for www-data user