Project

General

Profile

HowTo Install Redmine on Ubuntu step by step » History » Version 2

Lee Butler, 2013-01-10 05:08

1 1 Lee Butler
h1. HowTo Install Redmine on Ubuntu step by step
2
3
p. This tutorial walks you step-by-step through installing Redmine on a clean/fresh Ubuntu 12.04 installation.  This is intended to be a complete cookbook method for getting Redmine installed and running.  It makes no assumptions about other things being installed or configured.  Since I have had some issues when using the graphical package managers, we will be doing this from the command line prompt to keep things as clear and clean as possible.
4
5
p. I recommend that you install any Ubuntu updates prior to beginning this process.  There are almost always some waiting to be installed after the system is first set up.
6
7
p. There are several support packages that we will install first.  The first two lines are pretty simple if you just follow the prompts and accept the defaults.  Installing mysql takes just a little more, so the details are spelled out.
8
9
<pre>$ sudo apt-get install apache2 libapache2-mod-passenger
10
$ sudo apt-get install git subversion
11
$ sudo apt-get install mysql-server mysql-client 
12
</pre>
13
14
p. The installation process for mysql is going to prompt you for a password for the "root" access for the database server, then ask you to confirm the password in a follow-up screen.  This sets the database adminstration password.
15
16
<pre>Package configuration                                                           
17
18
  ┌────────────────────┤ Configuring mysql-server-5.5 ├─────────────────────┐   
19
  │ While not mandatory, it is highly recommended that you set a password   │   
20
  │ for the MySQL administrative "root" user.                               │   
21
  │                                                                         │   
22
  │ If this field is left blank, the password will not be changed.          │   
23
  │                                                                         │   
24
  │ New password for the MySQL "root" user:                                 │   
25
  │                                                                         │   
26
  │ _______________________________________________________________________ │   
27
  │                                                                         │   
28
  │                                 <Ok>                                    │   
29
  │                                                                         │   
30
  └─────────────────────────────────────────────────────────────────────────┘   
31
</pre>
32
<pre>
33
  ┌────┤ Configuring mysql-server-5.5 ├──────────┐
34
  │                                              │
35
  │ Repeat password for the MySQL "root" user.   │
36
  │                                              │
37
  │                                              │
38
  │ ____________________________________________ │
39
  │                                              │
40
  │                   <Ok>                       │
41
  │                                              │
42
  └──────────────────────────────────────────────┘
43
</pre>
44
45 2 Lee Butler
p. Now it is time to install redmine itself.  
46
<pre>
47 1 Lee Butler
$ sudo apt-get install redmine redmine-mysql
48
</pre>
49
50
51
p. You want to allow dbconfig-common to configure the database when prompted so select *Yes* from the prompt in the panel below.
52
<pre>
53
Package configuration                                                           
54
                                                                                
55
 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
56
 │                                                                           │  
57
 │ The redmine/instances/default package must have a database installed and  │  
58
 │ configured before it can be used.  This can be optionally handled with    │  
59
 │ dbconfig-common.                                                          │  
60
 │                                                                           │  
61
 │ If you are an advanced database administrator and know that you want to   │  
62
 │ perform this configuration manually, or if your database has already      │  
63
 │ been installed and configured, you should refuse this option.  Details    │  
64
 │ on what needs to be done should most likely be provided in                │  
65
 │ /usr/share/doc/redmine/instances/default.                                 │  
66
 │                                                                           │  
67
 │ Otherwise, you should probably choose this option.                        │  
68
 │                                                                           │  
69
 │ Configure database for redmine/instances/default with dbconfig-common?    │  
70
 │                                                                           │  
71
 │                    <Yes>                       <No>                       │  
72
 │                                                                           │  
73
 └───────────────────────────────────────────────────────────────────────────┘  
74
</pre>
75
76
p. Then you want to provide the "root" password for the database, so that the installer can create the redmine database.  This is the password set when you installed mysql.
77
78
<pre>
79
Package configuration                                                           
80
                                                                                
81
 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
82
 │ Please provide the password for hte administrative account with which     │  
83
 │ this package should create its MySQL database and user.                   │  
