Projet

Général

Profil

Wiki » Historique » Version 232

Patrice Nadeau, 2018-08-17 13:13

1 214 Patrice Nadeau
# Redmine
2 6 Patrice Nadeau
3 31 Patrice Nadeau
Logiciel de gestion de projets, sources, bugs et timeline.
4
Contient un module de Wiki, de fichiers.
5
Supporte aussi les systèmes de version de fichier (Git, SVN entre autre).
6
Disponible à http://www.redmine.org/projects/redmine/wiki/Download
7
8
De base, ne fonctionne pas avec Apache
9 1 Patrice Nadeau
10
Sa principale difficulté d’installation est sa dépendance à Ruby.
11
Voir aussi :
12 219 Patrice Nadeau
13 1 Patrice Nadeau
* http://bitnami.com/stack/redmine
14
* http://www.turnkeylinux.org/redmine
15
16 121 Patrice Nadeau
{{lastupdated_at}} {{lastupdated_by}}
17
18 94 Patrice Nadeau
---
19 31 Patrice Nadeau
20 94 Patrice Nadeau
{{toc}}
21
22 214 Patrice Nadeau
## Installation
23 94 Patrice Nadeau
24 32 Patrice Nadeau
Ce guide documente une installation GNU/Linux avec les version suivantes :
25 225 Patrice Nadeau
* openSUSE Leap 15
26 231 Patrice Nadeau
* Redmine 3.4.6
27 32 Patrice Nadeau
28 214 Patrice Nadeau
### Prérequis
29 1 Patrice Nadeau
30
Un serveur *LAMP(Linux, Apache, MySQL, PHP)* [[guides_opensuse:|openSUSE]] *fonctionnel*.
31 56 Patrice Nadeau
32 44 Patrice Nadeau
Les logiciels supplémentaires suivants :
33 207 Patrice Nadeau
34 225 Patrice Nadeau
    zypper install libmysqlclient-devel ruby-2.5 ruby2.5-devel ImageMagick ImageMagick-devel libxml2-devel libxslt-devel libmariadb-devl git gcc make gcc-c++
35 32 Patrice Nadeau
36 214 Patrice Nadeau
### MySQL
37 94 Patrice Nadeau
38 32 Patrice Nadeau
Création de la base de donnés.
39
Substituer les items suivants à votre choix :
40 214 Patrice Nadeau
41 32 Patrice Nadeau
* redmine : Usager pour la base de donnés.
42 224 Patrice Nadeau
* password : Mot de passe de la base de données.
43 32 Patrice Nadeau
* db : Nom de la base de donnés.
44
45 1 Patrice Nadeau
Lancer MySQL :
46 32 Patrice Nadeau
47 219 Patrice Nadeau
    mysql -u root -p
48
49 1 Patrice Nadeau
Commandes MySQL :
50
51 219 Patrice Nadeau
    create database db character set utf8;
52
    create user 'redmine'@'localhost' identified by 'password';
53
    grant all privileges on db.* to 'redmine'@'localhost';
54
    commit;
55
    quit;
56
57
58 32 Patrice Nadeau
### Redmine
59 214 Patrice Nadeau
60 225 Patrice Nadeau
L’installation sera faite dans **\srv\redmine** (exemple avec la version 3.4)
61 189 Patrice Nadeau
62 219 Patrice Nadeau
    cd /srv/
63
    svn co http://svn.redmine.org/redmine/branches/3.1-stable redmine
64
    cd redmine
65
    cp config/database.yml.example config/database.yml
66
    cp config/configuration.yml.example config/configuration.yml
67
    mkdir public/plugin_assets
68
69
70 33 Patrice Nadeau
Si un usager MySQL autre que _root_ ou mot de passe diffèrent est utilisé :
71 219 Patrice Nadeau
Éditer le fichier **config/database.yml**, section *Production* et modifier les lignes :
72 1 Patrice Nadeau
73 219 Patrice Nadeau
* **username**
74
* **password**
75 33 Patrice Nadeau
76 219 Patrice Nadeau
Éditer le fichier **config/configuration.yml** et modifier la configuration SMTP.
77
78 214 Patrice Nadeau
### Ruby
79 33 Patrice Nadeau
80 34 Patrice Nadeau
Installation des gems de Ruby
81 1 Patrice Nadeau
82 219 Patrice Nadeau
    cd redmine
