Redmine Installation

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 (or USER=DOMAIN\\Username)

set PASSWORD=myPassword
set SERVER=myProxyServer.Domain
set PORT=8080

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

Install Ruby package from RailsInstaller (link). This includes Bundler, DevKit, and everything else you need to run Ruby apps.

Redmine

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

Then install the dependencies by running the following command from Redmine root directory:

bundle install --without development test

or just "bundle install".

RMagick

Redmine instructions are here. Install ImageMagick and RMagick. On Windows, get rmagick-windows gem from here.

Note: I still have issues with RMagick installation and have to avoid installing RMagick and install dependencies with

bundle install --without test development rmagick

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_secret_token

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/rails 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)