Project

General

Profile

HowTo Install Redmine on Debian Wheezy Testing with MySQL and Apache2-Passenger » History » Version 10

[ Desperados ], 2014-11-13 09:37

1 1 Gergely Szabo
h1. Installation on Debian Wheezy Testing
2
3 10 [ Desperados ]
h2. ########## Added 13.11.2014 : this guide doesn't work on Wheezy stable ##########
4
5 1 Gergely Szabo
This page describes the installation of Redmine on Debian Wheezy Testing, as of 29 March 2011.
6
It's actually a Linux Mint Debian Edition (LMDE) virtual server.
7
8 5 Gergely Szabo
First, the most important fact: it does not work out of the box. But it's very easy to fix thanks to Jérémy Lal. You feel hopeless and distressed, you send an email to Jérémy in the evening, and the reply from you kind Debian-maintainer with the right solution is waiting for you next morning. This is open source support for you. 
9 1 Gergely Szabo
10
The used configuration contains an Apache2 webserver, its Ruby-interface Passenger and a MySQL database.
11
12
h2. Preparation
13
14 3 Gergely Szabo
All command lines below assume you're root. And no, the # symbol is not a comment, it's your root prompt. :-)
15 1 Gergely Szabo
<pre>
16
# apt-get update
17
# apt-get install apache2
18
# apt-get install mysql-server
19
</pre>
20
21
The mysql-server installation will guide you through the process of creating an administrative (root) account. Don't forget the password!
22
23
h2. Install Redmine
24
25
This is the tricky part. Debian Wheezy contains Redmine 1.0.5-1, which requires RubyGems 1.3.x or 1.4.x. But Wheezy comes with RubyGems 1.6.2. It breaks during installation. Click for related "Redmine Wiki page":http://www.redmine.org/projects/redmine/wiki/RedmineInstall.
26
27
There are two ways out:
28
* downgrade RubyGems
29
* take a much newer Redmine (1.1.2) from Debian Experimental
30
31
I chose the second option, as the new Gantt-charts are also available from 1.1.0.
32
33 2 Gergely Szabo
First, let's enable the Debian Experimental repositories (see "Debian Wiki":http://wiki.debian.org/DebianExperimental):
34 1 Gergely Szabo
35
Add the line below to /etc/apt/sources.list:
36
<pre>
37
deb http://ftp.debian.org/debian experimental main
38
</pre>
39
40
Then install Redmine 1.1.2:
41
<pre>
42
# apt-get update
43
# apt-get -t experimental install redmine-mysql
44
# apt-get -t experimental install redmine
45
# apt-get install libapache2-mod-passenger
46
</pre>
47
48
Redmine's missing dependencies will be installed too, mostly exotic Ruby-related stuff (ruby, rails, rake etc.)
49
50
Redmine installation will also prompt you for the MySQL admin password (I told you to remember it), then it'll create the database called redmine_default and MySQL user redmine. You can specify its password or let the installer generate a random password.
51
52
All database settings, including the password, are stored here:
53
<pre>
54
/etc/redmine/default/database.yml
55
</pre>
56
57
h2. Start Redmine
58
59
We have to configure the Apache2 webserver to start running the Redmine application.
60
61
Create a symlink from the webserver doc root to redmine:
62
<pre>
63
# ln -s /usr/share/redmine/public /var/www/redmine
64
</pre>
65
66
Passenger should run as user www-data (same as Apache2). Add the line below to /etc/apache2/mods-available/passenger.conf:
67
<pre>
68
    PassengerDefaultUser www-data
69
</pre>
70
71 4 Gergely Szabo
Add the /var/www/redmine location in /etc/apache2/sites-available/default as the last child node within the root node (if you understand XML lingo):
72 1 Gergely Szabo
<pre>
73
    <Directory /var/www/redmine>
74
        RailsBaseURI /redmine
75
        PassengerResolveSymlinksInDocumentRoot on
76
    </Directory>
77
</pre>
78
79
Usually the Passenger module is enabled during installation (libapache2-mod-passenger). If not, enable it manually:
80
<pre>
81
# a2enmod passenger
82
</pre>
83
84
And last but not least, restart apache2:
85
<pre>
86
# /etc/init.d/apache2 restart
87
</pre>
88
89
Your new Communist Underground Movement a.k.a. Redmine is now available here:
90
<pre>
91
http://yourservername/redmine
92
</pre>
93
The default Redmine user/password are admin/admin.
94 7 Rodolfo Pilas
95
After start your Redime installation,  create a symlink for plugins assets
96
<pre>
97
ln -s /var/cache/redmine/default/plugin_assets /usr/share/redmine/public/
98
</pre>
99
to enable plugins work propertly.