My Web Sites

Recent site activity

Software Tools‎ > ‎

Redmine

Here I will describe Redmine installation with SQLite and MySQL.

Installation

Official document (link). Version numbers below might be obsolete so check the original document.

If you are behind an authenticating proxy, run the following in a batch file to set up the proxy for gem:

:: Sets the proxy value in order to be able to use gem and other stuff.

set USER=myUsername

set PASSWORD=myPassword

set SERVER=myProxyServer.Domain

set PORT=8080

SET HTTP_PROXY=http://%USER%:%PASSWORD%@%SERVER%:%PORT%

Install Ruby 1.8.x from RubyInstaller.

(Eventually download and extract RubyGems, then run "ruby setup.rb" to install.)

Install Rails:

gem install rails -v=2.3.5

Install Rack:

gem install rack -v=1.0.1

Check-out Redmine from repository (mercurial, git, or svn).

Configuration

Set configuration. Copy config/database.yml.example to config/database.yml. Set the following:

#production:
#  adapter: mysql
#  database: redmine
#  host: localhost
#  username: root
#  password:
#  encoding: utf8
#  production:
#  adapter: sqlite3
#  dbfile: db/redmine.db

Set the environment

set RAILS_ENV=production

Initialize session store: "rake config/initializers/session_store.rb" or

rake generate_session_store

Setup Database

Select a database type (SQLite, MySQL, Postgres), then do the steps for that particular DBMS. After that do the Common steps below.

SQLite

Copy sqlite3.dll into ruby/bin directory.

Install SQLite Ruby bindings

gem install sqlite3-ruby

MySQL

Install MySQL from the download page. Install MySQL Workbench. Installation and configuration are pretty straightforward.

Create new database (schema) for Redmine. I created one called 'redmine' to fit the Redmine's database.yml file.

Common

Create database structure and populate the database. Add "--trace" if you get any issues.

set RAILS_ENV=production
rake db:migrate
rake redmine:load_default_data

Press enter (or select another languge).

Run Redmine. Go to Redmine installation directory and type

ruby script/server webrick -e production

Test the installation by going to http://localhost:3000 and login with admin, admin.

Run under IIS

See here and here.

Running under Mongrel as a Windows Service

Install Mongrel

gem install mongrel

Then try to run it manually. Open command prompt and go to Redmine root directory. Run

set RAILS_ENV=production

mongrel_rails start

If that starts successfully, install service packages. On Windows 6.x (2008, 7, or 2008 R2) use

gem install mongrel_service --include-dependencies --platform=mswin32
gem install mongrel_service --include-dependencies

To confirm the installation worked, start mongrel from Redmine installation directory with

mongrel_rails start -e production

Now install mongrel as a service on Windows. Make sure you run the command prompt as Administrator.

mongrel_rails service::install -N redmine_service -e production

Parameter "-p 4000" can be used, for example, to set the port Redmine will run on.
Set the service startup type to Automatic and run it.
To remove Windows service run
sc delete ServiceName

References: 

  • Task and issue tracking with Redmine on a Windows server (link)
  • How to set up Mongrel as a native Windows service (link)

Text Formatting

To create a link to commit in the source code repository, use the first 12 digits of the hash!

LDAP Integration

It is quite easy to integrate Redmine with Active Directory (or any LDAP service). What I found confusing was that the LDAP root is case-sensitive! Changing "dc=domain, dc=com" to "DC=domain, DC=com" made a whole lot of a difference between LDAP integration not working and working!
Documentation is here.

Scrum/Agile