Installing Redmine on Debian 7

Guide for intermediate

There are many guides on how to run Redmine on Debian, few are complex and working as it should, especially if it is about last version Redmine (2.6).


What is Redmine ?

Redmine is open software for project management. Thanks to its plugins it is possible to manage almost anything.

guide is created for the following setup:

  • Debian 7
  • Nginx
  • MariaDB/MySQL

We expect, that web server and database are already installed, so we will not include a guide on how to do that.

1. Updating repositories and installing necessary packages

aptitude update apt-get install thin ruby rake rubygems libopenssl-ruby libmysql-ruby librmagick-ruby ruby-dev libmysqlclient-dev libmagick-dev curl libmagickwand-dev imagemagick

2. download and extract Redmine

cd /tmp wget http://www.redmine.org/releases/redmine-2.6.0.zip unzip redmine-2.6.0.zip mkdir -p /data/web/example.com/ mv redmine-2.6.0/* /data/web/example.com/

3. Configure MariaDB

cd /data/web/example.com/ cp config/database.yml.example config/database.yml nano config/database.yml

4. Install GEM

gem install sass gem install compass gem install rmagick gem install bundler bundle install –without development test postgresql sqlite rake generate_secret_token rake db:migrate RAILS_ENV=”production”

5. Creating user and group for redmine

useradd redmine id redmine chown -R redmine:redmine /data/web/example.com/

6. Thin configuration

ln -s /etc/thin1.9.1 /etc/thin mkdir /var/log/thin chmod 755 /var/log/thin mkdir /var/run/thin chown -R redmine:redmine /var/run/thin cd /etc/thin nano redmine.yml

7. The config for redmine.yml can look like this:

chdir: /data/web/example.com environment: production timeout: 30 log: /var/log/thin/redmine.log pid: /var/run/thin/redmine.pid max_conns: 1024 max_persistent_conns: 512 require: [] wait: 30 socket: /var/run/thin/redmine.sock daemonize: true user: redmine group: redmine servers: 1 prefix: /

8. Now you can restart Thin and check if all is ok

/etc/init.d/thin start tail -f /var/log/thin/redmine.0.log

9. Configurating hosting for Nginx can look like this

. . . listen 80; root /data/web/example.com; server_name example.com; . . . client_max_body_size 100M; location / { proxy_set_header X-Reak-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { proxy_pass http://unix:/var/run/thin/redmine.0.sock; break; } } . . .

Technical guides are created in conjunctions with the community. Guide for how to install Redmine was provided by a user alian.info.

Updated on June 25, 2021

Was this article helpful?

Related Articles