84
 │                                                                           │  
85
 │ Password of the database's administrative user:                           │  
86
 │                                                                           │  
87
 │ ******__________________________________________________________________  │  
88
 │                                                                           │  
89
 │                   <Ok>                       <Cancel>                     │  
90
 │                                                                           │  
91
 └───────────────────────────────────────────────────────────────────────────┘  
92
</pre>
93
94
p. Tell the redmine installer we are using mysql for this installation by highlighting "mysql" from the list of database choices:
95
96
<pre>
97
Package configuration                                                           
98
                                                                                
99
 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
100
 │ The redmine/instances/default package can be configured to use one of     │  
101
 │ several database types. Below, you will be presented with the available   │  
102
 │ choices.                                                                  │  
103
 │                                                                           │  
104
 │ Database type to be used by redmine/instances/default:                    │  
105
 │                                                                           │  
106
 │                                  sqlite3                                  │  
107
 │                                  pgsql                                    │  
108
 │                                  mysql                                    │  
109
 │                                                                           │  
110
 │                                                                           │  
111
 │                    <Ok>                        <Cancel>                   │  
112
 │                                                                           │  
113
 └───────────────────────────────────────────────────────────────────────────┘  
114
</pre>
115
116
p. Now you are asked to provide a password that will be used to protect the redmine database.  Redmine itself will use this when it wants to access mysql.
117
118
<pre>
119
Package configuration                                                           
120
121
 ┌──────────────────────────┤ Configuring redmine ├──────────────────────────┐  
122
 │ Please provide a password for redmine/instances/default to register with  │  
123
 │ the database server.  If left blank, a random password will be            │  
124
 │ generated.                                                                │  
125
 │                                                                           │  
126
 │ MySQL application password for redmine/instances/default:                 │  
127
 │                                                                           │  
128
 │ *******__________________________________________________________________ │  
129
 │                                                                           │  
130
 │                    <Ok>                        <Cancel>                   │  
131
 │                                                                           │  
132
 └───────────────────────────────────────────────────────────────────────────┘ 
133
</pre>
134
135
Now confirm the redmine password.
136
137
<pre>
138
Package configuration                                                           
139
                                                                                
140
   ┌────┤ Configuring redmine ├─────┐                       
141
   │                                │                       
142
   │                                │                       
143
   │ Password confirmation:         │                       
144
   │                                │                       
145
   │ *******_______________________ │                       
146
   │                                │                       
147
   │     <Ok>         <Cancel>      │                       
148
   │                                │                       
149
   └────────────────────────────────┘   
150
</pre>
151
152
p. You need to modify two files for apache.  The first is /etc/apache2/mods-available/passenger.conf which needs the text *PassengerDefaultUser www-data* added as seen here:
153
<pre>
154
<IfModule mod_passenger.c>
155
  PassengerDefaultUser www-data
156
  PassengerRoot /usr
157
  PassengerRuby /usr/bin/ruby
158
</IfModule>
159
</pre>
160
161
Now create a symlink to connect Redmine into the web document space:
162
<pre>
163
$ sudo ln -s /usr/share/redmine/public /var/www/redmine
164
</pre>
165
166
p. And modify /etc/apache2/sites-available/default to insert the following with the other <Directory> sections so that apache knows to follow the symlink into Rails:
167
<pre>
168
<Directory /var/www/redmine>
169
	RailsBaseURI /redmine
170
	PassengerResolveSymlinksInDocumentRoot on
171
</Directory>
172
</pre>
173
174
Now restart apache:
175
<pre>
176
$ sudo service apache2 restart
177
</pre>
178
179
p. You should now be able to access redmine from the local host
180
<pre>$ firefox http://127.0.0.1/redmine
181
</pre>
182
183
184
p. In the upper right corner of the browser window you should see the "Sign in" link.  Click that and enter "admin" at both the *Login:* and *Password:* prompts.  Note: _this is not the password you set during the installation process_.  Click the *Login* button.
185
186
p. I recommend that the next thing you do is to click on *My account* in the upper right corner and change that password.  In the page that is displayed there should be a *Change password* link in the upper right of the white area of the page.  Click to change the password.