Project

General

Profile

HowTo install Redmine on Debian with Passenger » History » Version 1

Holger Just, 2010-07-18 20:43

1 1 Holger Just
h1. HowTo install Redmine on Debian with Passenger
2
3
{{>toc}}
4
5
*This is work in progress. Please see the guide on [[HowTo_Install_Redmine_on_Debian_with_Ruby-on-Rails_and_Apache2-Passenger]] for now.*
6
7
This guide is going to explain how to install Redmine 0.9.x, 1.0.x, or trunk for a production setup on a Debian 5.0.x "Lenny".
8
9
Although, there exists a "Redmine package":http://packages.debian.org/lenny-backports/redmine in lenny-backports and above, I would recommend to not use it for now, as it patches Redmine to run on various older libraries (foremost Rails). If you run Squeeze, it should be easier to use the provided package. However, you are more flexible and probably get better support in the forums or in IRC when you use the redmine.org provided package. This is obviously the preferred method of deployment here.
10
11
h2. What we are going to do here?
12
13
At first, we need to make sure to meet the general requirements on [[RedmineInstall]]. At the time of writing, this included:
14
15
* Ruby 1.8.7 (preferred), 1.8.6 is also okay. Redmine is still not fully compatible with Ruby 1.9.x and JRuby
16
* Rubygems 1.3.1 or higher
17
* Rails 2.3.5 with dependencies
18
* Rack 1.0.1. Version 1.1 is not supported with Rails 2.3.5
19
20
Finally, we are going to install Apache 2.2 or Nginx together with passenger and set them up with redmine.
21
22
We are now walking through to install all these packages.
23
24
h2. Install Ruby
25
26
At first, we install the base ruby. Luckily, Debian Lenny ships with ruby 1.8.7 by default:
27
28
<pre>
29
aptitude install ruby1.8 irb1.8 rdoc1.8 ri1.8 libreadline-ruby1.8 libopenssl-ruby1.8
30
</pre>
31
32
h2. Setup lenny-packports to install passenger and some requirements from debian packages
33
34
This step is not necessary if you run a newer Debian distribution than Lenny. So if you run Squeeze or Sid, just skip this.
35
36
At first, we are adding the official @lenny-backports@ repository to our @sources.list@. This repository provides newer or additional packages compiled to run with Debian Lenny. Most of the time, it will include the software versions from the current testing distribution.
37
38
<pre>
39
echo "deb http://www.backports.org/debian lenny-backports main" >> /etc/apt/sources.list
40
aptitude reload
41
</pre>
42
43
Next we are going to instruct APT to prefer the current Debian stable release over the backports packages. Additionally, we are pinning some packages from backports such that these are installed and preferred over the stable release versions.
44
45
<pre>
46
cat <<EOF > /etc/apt/preferences
47
Package: *
48
Pin: release o=Debian,a=stable
49
Pin-Priority: 101
50
51
Package: *
52
Pin: release a=lenny-backports
53
Pin-Priority: 1
54
55
Package: rubygems
56
Pin: release a=lenny-backports
57
Pin-Priority: 999
58
59
Package: rubygems1.8
60
Pin: release a=lenny-backports
61
Pin-Priority: 999
62
63
Package: rake
64
Pin: release a=lenny-backports
65
Pin-Priority: 999
66
67
Package: librack-ruby1.8
68
Pin: release a=lenny-backports
69
Pin-Priority: 999
70
EOF
71
</pre>