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