Projet

Général

Profil

Wiki » Historique » Version 265

Patrice Nadeau, 2021-08-29 09:30

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