Difference between revisions of "Redmine2 setup"

From ArchWiki
Jump to: navigation, search
(Unicorn configuration: Merged to Ruby_on_Rails#Unicorn)
(Nginx Configuration: Move to Ruby_on_Rails.)
Line 23: Line 23:
 
=== Unicorn configuration ===
 
=== Unicorn configuration ===
 
Configure and start Unicorn using script provided in [[Ruby on Rails#Unicorn]].
 
Configure and start Unicorn using script provided in [[Ruby on Rails#Unicorn]].
 
=== Nginx Configuration ===
 
After setting up [[Nginx]], configure unicorn as an upstream server using something like this (Warning: this is a stripped example. It probably doesn't work without additional configuration):
 
<pre>
 
http {
 
upstream unicorn {
 
server 127.0.0.1:4000 fail_timeout=0;
 
server 127.0.0.1:4001 fail_timeout=0;
 
server 127.0.0.1:4002 fail_timeout=0;
 
server 127.0.0.1:4003 fail_timeout=0;
 
}
 
 
server {
 
listen 80 default;
 
server_name YOURHOSTNAMEHERE;
 
 
location / {
 
root /srv/http/redmine/public;
 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
proxy_set_header Host  $http_host;
 
proxy_redirect off;
 
proxy_pass http://unicorn;
 
}
 
}
 
}
 
</pre>
 

Revision as of 02:16, 3 May 2013

Merge-arrows-2.pngThis article or section is a candidate for merging with Redmine.Merge-arrows-2.png

Notes: please use the second argument of the template to provide more detailed indications. (Discuss in Talk:Redmine2 setup#)

This article explains how to install Redmine, an open-source web-based project management and bug-tracking tool, on Arch Linux. Redmine recently migrated from Ruby version 1.8.7 to version 1.9.3, which is also the version that is in the official Arch repositories, making it easier to install.

Package installation

Setup

Checkout

Get the Redmine source (Download instructions). We'll be installing Redmine directly from subversion in /srv/http/redmine/

# useradd -d /srv/http/redmine -s /bin/false redmine
# mkdir -p /srv/http/redmine
# svn checkout http://svn.redmine.org/redmine/branches/2.1-stable /srv/http/redmine
# chown -R redmine: /srv/http/redmine

Check previously installed gems

The Redmine devs included Bundler in Redmine, which can manage Gems just like pacman manages packages. Just remember you don't want bundler to install anything as it won't be tracked by pacman! Ideally we don't want to use Bundler at all, but Redmine has a hard dependency on it, so run the following command to assure Redmine all dependencies are met:

# bundle install --without development test rmagick postgresql sqlite

This should output a list of gems Redmine needs, all prefixed by 'Using ... (version)', and finally 'Your bundle is complete!'. Don't run this as root, but as a user that is NOT privileged to use sudo-without-password, because Bundler will install gems it misses and mess up what we nicely created with pacgem. Any missing gems should be installed with pacgem.

I hope the --without flags speak for themselves, if you use a different database you should add 'mysql' and remove your database from the list.

Unicorn configuration

Configure and start Unicorn using script provided in Ruby on Rails#Unicorn.