83
    gem install bundler
84 227 Patrice Nadeau
    bundle.ruby2.5 install --without development test
85 219 Patrice Nadeau
86 1 Patrice Nadeau
### Initialisation
87 214 Patrice Nadeau
88 1 Patrice Nadeau
Création de la cryptographie, de la structure et des donnés de base :
89
90 219 Patrice Nadeau
    cd /srv/redmine
91
    rake generate_secret_token
92
    RAILS_ENV=production rake db:migrate
93
    RAILS_ENV=production rake redmine:load_default_data
94
95 231 Patrice Nadeau
### Test
96 1 Patrice Nadeau
97 231 Patrice Nadeau
Le serveur inclus _webrick_ n'est pas conçu pour être utilisé en production.
98 1 Patrice Nadeau
99 231 Patrice Nadeau
Ouvrir dans le pare-feu le port TCP 3000 (ou simplement desactiver temporairement le parefeu) :
100 214 Patrice Nadeau
101 232 Patrice Nadeau
```bash
102
yast firewall services add tcpport=3000 zone=EXT
103
```
104 45 Patrice Nadeau
105 231 Patrice Nadeau
Se rendre au `server.tld:3000`
106 45 Patrice Nadeau
107 231 Patrice Nadeau
### Apache
108 45 Patrice Nadeau
109 54 Patrice Nadeau
Information provenant de :
110 219 Patrice Nadeau
111 54 Patrice Nadeau
* web : 
112 219 Patrice Nadeau
    * http://martin-denizet.com/install-redmine-2-5-x-with-git-and-subversion-on-debian-with-apache2-rvm-and-passenger/ 
113
    * http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine
114
    * http://www.redmine.org/boards/2/topics/43924
115 214 Patrice Nadeau
* livre : "Mastering Redmine":http://shop.oreilly.com/product/9781849519144.do
116 1 Patrice Nadeau
117 166 Patrice Nadeau
### Modules Apache
118
119 46 Patrice Nadeau
> Apache 2.4
120 45 Patrice Nadeau
121
Ajout
122 1 Patrice Nadeau
123 226 Patrice Nadeau
    zypper install libcurl-devel apache2-devel apache2-mod_perl perl-Apache-DBI subversion-server
124 219 Patrice Nadeau
125 45 Patrice Nadeau
Activation des modules Apache
126
127 219 Patrice Nadeau
    a2enmod ssl
128
    a2enmod perl
129
    a2enmod dav
130
    a2enmod dav_svn
131 1 Patrice Nadeau
    a2enmod dav_fs
132 219 Patrice Nadeau
    a2enmod rewrite
133
    a2enmod headers
134
135 224 Patrice Nadeau
Module _Passenger_
136 45 Patrice Nadeau
137 219 Patrice Nadeau
    cd /srv/redmine
138
    gem install passenger
139
    passenger-install-apache2-module.ruby2.1
140 1 Patrice Nadeau
141 90 Patrice Nadeau
Changer les droits sur le fichiers de log
142
143 219 Patrice Nadeau
    chmod 0666 log/production.log
144
145 90 Patrice Nadeau
Créer le dossier des fichiers temporaire
146 219 Patrice Nadeau
147
> Par défaut les fichiers sont dans _/tmp_ mais se font enlever par le « clean-up » journalier et doivent être refait avec un reload d'Apache
148
149
    mkdir tmp/passenger
150 93 Patrice Nadeau
151 214 Patrice Nadeau
### Activation de la configuration
152 46 Patrice Nadeau
153 216 Patrice Nadeau
Créer le fichier **/etc/apache2/conf.d/passenger.conf** et ajouter la configuration inscrite par l'installation.
154 61 Patrice Nadeau
155 215 Patrice Nadeau
Ajouter dans **/etc/apache2/vhosts.d/vhost.conf**
156 45 Patrice Nadeau
157 215 Patrice Nadeau
	<VirtualHost *:80>
158
		# La ligne suivante est nécessaire seulement si plusieurs site web son présents sur le même serveur.
159
		ServerName redmine.yourdomain.com
160
		DocumentRoot /srv/redmine/public
161 1 Patrice Nadeau
162 215 Patrice Nadeau
		RailsEnv production
163
		PassengerAppRoot /srv/redmine
164
		PassengerTempDir /srv/redmine/tmp/passenger
