Projet

Général

Profil

Wiki » Historique » Version 248

Patrice Nadeau, 2019-12-07 15:37

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 243 Patrice Nadeau
```bash
34
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
```
36 32 Patrice Nadeau
37 214 Patrice Nadeau
### MySQL
38 94 Patrice Nadeau
39 32 Patrice Nadeau
Création de la base de donnés.
40
Substituer les items suivants à votre choix :
41 214 Patrice Nadeau
42 32 Patrice Nadeau
* redmine : Usager pour la base de donnés.
43 224 Patrice Nadeau
* password : Mot de passe de la base de données.
44 32 Patrice Nadeau
* db : Nom de la base de donnés.
45
46 1 Patrice Nadeau
Lancer MySQL :
47 242 Patrice Nadeau
```bash
48 244 Patrice Nadeau
mysql -u root -p
49 242 Patrice Nadeau
```
50 1 Patrice Nadeau
51
Commandes MySQL :
52 242 Patrice Nadeau
```sql
53 244 Patrice Nadeau
create database db character set utf8;
54
create user 'redmine'@'localhost' identified by 'password';
55
grant all privileges on db.* to 'redmine'@'localhost';
56
commit;
57
quit;
58 1 Patrice Nadeau
```
59
60 219 Patrice Nadeau
### Redmine
61 32 Patrice Nadeau
62 214 Patrice Nadeau
L’installation sera faite dans **\srv\redmine** (exemple avec la version 3.4)
63 225 Patrice Nadeau
64 244 Patrice Nadeau
```bash
65
cd /srv/
66
svn co http://svn.redmine.org/redmine/branches/3.1-stable redmine
67
cd redmine
68
cp config/database.yml.example config/database.yml
69
cp config/configuration.yml.example config/configuration.yml
70
mkdir public/plugin_assets
71
```
72 219 Patrice Nadeau
73 33 Patrice Nadeau
Si un usager MySQL autre que _root_ ou mot de passe diffèrent est utilisé :
74 219 Patrice Nadeau
Éditer le fichier **config/database.yml**, section *Production* et modifier les lignes :
75 1 Patrice Nadeau
76 219 Patrice Nadeau
* **username**
77
* **password**
78 33 Patrice Nadeau
79 219 Patrice Nadeau
Éditer le fichier **config/configuration.yml** et modifier la configuration SMTP.
80
81 214 Patrice Nadeau
### Ruby
82 33 Patrice Nadeau
83 34 Patrice Nadeau
Installation des gems de Ruby
84 240 Patrice Nadeau
> Le « gem » rmagick ne fonctionne pas avec ImageMagick 2.7 (https://github.com/rmagick/rmagick/pull/299)
85 1 Patrice Nadeau
86 241 Patrice Nadeau
```bash
87 234 Patrice Nadeau
cd redmine
88 1 Patrice Nadeau
gem install bundler
89 240 Patrice Nadeau
# Install sans rmagick
90 234 Patrice Nadeau
bundle.ruby2.5 install --without development test rmagick
91 241 Patrice Nadeau
```
92 219 Patrice Nadeau
93 1 Patrice Nadeau
### Initialisation
94 214 Patrice Nadeau
95 1 Patrice Nadeau
Création de la cryptographie, de la structure et des donnés de base :
96
97 233 Patrice Nadeau
```bash
98
cd /srv/redmine
99
rake generate_secret_token
100
RAILS_ENV=production rake db:migrate
101
RAILS_ENV=production rake redmine:load_default_data
102
```
103 219 Patrice Nadeau
104 231 Patrice Nadeau
### Test
105 1 Patrice Nadeau
106 231 Patrice Nadeau
Le serveur inclus _webrick_ n'est pas conçu pour être utilisé en production.
107 1 Patrice Nadeau
108 231 Patrice Nadeau
Ouvrir dans le pare-feu le port TCP 3000 (ou simplement desactiver temporairement le parefeu) :
109 214 Patrice Nadeau
110 232 Patrice Nadeau
```bash
111
yast firewall services add tcpport=3000 zone=EXT
112
```
113 45 Patrice Nadeau
114 231 Patrice Nadeau
Se rendre au `server.tld:3000`
115 45 Patrice Nadeau
116 231 Patrice Nadeau
### Apache
117 45 Patrice Nadeau
118 1 Patrice Nadeau
Information provenant de :
119
120
* web : 
121
    * http://martin-denizet.com/install-redmine-2-5-x-with-git-and-subversion-on-debian-with-apache2-rvm-and-passenger/ 
122
    * http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine
123
    * http://www.redmine.org/boards/2/topics/43924
124
* livre : "Mastering Redmine":http://shop.oreilly.com/product/9781849519144.do
125
126
### Modules Apache
127
128
> Apache 2.4
129
130
Ajout
131 244 Patrice Nadeau
```bash
132
zypper install libcurl-devel apache2-devel apache2-mod_perl perl-Apache-DBI subversion-server
133
```
134 219 Patrice Nadeau
135
Activation des modules Apache
136 244 Patrice Nadeau
```bash
137
a2enmod ssl
138
a2enmod perl
139
a2enmod dav
140
a2enmod dav_svn
141
a2enmod dav_fs
142
a2enmod rewrite
143
a2enmod headers
144
```
145 219 Patrice Nadeau
146 1 Patrice Nadeau
Module _Passenger_
147 244 Patrice Nadeau
```bash
148
cd /srv/redmine
149
gem install passenger
150
passenger-install-apache2-module.ruby2.1
151
```
152 219 Patrice Nadeau
153
Changer les droits sur le fichiers de log
154 244 Patrice Nadeau
```bash
155
chmod 0666 log/production.log
156
```
157 214 Patrice Nadeau
158 46 Patrice Nadeau
Créer le dossier des fichiers temporaire
159 216 Patrice Nadeau
160 61 Patrice Nadeau
> 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
161 244 Patrice Nadeau
```bash
162
mkdir tmp/passenger
163
```
164 235 Patrice Nadeau
165
### Activation de la configuration
166
167
Créer le fichier **/etc/apache2/conf.d/passenger.conf** et ajouter la configuration inscrite par l'installation.
168 1 Patrice Nadeau
169 235 Patrice Nadeau
Ajouter dans **/etc/apache2/vhosts.d/vhost.conf**
170
171 245 Patrice Nadeau
```bash
172 215 Patrice Nadeau
<VirtualHost *:80>
173 235 Patrice Nadeau
	# La ligne suivante est nécessaire seulement si plusieurs site web son présents sur le même serveur.
174
	ServerName redmine.yourdomain.com
175
	DocumentRoot /srv/redmine/public
176
177
	RailsEnv production
178
	PassengerAppRoot /srv/redmine
179
	PassengerTempDir /srv/redmine/tmp/passenger
180
181 215 Patrice Nadeau
	<Directory "/srv/redmine/public">
182
		Options Indexes ExecCGI FollowSymLinks
183
		AllowOverride None
184 235 Patrice Nadeau
		Order deny,allow
185
		Require all granted
186
	</Directory>
187 45 Patrice Nadeau
</VirtualHost>
188 214 Patrice Nadeau
```
189 1 Patrice Nadeau
190 68 Patrice Nadeau
Relancer Apache :
191 1 Patrice Nadeau
192 220 Patrice Nadeau
```bash
193 71 Patrice Nadeau
systemctl reload apache2
194 1 Patrice Nadeau
```
195 69 Patrice Nadeau
196 1 Patrice Nadeau
## Post-installation
197
198 224 Patrice Nadeau
A partir d’un navigateur web, se brancher à :
199 1 Patrice Nadeau
200 82 Patrice Nadeau
* Webrick : http://server:3000
201 236 Patrice Nadeau
* Apache : http://server
202
203
Utiliser l’usager *admin* avec le mot de passe *admin*.
204
Vérifier la configuration dans *Administration*, *Information*.
205
206
Si un avertissement apparaît pour l’écriture des répertoires, changer les droits :
207
> Semble être nécessaire que pour Apache
208
209
```bash
210 220 Patrice Nadeau
cd /srv/redmine
211 1 Patrice Nadeau
chmod -R 0777 public/plugin_assets
212
chmod -R 0777 files
213
chown -R wwwrun:www tmp
214 29 Patrice Nadeau
# Pour la macro "thumbnails" du wiki, le plugin "redmine_people" nécessite au moins 0775
215 187 Patrice Nadeau
chmod -R 0777 tmp/thumbnails
216 1 Patrice Nadeau
```
217 187 Patrice Nadeau
218 36 Patrice Nadeau
219 224 Patrice Nadeau
## Personnalisation
220 1 Patrice Nadeau
221 224 Patrice Nadeau
### Ajout d’un logo
222 220 Patrice Nadeau
223
> Cette étape sera à refaire lors d'une mise à jour.
224 1 Patrice Nadeau
225 220 Patrice Nadeau
Les informations viennent de : http://www.redmine.org/projects/redmine/wiki/Howto_add_a_logo_to_your_Redmine_banner
226 186 Patrice Nadeau
227
* Copier le logo dans **/srv/redmine/public/images/logo.png**
228 220 Patrice Nadeau
229
* Modifier le fichier **/srv/redmine/app/views/layouts/base.html.erb**
230
231 224 Patrice Nadeau
* Si on ne veux plus afficher le titre, mettre en commentaire :
232 247 Patrice Nadeau
```
233
<!--<h1><%= page_header_title %></h1>-->
234
```
235 1 Patrice Nadeau
236
* Ajouter en dessous la ligne 
237 247 Patrice Nadeau
```
238
<img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>
239
```
240 98 Patrice Nadeau
241 97 Patrice Nadeau
* Relancer Redmine
242 214 Patrice Nadeau
243 113 Patrice Nadeau
### Plugins
244 1 Patrice Nadeau
245 224 Patrice Nadeau
Modules supplémentaires pour ajouter des fonctionnalités à Redmine.
246 1 Patrice Nadeau
247 248 Patrice Nadeau
> Source de problème lors de mise à jour si incompatibilité (ce qui arrive a chaque mise à niveau...).
248 101 Patrice Nadeau
249
## Mise à jour
250 1 Patrice Nadeau
251 220 Patrice Nadeau
> Version 3.4.2 -> 3.4.6
252
253 1 Patrice Nadeau
S’assurer d'avoir les dernières versions des plugins ET qu'il sont compatibles avec la version de Redmine à installer.
254 221 Patrice Nadeau
255
Disponible à http://www.redmine.org/projects/redmine/wiki/Download 
256 220 Patrice Nadeau
257
Mise à jour de Redmine à partir d'une version stable
258
> http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
259 229 Patrice Nadeau
260 220 Patrice Nadeau
* Arrêter Redmine
261
* Renommer le répertoire actuel
262
263 229 Patrice Nadeau
        cd /srv/
264
        mv redmine redmine.old
265 220 Patrice Nadeau
266
* Télécharger la nouvelle version
267
268 221 Patrice Nadeau
        wget http://www.redmine.org/releases/redmine-3.4.6.tar.gz
269
270
* Décompresser le fichier
271 220 Patrice Nadeau
272
        tar xvf redmine-3.4.6.tar.gz
273
        mv redmine-3.4.6 redmine
274 221 Patrice Nadeau
275
* Copier les anciens fichiers de configurations
276
277
        cp redmine.old/config/configuration.yml redmine/config
278
        cp redmine.old/config/database.yml redmine/config
279
        cp -r redmine.old/files redmine
280
281
* Refaire la sécurité
282 220 Patrice Nadeau
283
        chown -R root:root redmine
284
        # Les commandes suivantes sont nécessaire seulement si Apache est utilisé
285 221 Patrice Nadeau
        # Le même owner que config.ru doit être utiliser pour plusieurs dossier
286 220 Patrice Nadeau
        chown wwwrun:www redmine/config.ru
287
        mkdir redmine/tmp/passenger
288
        chown -R wwwrun:www redmine/tmp
289 221 Patrice Nadeau
        chmod 0777 redmine/public/plugin_assets
290 229 Patrice Nadeau
        chmod -R 0777 redmine/files
291 220 Patrice Nadeau
292
* Ne copier que les « plugins » qui ne sont pas fournis par la nouvelle version de Redmine
293
294 229 Patrice Nadeau
        cp -r redmine.old/plugins/* redmine/plugins
295
296
* Installer les « gems »
297
298 220 Patrice Nadeau
        cd redmine
299
        bundle.ruby2.5 install --without development test
300
301 221 Patrice Nadeau
* Mise à jour (base de donnés, « plugins ») et ménage :
302
303
        bundle.ruby2.5 exec rake generate_secret_token
304 220 Patrice Nadeau
        bundle.ruby2.5 exec rake db:migrate RAILS_ENV=production
305
        bundle.ruby2.5 exec rake redmine:plugins:migrate RAILS_ENV=production
306
        bundle.ruby2.5 exec rake tmp:cache:clear tmp:sessions:clear
307
308
* Remettre le logo (facultatif)
309
310
        cd ..
311
        cp redmine.old/public/images/logo.png redmine/public/images/
312
        cp redmine.old/app/views/layouts/base.html.erb redmine/app/views/layouts/
313
314
* Réinstaller le module « Passenger » (voir plus haut)
315
* Relancer Redmine 
316
* Vérifier 
317 214 Patrice Nadeau
    * Administration
318 40 Patrice Nadeau
        * Informations
319 163 Patrice Nadeau
        * Plugins
320
        * Projects
321 5 Patrice Nadeau
        * Users
322 39 Patrice Nadeau
        * Roles & permissions
323 214 Patrice Nadeau
    * Essayer d'attacher un fichier à un projet
324 1 Patrice Nadeau
    * Essayer d’accéder au calendrier d'un projet
325 214 Patrice Nadeau
326 1 Patrice Nadeau
## Copie de sécurité
327
328
[[Copie de sécurité]]
329 214 Patrice Nadeau
330 1 Patrice Nadeau
331 220 Patrice Nadeau
332 1 Patrice Nadeau
## Dépannage
333
334
### Mot de passe perdu
335
336
Le mot de passe admin par défaut est en _hash Sha1_ : *da3174755c5e82a436b6c7ff87c873ee50d6654b* et est *admin.*
337
338
### Le service tombe « DEAD » à chaque fois (webrick)
339
340
Effacer le fichier **/srv/redmine/tmp/pids/server.pid**.