Projet

Général

Profil

Wiki » Historique » Version 34

Patrice Nadeau, 2014-08-19 20:52

1 13 Patrice Nadeau
%{font-size:18pt}Redmine%
2
3 30 Patrice Nadeau
> Merge du fichier PDF : issue:#13
4 25 Patrice Nadeau
5 13 Patrice Nadeau
---
6
7 1 Patrice Nadeau
{{toc}}
8
9 13 Patrice Nadeau
h1. Redmine
10 6 Patrice Nadeau
11 31 Patrice Nadeau
Logiciel de gestion de projets, sources, bugs et timeline.
12
Contient un module de Wiki, de fichiers.
13
Supporte aussi les systèmes de version de fichier (Git, SVN entre autre).
14
Disponible à http://www.redmine.org/projects/redmine/wiki/Download
15
16
De base, ne fonctionne pas avec Apache
17
Pour une solution possible, voir : http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine
18
19
Sa principale difficulté d’installation et sa dépendance à Ruby. D’où le but de ce guide.
20
Voir aussi :
21
* http://bitnami.com/stack/redmine
22
* http://www.turnkeylinux.org/redmine
23
24 6 Patrice Nadeau
h1. Installation
25
26 32 Patrice Nadeau
Ce guide documente une installation GNU/Linux avec les version suivantes :
27
* openSUSE 13.1
28
* Redmine 2.4.2
29
30 1 Patrice Nadeau
h2. Prérequis
31
32 32 Patrice Nadeau
Un serveur LAMP openSUSE
33
34
Les logiciels suivants :
35
36
* libmysqlclient-devel
37
* mysql-community-server
38
* ruby-2.0
39
* ruby20-devel
40
* rubygem-bundler
41
* rubygem-mysql2
42
* rubygem-pg
43
* ImageMagick
44
* ImageMagick-devel
45
* git
46
* gcc
47
* make
48
49
h2. MySQL
50
51
Ajout au démarrage automatique et démarrage du service :
52
<pre><code class="bash">
53
chkconfig -a mysql
54
rcmysql start
55
</code></pre>
56
57
Création de la base de donnés.
58
Substituer les items suivants à votre choix :
59
* redmine : Usager pour la base de donnés.
60
* password : Mot de passe de la base de donnees.
61
* db : Nom de la base de donnés.
62
63
Lancer MySQL :
64
<pre><code class="bash">
65
mysql -u root -p
66
</code></pre>
67
68
Commandes MySQL :
69
<pre><code class="sql">
70
create database db character set utf8;
71
create user 'redmine'@'localhost' identified by 'password';
72
grant all privileges on db.* to 'redmine'@'localhost';
73
commit;
74
quit;
75
</code></pre>
76
77 33 Patrice Nadeau
h2. Redmine
78 13 Patrice Nadeau
79 33 Patrice Nadeau
L’installation sera faite dans _\srv\redmine_
80
<pre><code class="bash">
81
cd /srv/
82
svn co http://svn.redmine.org/redmine/branches/2.4-stable redmine
83
cd redmine
84
cp config/database.yml.example config/database.yml
85
cp config/configuration.yml.example config/configuration.yml
86
mkdir public/plugin_assets
87
</code></pre>
88
89
Si un usager MySQL autre que _root_ ou mot de passe diffèrent est utilisé :
90
Éditer le fichier *config/database.yml*, section *Production* et modifier les lignes :
91
* *username*
92
* *password*
93
94
Éditer le fichier _config/configuration.yml_ et modifier la configuration SMTP.
95
96
h2. Ruby
97
98 34 Patrice Nadeau
Installation des gems de Ruby
99 1 Patrice Nadeau
<pre><code class="bash">
100 34 Patrice Nadeau
cd redmine
101
gem install bundler
102
gem install activerecord-mysql2-adapter
103
bundle install --without development test
104 1 Patrice Nadeau
</code></pre>
105 34 Patrice Nadeau
106
h2. Initialisation
107
108
Création de la cryptographie, de la structure et des donnés de base :
109
<pre><code class="bash">
110
cd /srv/redmine
111
rake generate_secret_token
112
RAILS_ENV=production rake db:migrate
113
RAILS_ENV=production rake redmine:load_default_data
114
</code></pre>
115
116
Ouvrir dans le pare-feu :
117
* TCP : 3000
118
119
Lancer le serveur web (test)
120
<pre><code class="bash">
121
cd /srv/redmine
122
ruby script/rails server webrick -e production
123
</code></pre>
124
125
A partir d’un navigateur web, se brancher à http://server:3000.
126
Utiliser l’usager *admin* avec le mot de passe *admin*.
127
Vérifier la configuration dans *Administration*, *Information*.
128 16 Patrice Nadeau
129 29 Patrice Nadeau
h1. Personnalisation
130 8 Patrice Nadeau
131 1 Patrice Nadeau
h2. Plugins
132
133 4 Patrice Nadeau
h3. Redmine Rouge
134 12 Patrice Nadeau
135 1 Patrice Nadeau
Permet le support de langage supplémentaire pour l'affichage de la syntaxe d'un code source.
136 4 Patrice Nadeau
137 13 Patrice Nadeau
"Langage supporté":http://rouge.jayferd.us/demo
138 1 Patrice Nadeau
139
https://github.com/ngyuki/redmine_rouge
140
141
<pre>
142
<code class="bash">
143
cd /srv/redmine/plugins
144
git clone https://github.com/ngyuki/redmine_rouge.git
145
cd ..
146
bundle install
147 2 Patrice Nadeau
# Relancer redmine
148
rcredmine restart
149 1 Patrice Nadeau
</code>
150
</pre>
151 5 Patrice Nadeau
152 22 Patrice Nadeau
h3. Code Highlight
153 9 Patrice Nadeau
154 10 Patrice Nadeau
http://www.redmine.org/plugins/codehightlight_button
155 9 Patrice Nadeau
156
Bouton permettant de sélectionner du code et d'activer la syntaxe selon un langage.
157 11 Patrice Nadeau
>Ne fonctionne pas pour les langages supplémentaires supportées par le « plug-in » _Redmine Rouge_. Voir "ici":https://github.com/mediatainment/redmine_codebutton/issues/2
158 9 Patrice Nadeau
159 1 Patrice Nadeau
Installation
160
<pre><code class="bash">
161 10 Patrice Nadeau
cd /srv/redmine/plugins
162
git clone https://github.com/mediatainment/redmine_codebutton.git
163
cd ..
164
rake redmine:plugins
165 9 Patrice Nadeau
rake redmine:plugins:migrate RAILS_ENV=production
166 10 Patrice Nadeau
# Relancer Redmine
167 1 Patrice Nadeau
rcredmine restart
168
</code></pre>
169 11 Patrice Nadeau
170 23 Patrice Nadeau
h3. Redmine Issue Checklist
171 11 Patrice Nadeau
172
Extends issues to store checklist items
173
174
http://redminecrm.com/projects/checklist
175
176
Installation
177
<pre><code class="bash">
178
cd /srv/redmine/plugins
179
wget http://redminecrm.com/license_manager/4200/redmine_issue_checklist-2_0_5.zip
180
unzip redmine_issue_checklist-2_0_5.zip
181
bundle exec rake redmine:plugins NAME=redmine_issue_checklist RAILS_ENV=production
182
# Relancer Redmine
183
rcredmine restart
184
</code></pre>
185
186
Configuration
187
Dans *Administration*
188
* *Plugins*
189
** Choisir les options voulues
190
* *Roles and permissions*
191
** Choisir le rôle
192
Donner les droits voulus sur :
193
*** Done checklist items 
194
*** Edit checklist items 
195 14 Patrice Nadeau
*** View checklist
196 1 Patrice Nadeau
197 24 Patrice Nadeau
h3. Redmine People
198
199 29 Patrice Nadeau
> A faire
200 24 Patrice Nadeau
201 20 Patrice Nadeau
h3. WikiNG
202 1 Patrice Nadeau
203 20 Patrice Nadeau
Personnalisation des items dans le wiki.
204 28 Patrice Nadeau
Ajoute des boutons et des icônes comme FIXME et TODO.
205 29 Patrice Nadeau
> « Écrase » le bouton installé par _Code Highlight_
206 21 Patrice Nadeau
207
Installation
208 27 Patrice Nadeau
<pre><code class="bash">
209 26 Patrice Nadeau
cd /srv/redmine
210
wget http://projects.andriylesyuk.com/attachments/download/564/wiking-1.0.0b.tar.bz2
211
tar xvf wiking-1.0.0b.tar.bz2
212
mv wiking plugins
213
rake redmine:plugins:migrate RAILS_ENV=production
214
# restart Redmine
215
rcredmine restart
216
</code></pre>
217 20 Patrice Nadeau
218 14 Patrice Nadeau
h1. Mise à jour
219 1 Patrice Nadeau
220 14 Patrice Nadeau
S’assurer d'avoir les dernières versions des plugins.
221 9 Patrice Nadeau
222 14 Patrice Nadeau
h1. Copie de sécurité
223 5 Patrice Nadeau
224
<pre> <code class="bash">
225
#!/bin/bash
226
#
227
# backup_redmine.sh
228
# Backup of a Redmine setup
229
# Last Changes: 2013-02-23
230
# Maintainer: Patrice Nadeau  <patricen@telwarwick.net>
231
232
# TODO Verify the results (folder exist, enough disk pace , etc..)
233
234
## The only variable needed to be changed
235
# Directory of the Redmine install
236
declare -r RAIL_ROOT='/srv/redmine'
237
# MySQL database
238
declare -r MYSQL_DB=''
239
# MySQL username for the Redemine db
240
declare -r MYSQL_USER=''
241
# MySQL password for the Redemine db
242
declare -r MYSQL_PASSWORD=''
243
# Directory for the backup (must exist and with no space in the name)
244
declare -r DIR='/root'
245
## end
246
247
# Exit level
248
declare -ir EXIT_OK=0
249
declare -ir EXIT_WARNING=1
250
declare -ir EXIT_ERROR=2
251
252
declare -i STATUS=$EXIT_OK
253
254
# The directory inside the archive 
255
declare -r REDMINE='redmine'
256
TMP_DIR=$DIR/$REDMINE
257
258
# This will be used for the archive file 
259
declare -r DST=$DIR/redmine_$(date +%Y%m%d_%H%M%S).tar.gz
260
261
# The temporary sql file
262
declare -r TMP_MYSQL=$TMP_DIR/$MYSQL_DB.mysql
263
264
echo "Backup in progress in $DST"
265
266
#### Create the temp directory ####
267
mkdir $TMP_DIR
268
269
#### backup MySQL ####
270
if [ $STATUS -eq $EXIT_OK ] 
271
then
272
	STEP='Creating MySQL backup'
273
	mysqldump --user=$MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DB \
274
		> $TMP_MYSQL
275
	STATUS=$?
276
fi
277
278
#### backup the Redmine folder ####
279
if [ $STATUS -eq $EXIT_OK ] 
280
then
281
	STEP='Creating Redmine'"'"' files backup'
282
	cp --recursive $RAIL_ROOT $TMP_DIR
283
	STATUS=$?
284
fi
285
286
#### create the archive file ####
287
if [ $STATUS -eq $EXIT_OK ] 
288
then
289
	STEP="Creating archive"
290
	tar --create --gzip --file $DST --directory=$DIR $REDMINE
291
	STATUS=$?
292
fi
293
294
#### cleanup ####
295
if [ $STATUS -eq $EXIT_OK ] 
296
then
297
	STEP='Cleaning up'
298
	rm --recursive --force $TMP_DIR
299
	STATUS=$?
300
fi
301
302
#### exit ####
303
if [ $STATUS -eq $EXIT_OK ] 
304
then
305
	echo "Backup done"
306
else
307
	echo "Bakup failed with error code $STATUS in step $STEP"
308
fi
309
310
311
exit $STATUS
312
313
</code></pre>