165 1 Patrice Nadeau
166 215 Patrice Nadeau
		<Directory "/srv/redmine/public">
167
			Options Indexes ExecCGI FollowSymLinks
168
			AllowOverride None
169
			Order deny,allow
170
			Require all granted
171
		</Directory>
172
	</VirtualHost>
173
174
175 65 Patrice Nadeau
Relancer Apache :
176 215 Patrice Nadeau
177
    systemctl reload apache2
178 45 Patrice Nadeau
179 214 Patrice Nadeau
## Post-installation
180 1 Patrice Nadeau
181 68 Patrice Nadeau
A partir d’un navigateur web, se brancher à :
182 1 Patrice Nadeau
183 220 Patrice Nadeau
* Webrick : http://server:3000
184 71 Patrice Nadeau
* Apache : http://server
185 1 Patrice Nadeau
186 69 Patrice Nadeau
Utiliser l’usager *admin* avec le mot de passe *admin*.
187 1 Patrice Nadeau
Vérifier la configuration dans *Administration*, *Information*.
188
189 224 Patrice Nadeau
Si un avertissement apparaît pour l’écriture des répertoires, changer les droits :
190 1 Patrice Nadeau
> Semble être nécessaire que pour Apache
191 82 Patrice Nadeau
192 220 Patrice Nadeau
    cd /srv/redmine
193
    chmod -R 0777 public/plugin_assets
194
    chmod -R 0777 files
195
    chown -R wwwrun:www tmp
196
    # Pour la macro "thumbnails" du wiki, le plugin "redmine_people" nécessite au moins 0775
197
    chmod -R 0777 tmp/thumbnails
198
199 1 Patrice Nadeau
## Personnalisation
200
201
### Ajout d’un logo
202 29 Patrice Nadeau
203 187 Patrice Nadeau
> Cette étape sera à refaire lors d'une mise à jour.
204 1 Patrice Nadeau
205 187 Patrice Nadeau
Les informations viennent de : http://www.redmine.org/projects/redmine/wiki/Howto_add_a_logo_to_your_Redmine_banner
206 36 Patrice Nadeau
207 224 Patrice Nadeau
* Copier le logo dans **/srv/redmine/public/images/logo.png**
208 1 Patrice Nadeau
209 224 Patrice Nadeau
* Modifier le fichier **/srv/redmine/app/views/layouts/base.html.erb**
210 220 Patrice Nadeau
211
* Si on ne veux plus afficher le titre, mettre en commentaire :
212 1 Patrice Nadeau
213 220 Patrice Nadeau
    <!--<h1><%= page_header_title %></h1>-->
214 186 Patrice Nadeau
215
* Ajouter en dessous la ligne 
216 220 Patrice Nadeau
217
    <img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>
