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