218
219 224 Patrice Nadeau
* Relancer Redmine
220 1 Patrice Nadeau
221
### Plugins
222 214 Patrice Nadeau
223 1 Patrice Nadeau
Modules supplémentaires pour ajouter des fonctionnalités à Redmine.
224
225
> Source de problème lors de mise à jour si incompatibilité.
226 172 Patrice Nadeau
227 1 Patrice Nadeau
#### Redmine Rouge
228 209 Patrice Nadeau
229 1 Patrice Nadeau
Permet le support de langage supplémentaire pour l'affichage de la syntaxe d'un code source.
230
231
[Langage supporté](http://rouge.jayferd.us/demo)
232
233 13 Patrice Nadeau
https://github.com/ngyuki/redmine_rouge
234 1 Patrice Nadeau
235 224 Patrice Nadeau
* Installation
236
  
237
        cd /srv/redmine/plugins
238 1 Patrice Nadeau
239 217 Patrice Nadeau
Enlever l'ancienne version (si présente)
240 1 Patrice Nadeau
241 224 Patrice Nadeau
        rm -r redmine_rouge
242 1 Patrice Nadeau
243
Télécharger la nouvelle avec git
244
245 224 Patrice Nadeau
        git clone https://github.com/ngyuki/redmine_rouge.git
246
        cd ..
247
        bundle.ruby2.1 install
248 218 Patrice Nadeau
249 224 Patrice Nadeau
* Relancer redmine
250 218 Patrice Nadeau
251
#### Code Highlight
252 1 Patrice Nadeau
253 74 Patrice Nadeau
http://www.redmine.org/plugins/codehightlight_button
254 5 Patrice Nadeau
255 1 Patrice Nadeau
Bouton permettant de sélectionner du code et d'activer la syntaxe selon un langage.
256 9 Patrice Nadeau
257 224 Patrice Nadeau
* Installation
258 9 Patrice Nadeau
259 224 Patrice Nadeau
        cd /srv/redmine/plugins
260
        git clone https://github.com/mediatainment/redmine_codebutton.git
261
        cd ..
262
        rake redmine:plugins
263
        rake redmine:plugins:migrate RAILS_ENV=production
264 1 Patrice Nadeau
265 224 Patrice Nadeau
* Relancer Redmine
266 218 Patrice Nadeau
    
267 224 Patrice Nadeau
        rcredmine restart
268 10 Patrice Nadeau
269 224 Patrice Nadeau
* Ajout des langages supplémentaires supportées par le « plug-in » _Redmine Rouge_. 
270 220 Patrice Nadeau
271 224 Patrice Nadeau
> Voir [ici](https://github.com/mediatainment/redmine_codebutton/issues/2)
272
273
* Éditer le fichier **/srv/redmine/plugins/redmine_codebutton/assets/javascripts/wiki-codehighlight.js**
274
275 220 Patrice Nadeau
* Ajouter les langages voulus dans la variable *codeRayLanguages*
276 95 Patrice Nadeau
277 224 Patrice Nadeau
* Relancer Apache
278 1 Patrice Nadeau
279 224 Patrice Nadeau
        systemctl reload apache2.service
280 95 Patrice Nadeau
281 98 Patrice Nadeau
#### Wiki Extensions
282 97 Patrice Nadeau
283 214 Patrice Nadeau
Voir #52
284 113 Patrice Nadeau
285 1 Patrice Nadeau
Ajoute des macros au Wiki de Redmine
286 224 Patrice Nadeau
287 1 Patrice Nadeau
> La dernière version est disponible à https://bitbucket.org/haru_iida/redmine_wiki_extensions/downloads
288 115 Patrice Nadeau
289 114 Patrice Nadeau
Parmi les macros ajoutées:
290 118 Patrice Nadeau
291 220 Patrice Nadeau
* Emoticons : Un bouton apparait pour ajouter des « smilley » qui seront afficher en graphique
292 118 Patrice Nadeau
* !{{lastupdated_by}} : affiche le nom de la dernière personne à avoir modifier la page
293 1 Patrice Nadeau
* !{{lastupdated_at}} : affiche la date de la dernière modification de la page
294 118 Patrice Nadeau
* Liste complète à http://www.r-labs.org/projects/r-labs/wiki/Wiki_Extensions_en
295 1 Patrice Nadeau
296 177 Patrice Nadeau
> Des « smilley » non voulus peuvent apparaîtrent dans les wiki déjà en place. L'utilisation de *<notextile><notextile> </notextile></notextile>* seras alors nécessaire.
297 133 Patrice Nadeau
298 130 Patrice Nadeau
Étapes :
299 224 Patrice Nadeau
300 220 Patrice Nadeau
* Installation sur le serveur :
301 114 Patrice Nadeau
302 224 Patrice Nadeau
        cd /srv/redmine/
303
        wget https://bitbucket.org/haru_iida/redmine_wiki_extensions/downloads/redmine_wiki_extensions-0.8.0.zip
304
        unzip redmine_wiki_extensions-0.8.0.zip -d plugins/
305
        rake redmine:plugins:migrate RAILS_ENV=production
306
        systemctl reload apache2.service
307
        rm -r redmine_wiki_extensions-0.8.0.zip
308 220 Patrice Nadeau
309
* Activer le module dans le ou les projets voulus
310
311 224 Patrice Nadeau
* Retrait d'un plug-in
312 220 Patrice Nadeau
313 223 Patrice Nadeau
        cd /srv/redmine
314
        rake redmine:plugins:migrate NAME=plugin_name VERSION=0 RAILS_ENV=production
315
        rm -r plugins/plugin_name
316
        rake db:migrate_plugins RAILS_ENV=production
317 220 Patrice Nadeau
318 214 Patrice Nadeau
## Mise à jour
319 1 Patrice Nadeau
320 228 Patrice Nadeau
> Version 3.4.2 -> 3.4.6
321 101 Patrice Nadeau
322 139 Patrice Nadeau
S’assurer d'avoir les dernières versions des plugins ET qu'il sont compatibles avec la version de Redmine à installer.
323 1 Patrice Nadeau
324 101 Patrice Nadeau
Disponible à http://www.redmine.org/projects/redmine/wiki/Download 
325 1 Patrice Nadeau
326 101 Patrice Nadeau
Mise à jour de Redmine à partir d'une version stable
327
> http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
328 1 Patrice Nadeau
329 220 Patrice Nadeau
* Arrêter Redmine
330
* Renommer le répertoire actuel
331 1 Patrice Nadeau
332 221 Patrice Nadeau
        cd /srv/
333
        mv redmine redmine.old
334 220 Patrice Nadeau
335
* Télécharger la nouvelle version
336
337 229 Patrice Nadeau
        wget http://www.redmine.org/releases/redmine-3.4.6.tar.gz
338 220 Patrice Nadeau
339
* Décompresser le fichier
340
341 229 Patrice Nadeau
        tar xvf redmine-3.4.6.tar.gz
342
        mv redmine-3.4.6 redmine
343 220 Patrice Nadeau
344
* Copier les anciens fichiers de configurations
345
346 221 Patrice Nadeau
        cp redmine.old/config/configuration.yml redmine/config
347
        cp redmine.old/config/database.yml redmine/config
348
        cp -r redmine.old/files redmine
349 220 Patrice Nadeau
350
* Refaire la sécurité
351
352 221 Patrice Nadeau
        chown -R root:root redmine
353
        # Les commandes suivantes sont nécessaire seulement si Apache est utilisé
354
        # Le même owner que config.ru doit être utiliser pour plusieurs dossier
355
        chown wwwrun:www redmine/config.ru
356
        mkdir redmine/tmp/passenger
357
        chown -R wwwrun:www redmine/tmp
358
        chmod 0777 redmine/public/plugin_assets
359
        chmod -R 0777 redmine/files
360 220 Patrice Nadeau
361
* Ne copier que les « plugins » qui ne sont pas fournis par la nouvelle version de Redmine
362
363 221 Patrice Nadeau
        cp -r redmine.old/plugins/* redmine/plugins
364 220 Patrice Nadeau
365
* Installer les « gems »
366
367 221 Patrice Nadeau
        cd redmine
368 229 Patrice Nadeau
        bundle.ruby2.5 install --without development test
369 220 Patrice Nadeau
370
* Mise à jour (base de donnés, « plugins ») et ménage :
371
372 229 Patrice Nadeau
        bundle.ruby2.5 exec rake generate_secret_token
373
        bundle.ruby2.5 exec rake db:migrate RAILS_ENV=production
374
        bundle.ruby2.5 exec rake redmine:plugins:migrate RAILS_ENV=production
375
        bundle.ruby2.5 exec rake tmp:cache:clear tmp:sessions:clear
376 220 Patrice Nadeau
377
* Remettre le logo (facultatif)
378
379 221 Patrice Nadeau
        cd ..
380
        cp redmine.old/public/images/logo.png redmine/public/images/
381
        cp redmine.old/app/views/layouts/base.html.erb redmine/app/views/layouts/
382 220 Patrice Nadeau
383
* Réinstaller le module « Passenger » (voir plus haut)
384
* Relancer Redmine 
385
* Vérifier 
386
    * Administration
387
        * Informations
388
        * Plugins
389
        * Projects
390
        * Users
391
        * Roles & permissions
392
    * Essayer d'attacher un fichier à un projet
393
    * Essayer d’accéder au calendrier d'un projet
394
395 214 Patrice Nadeau
## Copie de sécurité
396 40 Patrice Nadeau
397 163 Patrice Nadeau
[[Copie de sécurité]]
398
399 5 Patrice Nadeau
400 39 Patrice Nadeau
401 214 Patrice Nadeau
## Dépannage
402 1 Patrice Nadeau
403 214 Patrice Nadeau
### Mot de passe perdu
404 1 Patrice Nadeau
405
Le mot de passe admin par défaut est en _hash Sha1_ : *da3174755c5e82a436b6c7ff87c873ee50d6654b* et est *admin.*
406
407 214 Patrice Nadeau
### Le service tombe « DEAD » à chaque fois (webrick)
408 1 Patrice Nadeau
409 220 Patrice Nadeau
Effacer le fichier **/srv/redmine/tmp/pids/server.pid**.