Wiki » Historique » Version 102
  Patrice Nadeau, 2014-12-14 14:10 
  
| 1 | 13 | Patrice Nadeau | h1. 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 | * http://bitnami.com/stack/redmine  | 
||
| 13 | * http://www.turnkeylinux.org/redmine  | 
||
| 14 | |||
| 15 | 94 | Patrice Nadeau | ---  | 
| 16 | 31 | Patrice Nadeau | |
| 17 | 94 | Patrice Nadeau | {{toc}} | 
| 18 | |||
| 19 | h2. Installation  | 
||
| 20 | |||
| 21 | 32 | Patrice Nadeau | Ce guide documente une installation GNU/Linux avec les version suivantes :  | 
| 22 | * openSUSE 13.1  | 
||
| 23 | * Redmine 2.4.2  | 
||
| 24 | |||
| 25 | 94 | Patrice Nadeau | h3. Prérequis  | 
| 26 | 1 | Patrice Nadeau | |
| 27 | Un serveur *LAMP(Linux, Apache, MySQL, PHP)* [[guides_opensuse:|openSUSE]] *fonctionnel*.  | 
||
| 28 | 56 | Patrice Nadeau | |
| 29 | 44 | Patrice Nadeau | Les logiciels supplémentaires suivants :  | 
| 30 | 50 | Patrice Nadeau | |
| 31 | <pre><code class="bash">  | 
||
| 32 | 58 | Patrice Nadeau | zypper install libmysqlclient-devel ruby-2.0 ruby20-devel rubygem-bundler rubygem-mysql2 rubygem-pg ImageMagick ImageMagick-devel git gcc make  | 
| 33 | 56 | Patrice Nadeau | </code></pre>  | 
| 34 | 32 | Patrice Nadeau | |
| 35 | 94 | Patrice Nadeau | h3. MySQL  | 
| 36 | 32 | Patrice Nadeau | |
| 37 | Création de la base de donnés.  | 
||
| 38 | Substituer les items suivants à votre choix :  | 
||
| 39 | * redmine : Usager pour la base de donnés.  | 
||
| 40 | * password : Mot de passe de la base de donnees.  | 
||
| 41 | * db : Nom de la base de donnés.  | 
||
| 42 | |||
| 43 | Lancer MySQL :  | 
||
| 44 | <pre><code class="bash">  | 
||
| 45 | mysql -u root -p  | 
||
| 46 | </code></pre>  | 
||
| 47 | |||
| 48 | 1 | Patrice Nadeau | Commandes MySQL :  | 
| 49 | 32 | Patrice Nadeau | <pre><code class="sql">  | 
| 50 | create database db character set utf8;  | 
||
| 51 | create user 'redmine'@'localhost' identified by 'password';  | 
||
| 52 | grant all privileges on db.* to 'redmine'@'localhost';  | 
||
| 53 | commit;  | 
||
| 54 | quit;  | 
||
| 55 | </code></pre>  | 
||
| 56 | |||
| 57 | 94 | Patrice Nadeau | h3. Redmine  | 
| 58 | 13 | Patrice Nadeau | |
| 59 | 59 | Patrice Nadeau | L’installation sera faite dans _\srv\redmine_ (exemple avec la version 2.5)  | 
| 60 | 33 | Patrice Nadeau | <pre><code class="bash">  | 
| 61 | cd /srv/  | 
||
| 62 | 59 | Patrice Nadeau | svn co http://svn.redmine.org/redmine/branches/2.5-stable redmine  | 
| 63 | 33 | Patrice Nadeau | cd redmine  | 
| 64 | cp config/database.yml.example config/database.yml  | 
||
| 65 | cp config/configuration.yml.example config/configuration.yml  | 
||
| 66 | 1 | Patrice Nadeau | mkdir public/plugin_assets  | 
| 67 | 33 | Patrice Nadeau | </code></pre>  | 
| 68 | |||
| 69 | Si un usager MySQL autre que _root_ ou mot de passe diffèrent est utilisé :  | 
||
| 70 | Éditer le fichier *config/database.yml*, section *Production* et modifier les lignes :  | 
||
| 71 | * *username*  | 
||
| 72 | * *password*  | 
||
| 73 | |||
| 74 | Éditer le fichier _config/configuration.yml_ et modifier la configuration SMTP.  | 
||
| 75 | 1 | Patrice Nadeau | |
| 76 | 94 | Patrice Nadeau | h3. Ruby  | 
| 77 | 33 | Patrice Nadeau | |
| 78 | 34 | Patrice Nadeau | Installation des gems de Ruby  | 
| 79 | 1 | Patrice Nadeau | <pre><code class="bash">  | 
| 80 | 34 | Patrice Nadeau | cd redmine  | 
| 81 | gem install bundler  | 
||
| 82 | gem install activerecord-mysql2-adapter  | 
||
| 83 | bundle install --without development test  | 
||
| 84 | 1 | Patrice Nadeau | </code></pre>  | 
| 85 | |||
| 86 | 94 | Patrice Nadeau | h3. Initialisation  | 
| 87 | 1 | Patrice Nadeau | |
| 88 | 34 | Patrice Nadeau | Création de la cryptographie, de la structure et des donnés de base :  | 
| 89 | <pre><code class="bash">  | 
||
| 90 | 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 | </code></pre>  | 
||
| 95 | |||
| 96 | 94 | Patrice Nadeau | h3. Serveur web  | 
| 97 | 69 | Patrice Nadeau | |
| 98 | 70 | Patrice Nadeau | Redmine peux être utiliser avec le serveur inclus _webrick_ (port 3000) ou _Apache_ (port 80).  | 
| 99 | 1 | Patrice Nadeau | |
| 100 | 94 | Patrice Nadeau | h4. Webrick  | 
| 101 | 69 | Patrice Nadeau | |
| 102 | 60 | Patrice Nadeau | Ouvrir dans le pare-feu le port TCP 3000 :  | 
| 103 | <pre><code class="bash">  | 
||
| 104 | yast firewall services add tcpport=3000 zone=EXT  | 
||
| 105 | 34 | Patrice Nadeau | </code></pre>  | 
| 106 | 1 | Patrice Nadeau | |
| 107 | 69 | Patrice Nadeau | Lancer le serveur web  | 
| 108 | 34 | Patrice Nadeau | <pre><code class="bash">  | 
| 109 | 1 | Patrice Nadeau | cd /srv/redmine  | 
| 110 | 34 | Patrice Nadeau | ruby script/rails server webrick -e production  | 
| 111 | </code></pre>  | 
||
| 112 | 16 | Patrice Nadeau | |
| 113 | 94 | Patrice Nadeau | h5. Transformation en daemon  | 
| 114 | 35 | Patrice Nadeau | |
| 115 | Le script original vient de http://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_on_openSUSE  | 
||
| 116 | 1 | Patrice Nadeau | Copier le script dans le fichier */etc/init.d/redmine*  | 
| 117 | 35 | Patrice Nadeau | |
| 118 | Le modifier de la manière suivante :  | 
||
| 119 | * REDMINE_BIN=/srv/redmine/current/script/rails  | 
||
| 120 | * REDMINE_USER=user  | 
||
| 121 | * Corriger le «typo» à la ligne 73 : $REDMI-NE_BIN -> $REDMINE_BIN  | 
||
| 122 | * Dans la section stop, après la ligne killproc, ajouter *rm $PIDFILE*  | 
||
| 123 | |||
| 124 | Rendre le fichier exécutable, l’ajouter aux services SUSE et l’exécuter au démarrage :  | 
||
| 125 | <pre><code class="bash">  | 
||
| 126 | chmod 0755 /etc/init.d/redmine  | 
||
| 127 | cp -s /etc/init.d/redmine /usr/bin/rcredmine  | 
||
| 128 | chkconfig -a redmine  | 
||
| 129 | </code></pre>  | 
||
| 130 | 1 | Patrice Nadeau | |
| 131 | 94 | Patrice Nadeau | h4. Apache  | 
| 132 | 45 | Patrice Nadeau | |
| 133 | > En test, voir #23  | 
||
| 134 | |||
| 135 | Transformation pour utilisation avec Apache.  | 
||
| 136 | * N'utilise pas _webrick_  | 
||
| 137 | * Accessible par le port 80 au lieu de 3000  | 
||
| 138 | |||
| 139 | Information provenant de :  | 
||
| 140 | 54 | Patrice Nadeau | * web :  | 
| 141 | ** http://martin-denizet.com/install-redmine-2-5-x-with-git-and-subversion-on-debian-with-apache2-rvm-and-passenger/  | 
||
| 142 | ** http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Apache_to_run_Redmine  | 
||
| 143 | 91 | Patrice Nadeau | ** http://www.redmine.org/boards/2/topics/43924  | 
| 144 | 45 | Patrice Nadeau | * livre : "Mastering Redmine":http://shop.oreilly.com/product/9781849519144.do  | 
| 145 | |||
| 146 | 94 | Patrice Nadeau | h3. Modules Apache  | 
| 147 | 1 | Patrice Nadeau | |
| 148 | 46 | Patrice Nadeau | Ajout  | 
| 149 | 45 | Patrice Nadeau | <pre><code class="bash">  | 
| 150 | 49 | Patrice Nadeau | zypper install libcurl-devel apache2-devel apache2-mod_perl perl-Apache-DBI subversion-server  | 
| 151 | 45 | Patrice Nadeau | </code></pre>  | 
| 152 | |||
| 153 | Activation des modules Apache  | 
||
| 154 | <pre><code class="bash">  | 
||
| 155 | a2enmod ssl  | 
||
| 156 | a2enmod perl  | 
||
| 157 | a2enmod dav  | 
||
| 158 | a2enmod dav_svn  | 
||
| 159 | a2enmod dav_fs  | 
||
| 160 | a2enmod rewrite  | 
||
| 161 | a2enmod headers  | 
||
| 162 | 1 | Patrice Nadeau | </code></pre>  | 
| 163 | |||
| 164 | 94 | Patrice Nadeau | h3. Modules _Passenger_  | 
| 165 | 1 | Patrice Nadeau | |
| 166 | 46 | Patrice Nadeau | <pre><code class="bash">  | 
| 167 | 45 | Patrice Nadeau | cd /srv/redmine  | 
| 168 | gem install passenger  | 
||
| 169 | passenger-install-apache2-module2.0  | 
||
| 170 | 1 | Patrice Nadeau | </code></pre>  | 
| 171 | |||
| 172 | 90 | Patrice Nadeau | Changer les droits sur le fichiers de log  | 
| 173 | <pre><code class="bash">  | 
||
| 174 | chmod 0666 /srv/redmine.log/production.log  | 
||
| 175 | </code></pre>  | 
||
| 176 | |||
| 177 | 93 | Patrice Nadeau | Créer le dossier des fichiers temporaire  | 
| 178 | > 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  | 
||
| 179 | <pre><code class="bash">  | 
||
| 180 | mkdir /srv/redmine/tmp/passenger  | 
||
| 181 | </code></pre>  | 
||
| 182 | |||
| 183 | 94 | Patrice Nadeau | h3. Activation de la configuration  | 
| 184 | 46 | Patrice Nadeau | |
| 185 | 64 | Patrice Nadeau | Créer le fichier _/etc/apache2/conf.d/passenger.conf_ et ajouter la configuration inscrite par l'installation.  | 
| 186 | 61 | Patrice Nadeau | |
| 187 | 45 | Patrice Nadeau | Ajouter dans _/etc/apache2/vhosts.d/vhost.conf_  | 
| 188 | <pre><code class="bash">  | 
||
| 189 | <VirtualHost *:80>  | 
||
| 190 | 67 | Patrice Nadeau | # La ligne suivante est nécessaire seulement si plusieurs site web son présents sur le même serveur.  | 
| 191 | 45 | Patrice Nadeau | ServerName redmine.yourdomain.com  | 
| 192 | DocumentRoot /srv/redmine/public  | 
||
| 193 | 1 | Patrice Nadeau | |
| 194 | 45 | Patrice Nadeau | RailsEnv production  | 
| 195 | 67 | Patrice Nadeau | PassengerAppRoot /srv/redmine  | 
| 196 | 92 | Patrice Nadeau | PassengerTempDir /srv/redmine/tmp/passenger  | 
| 197 | 45 | Patrice Nadeau | |
| 198 | <Directory "/srv/redmine/public">  | 
||
| 199 | Options Indexes ExecCGI FollowSymLinks  | 
||
| 200 | 1 | Patrice Nadeau | AllowOverride None  | 
| 201 | Order deny,allow  | 
||
| 202 | Allow from all  | 
||
| 203 | </Directory>  | 
||
| 204 | </VirtualHost>  | 
||
| 205 | 65 | Patrice Nadeau | </code></pre>  | 
| 206 | |||
| 207 | Relancer Apache :  | 
||
| 208 | <pre><code class="bash">  | 
||
| 209 | 1 | Patrice Nadeau | systemctl reload apache2  | 
| 210 | 65 | Patrice Nadeau | </code></pre>  | 
| 211 | 45 | Patrice Nadeau | |
| 212 | 94 | Patrice Nadeau | h2. Post-installation  | 
| 213 | 68 | Patrice Nadeau | |
| 214 | 71 | Patrice Nadeau | A partir d’un navigateur web, se brancher à :  | 
| 215 | * Webrick : http://server:3000  | 
||
| 216 | * Apache : http://server  | 
||
| 217 | |||
| 218 | 69 | Patrice Nadeau | Utiliser l’usager *admin* avec le mot de passe *admin*.  | 
| 219 | 1 | Patrice Nadeau | Vérifier la configuration dans *Administration*, *Information*.  | 
| 220 | |||
| 221 | 80 | Patrice Nadeau | Si un avertissement apparait pour l’écriture des répertoires, changer les droits :  | 
| 222 | 82 | Patrice Nadeau | > Semble être nécessaire que pour Apache  | 
| 223 | 1 | Patrice Nadeau | <pre><code class="bash">  | 
| 224 | 82 | Patrice Nadeau | cd /srv/redmine  | 
| 225 | chmod 0777 public/plugin_assets  | 
||
| 226 | 83 | Patrice Nadeau | chmod 0777 files  | 
| 227 | 102 | Patrice Nadeau | chown -R wwwrun:www tmp  | 
| 228 | 80 | Patrice Nadeau | </code></pre>  | 
| 229 | 1 | Patrice Nadeau | |
| 230 | 94 | Patrice Nadeau | h2. Personnalisation  | 
| 231 | 29 | Patrice Nadeau | |
| 232 | 94 | Patrice Nadeau | h3. Ajout d’un logo  | 
| 233 | 36 | Patrice Nadeau | |
| 234 | Les informations viennent de : http://www.redmine.org/projects/redmine/wiki/Howto_add_a_logo_to_your_Redmine_banner  | 
||
| 235 | |||
| 236 | Copier le logo dans _/srv/redmine/public/images/logo.png_  | 
||
| 237 | 1 | Patrice Nadeau | |
| 238 | 37 | Patrice Nadeau | Modifier le fichier _/srv/redmine/app/views/layout/base.rhtml.erb_  | 
| 239 | * Ajouter la ligne  | 
||
| 240 | 1 | Patrice Nadeau | <pre><code class="ruby">  | 
| 241 | 37 | Patrice Nadeau | <img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>  | 
| 242 | </code></pre>  | 
||
| 243 | * Si on ne veux plus afficher le titre, mettre en commentaire :  | 
||
| 244 | 1 | Patrice Nadeau | <pre><code class="ruby">  | 
| 245 | 37 | Patrice Nadeau | <!--<h1><%= page_header_title %></h1>-->  | 
| 246 | </code></pre>  | 
||
| 247 | |||
| 248 | Redémarrer Redmine  | 
||
| 249 | 72 | Patrice Nadeau | |
| 250 | 36 | Patrice Nadeau | |
| 251 | 94 | Patrice Nadeau | h3. Plugins  | 
| 252 | 1 | Patrice Nadeau | |
| 253 | 94 | Patrice Nadeau | h4. Extended Fields  | 
| 254 | 38 | Patrice Nadeau | |
| 255 | Permet de créer de nouveau champ dans la basse de donnés.  | 
||
| 256 | |||
| 257 | http://www.redmine.org/plugins/extended_fields  | 
||
| 258 | |||
| 259 | Installation :  | 
||
| 260 | <pre><code class="bash">  | 
||
| 261 | cd /srv/redmine  | 
||
| 262 | 1 | Patrice Nadeau | svn co http://svn.s-andy.com/extended-fields plugins/extended_fields  | 
| 263 | 38 | Patrice Nadeau | rake redmine:plugins:migrate RAILS_ENV=production  | 
| 264 | </code></pre>  | 
||
| 265 | 73 | Patrice Nadeau | |
| 266 | 38 | Patrice Nadeau | Relancer Redmine  | 
| 267 | 4 | Patrice Nadeau | |
| 268 | 94 | Patrice Nadeau | h4. Redmine Rouge  | 
| 269 | 1 | Patrice Nadeau | |
| 270 | 4 | Patrice Nadeau | Permet le support de langage supplémentaire pour l'affichage de la syntaxe d'un code source.  | 
| 271 | 13 | Patrice Nadeau | |
| 272 | 1 | Patrice Nadeau | "Langage supporté":http://rouge.jayferd.us/demo  | 
| 273 | |||
| 274 | https://github.com/ngyuki/redmine_rouge  | 
||
| 275 | |||
| 276 | <pre>  | 
||
| 277 | <code class="bash">  | 
||
| 278 | cd /srv/redmine/plugins  | 
||
| 279 | git clone https://github.com/ngyuki/redmine_rouge.git  | 
||
| 280 | cd ..  | 
||
| 281 | bundle install  | 
||
| 282 | </code>  | 
||
| 283 | 74 | Patrice Nadeau | </pre>  | 
| 284 | |||
| 285 | Relancer redmine  | 
||
| 286 | 5 | Patrice Nadeau | |
| 287 | 94 | Patrice Nadeau | h4. Code Highlight  | 
| 288 | 9 | Patrice Nadeau | |
| 289 | 10 | Patrice Nadeau | http://www.redmine.org/plugins/codehightlight_button  | 
| 290 | 9 | Patrice Nadeau | |
| 291 | Bouton permettant de sélectionner du code et d'activer la syntaxe selon un langage.  | 
||
| 292 | |||
| 293 | 1 | Patrice Nadeau | Installation  | 
| 294 | <pre><code class="bash">  | 
||
| 295 | 10 | Patrice Nadeau | cd /srv/redmine/plugins  | 
| 296 | git clone https://github.com/mediatainment/redmine_codebutton.git  | 
||
| 297 | cd ..  | 
||
| 298 | rake redmine:plugins  | 
||
| 299 | 9 | Patrice Nadeau | rake redmine:plugins:migrate RAILS_ENV=production  | 
| 300 | 10 | Patrice Nadeau | # Relancer Redmine  | 
| 301 | 1 | Patrice Nadeau | rcredmine restart  | 
| 302 | 95 | Patrice Nadeau | </code></pre>  | 
| 303 | |||
| 304 | Ajout des langages supplémentaires supportées par le « plug-in » _Redmine Rouge_. Voir "ici":https://github.com/mediatainment/redmine_codebutton/issues/2  | 
||
| 305 | 96 | Patrice Nadeau | Éditer le fichier */srv/redmine/plugins/redmine_codebutton/assets/javascripts/wiki-codehighlight.js*  | 
| 306 | 95 | Patrice Nadeau | * Ajouter les langages voulus dans la variable *codeRayLanguages*  | 
| 307 | |||
| 308 | Relancer Apache  | 
||
| 309 | <pre><code class="bash">  | 
||
| 310 | systemctl reload apache2.service  | 
||
| 311 | 1 | Patrice Nadeau | </code></pre>  | 
| 312 | |||
| 313 | 94 | Patrice Nadeau | h4. Redmine Issue Checklist  | 
| 314 | 23 | Patrice Nadeau | |
| 315 | 1 | Patrice Nadeau | Extends issues to store checklist items  | 
| 316 | 11 | Patrice Nadeau | |
| 317 | http://redminecrm.com/projects/checklist  | 
||
| 318 | |||
| 319 | Installation  | 
||
| 320 | <pre><code class="bash">  | 
||
| 321 | cd /srv/redmine/plugins  | 
||
| 322 | wget http://redminecrm.com/license_manager/4200/redmine_issue_checklist-2_0_5.zip  | 
||
| 323 | unzip redmine_issue_checklist-2_0_5.zip  | 
||
| 324 | bundle exec rake redmine:plugins NAME=redmine_issue_checklist RAILS_ENV=production  | 
||
| 325 | 1 | Patrice Nadeau | </code></pre>  | 
| 326 | 84 | Patrice Nadeau | |
| 327 | Relancer Redmine  | 
||
| 328 | 11 | Patrice Nadeau | |
| 329 | Configuration  | 
||
| 330 | Dans *Administration*  | 
||
| 331 | 1 | Patrice Nadeau | * *Plugins*  | 
| 332 | 11 | Patrice Nadeau | ** Choisir les options voulues  | 
| 333 | * *Roles and permissions*  | 
||
| 334 | ** Choisir le rôle  | 
||
| 335 | Donner les droits voulus sur :  | 
||
| 336 | *** Done checklist items  | 
||
| 337 | *** Edit checklist items  | 
||
| 338 | 14 | Patrice Nadeau | *** View checklist  | 
| 339 | 1 | Patrice Nadeau | |
| 340 | 94 | Patrice Nadeau | h4. Redmine People  | 
| 341 | 24 | Patrice Nadeau | |
| 342 | 29 | Patrice Nadeau | > A faire  | 
| 343 | 24 | Patrice Nadeau | |
| 344 | 97 | Patrice Nadeau | h4. Like Button  | 
| 345 | |||
| 346 | Bouton pour Facebook, Google+ et Twitter  | 
||
| 347 | |||
| 348 | 98 | Patrice Nadeau | http://www.redmine.org/plugins/like  | 
| 349 | 97 | Patrice Nadeau | |
| 350 | 98 | Patrice Nadeau | Installation  | 
| 351 | 1 | Patrice Nadeau | |
| 352 | 98 | Patrice Nadeau | <pre><code class="bash">  | 
| 353 | cd /srv/redmine/plugins  | 
||
| 354 | svn svn co http://svn.s-andy.com/like-button like  | 
||
| 355 | </code></pre>  | 
||
| 356 | 100 | Patrice Nadeau | |
| 357 | 98 | Patrice Nadeau | Relancer Redmine  | 
| 358 | 97 | Patrice Nadeau | |
| 359 | 99 | Patrice Nadeau | |
| 360 | 94 | Patrice Nadeau | h4. WikiNG  | 
| 361 | 1 | Patrice Nadeau | |
| 362 | 20 | Patrice Nadeau | Personnalisation des items dans le wiki.  | 
| 363 | 28 | Patrice Nadeau | Ajoute des boutons et des icônes comme FIXME et TODO.  | 
| 364 | 29 | Patrice Nadeau | > « Écrase » le bouton installé par _Code Highlight_  | 
| 365 | 21 | Patrice Nadeau | |
| 366 | Installation  | 
||
| 367 | 27 | Patrice Nadeau | <pre><code class="bash">  | 
| 368 | 26 | Patrice Nadeau | cd /srv/redmine  | 
| 369 | wget http://projects.andriylesyuk.com/attachments/download/564/wiking-1.0.0b.tar.bz2  | 
||
| 370 | tar xvf wiking-1.0.0b.tar.bz2  | 
||
| 371 | mv wiking plugins  | 
||
| 372 | rake redmine:plugins:migrate RAILS_ENV=production  | 
||
| 373 | 1 | Patrice Nadeau | </code></pre>  | 
| 374 | 85 | Patrice Nadeau | |
| 375 | Relancer Redmine  | 
||
| 376 | |||
| 377 | 94 | Patrice Nadeau | h2. Mise à jour  | 
| 378 | 1 | Patrice Nadeau | |
| 379 | 101 | Patrice Nadeau | > Version 2.6.0  | 
| 380 | |||
| 381 | 9 | Patrice Nadeau | S’assurer d'avoir les dernières versions des plugins.  | 
| 382 | 1 | Patrice Nadeau | |
| 383 | 101 | Patrice Nadeau | Disponible à http://www.redmine.org/projects/redmine/wiki/Download  | 
| 384 | 1 | Patrice Nadeau | |
| 385 | 101 | Patrice Nadeau | Mise à jour de Redmine à partir d'une version stable  | 
| 386 | > http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade  | 
||
| 387 | 1 | Patrice Nadeau | |
| 388 | 101 | Patrice Nadeau | # Arreter Redmine  | 
| 389 | # Copier le repetoire actuel  | 
||
| 390 | 1 | Patrice Nadeau | <pre><code class="bash">  | 
| 391 | 101 | Patrice Nadeau | cd /srv/  | 
| 392 | mc redmine redmine.old  | 
||
| 393 | 1 | Patrice Nadeau | </code></pre>  | 
| 394 | 101 | Patrice Nadeau | # Telecharger la nouvelle version  | 
| 395 | 1 | Patrice Nadeau | <pre><code class="bash">  | 
| 396 | 101 | Patrice Nadeau | wget http://www.redmine.org/releases/redmine-2.6.0.tar.gz  | 
| 397 | 1 | Patrice Nadeau | </code></pre>  | 
| 398 | 101 | Patrice Nadeau | # Décompresser le fichier  | 
| 399 | 1 | Patrice Nadeau | <pre><code class="bash">  | 
| 400 | 101 | Patrice Nadeau | tar xvf redmine-2.6.0.tar.gz  | 
| 401 | mv redmine-2.6.0 redmine  | 
||
| 402 | 41 | Patrice Nadeau | </code></pre>  | 
| 403 | 101 | Patrice Nadeau | # Copier les anciens fichiers de configurations  | 
| 404 | 41 | Patrice Nadeau | <pre><code class="bash">  | 
| 405 | 101 | Patrice Nadeau | cp redmine.old/config/configuration.yml redmine/config  | 
| 406 | cp redmine.old/files redmine  | 
||
| 407 | # Les commandes suivantes sont nécessaire seulement si Apache est utilisé  | 
||
| 408 | chown -R wwwrun:www tmp  | 
||
| 409 | chmod 0777 public/plugin_assets  | 
||
| 410 | chmod 0777 files  | 
||
| 411 | </code></pre>  | 
||
| 412 | # Ne copier que les « plugins » qui ne sont pas fournis par la nouvelle version de Redmine  | 
||
| 413 | <pre><code class="bash">  | 
||
| 414 | cp redmine/plugins/* redmine/plugins  | 
||
| 415 | </code></pre>  | 
||
| 416 | </code></pre>  | 
||
| 417 | # Installer les « gems »  | 
||
| 418 | <pre><code class="bash">  | 
||
| 419 | 87 | Patrice Nadeau | bundle install --without development test  | 
| 420 | </code></pre>  | 
||
| 421 | 101 | Patrice Nadeau | # Mise à jour (base de donnés, « plugins ») et ménage :  | 
| 422 | 94 | Patrice Nadeau | <pre><code class="bash">  | 
| 423 | 101 | Patrice Nadeau | bundle exec rake generate_secret_token  | 
| 424 | bundle rake db:migrate RAILS_ENV=production  | 
||
| 425 | bundle rake redmine:plugins:migrate RAILS_ENV=production  | 
||
| 426 | bundle exec rake tmp:cache:clear tmp:sessions:clear  | 
||
| 427 | 40 | Patrice Nadeau | </code></pre>  | 
| 428 | 101 | Patrice Nadeau | # Relancer Redmine  | 
| 429 | # Vérifier dans « Admin -> Roles & permissions » les permissions.  | 
||
| 430 | 40 | Patrice Nadeau | |
| 431 | h2. Copie de sécurité  | 
||
| 432 | |||
| 433 | Remplacer les items suivants :  | 
||
| 434 | * *username* : Usager de la base de donnés.  | 
||
| 435 | 86 | Patrice Nadeau | * *password* : Mot de passe de la base de donnés.  | 
| 436 | 5 | Patrice Nadeau | * *database* : Nom de la base de données.  | 
| 437 | 42 | Patrice Nadeau | * *path* : Emplacement pour recevoir le fichier.  | 
| 438 | 5 | Patrice Nadeau | |
| 439 | <pre><code class="bash">  | 
||
| 440 | /usr/bin/mysqldump -u username -p password database | gzip > /path/redmine_`date +%y_%m_%d`.gz  | 
||
| 441 | rsync -a /srv/redmine/files /path/  | 
||
| 442 | 1 | Patrice Nadeau | </code></pre>  | 
| 443 | 40 | Patrice Nadeau | |
| 444 | 5 | Patrice Nadeau | Script un peu plus évolué :  | 
| 445 | <pre> <code class="bash">  | 
||
| 446 | |||
| 447 | #!/bin/bash  | 
||
| 448 | #  | 
||
| 449 | # backup_redmine.sh  | 
||
| 450 | # Backup of a Redmine setup  | 
||
| 451 | # Last Changes: 2013-02-23  | 
||
| 452 | # Maintainer: Patrice Nadeau <pnadeau@patricenadeau.com>  | 
||
| 453 | |||
| 454 | # TODO Verify the results (folder exist, enough disk pace , etc..)  | 
||
| 455 | |||
| 456 | ## The only variable needed to be changed  | 
||
| 457 | # Directory of the Redmine install  | 
||
| 458 | declare -r RAIL_ROOT='/srv/redmine'  | 
||
| 459 | # MySQL database  | 
||
| 460 | declare -r MYSQL_DB=''  | 
||
| 461 | # MySQL username for the Redemine db  | 
||
| 462 | declare -r MYSQL_USER=''  | 
||
| 463 | # MySQL password for the Redemine db  | 
||
| 464 | declare -r MYSQL_PASSWORD=''  | 
||
| 465 | # Directory for the backup (must exist and with no space in the name)  | 
||
| 466 | declare -r DIR='/root'  | 
||
| 467 | ## end  | 
||
| 468 | |||
| 469 | # Exit level  | 
||
| 470 | declare -ir EXIT_OK=0  | 
||
| 471 | declare -ir EXIT_WARNING=1  | 
||
| 472 | declare -ir EXIT_ERROR=2  | 
||
| 473 | |||
| 474 | declare -i STATUS=$EXIT_OK  | 
||
| 475 | |||
| 476 | # The directory inside the archive  | 
||
| 477 | declare -r REDMINE='redmine'  | 
||
| 478 | TMP_DIR=$DIR/$REDMINE  | 
||
| 479 | |||
| 480 | # This will be used for the archive file  | 
||
| 481 | declare -r DST=$DIR/redmine_$(date +%Y%m%d_%H%M%S).tar.gz  | 
||
| 482 | |||
| 483 | # The temporary sql file  | 
||
| 484 | declare -r TMP_MYSQL=$TMP_DIR/$MYSQL_DB.mysql  | 
||
| 485 | |||
| 486 | echo "Backup in progress in $DST"  | 
||
| 487 | |||
| 488 | #### Create the temp directory ####  | 
||
| 489 | mkdir $TMP_DIR  | 
||
| 490 | |||
| 491 | #### backup MySQL ####  | 
||
| 492 | if [ $STATUS -eq $EXIT_OK ]  | 
||
| 493 | then  | 
||
| 494 | STEP='Creating MySQL backup'  | 
||
| 495 | mysqldump --user=$MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DB \  | 
||
| 496 | 1 | Patrice Nadeau | > $TMP_MYSQL  | 
| 497 | 5 | Patrice Nadeau | STATUS=$?  | 
| 498 | 1 | Patrice Nadeau | fi  | 
| 499 | 5 | Patrice Nadeau | |
| 500 | 1 | Patrice Nadeau | #### backup the Redmine folder ####  | 
| 501 | 5 | Patrice Nadeau | if [ $STATUS -eq $EXIT_OK ]  | 
| 502 | then  | 
||
| 503 | STEP='Creating Redmine'"'"' files backup'  | 
||
| 504 | cp --recursive $RAIL_ROOT $TMP_DIR  | 
||
| 505 | STATUS=$?  | 
||
| 506 | fi  | 
||
| 507 | |||
| 508 | #### create the archive file ####  | 
||
| 509 | if [ $STATUS -eq $EXIT_OK ]  | 
||
| 510 | then  | 
||
| 511 | STEP="Creating archive"  | 
||
| 512 | tar --create --gzip --file $DST --directory=$DIR $REDMINE  | 
||
| 513 | STATUS=$?  | 
||
| 514 | fi  | 
||
| 515 | |||
| 516 | #### cleanup ####  | 
||
| 517 | if [ $STATUS -eq $EXIT_OK ]  | 
||
| 518 | then  | 
||
| 519 | STEP='Cleaning up'  | 
||
| 520 | rm --recursive --force $TMP_DIR  | 
||
| 521 | STATUS=$?  | 
||
| 522 | fi  | 
||
| 523 | |||
| 524 | #### exit ####  | 
||
| 525 | if [ $STATUS -eq $EXIT_OK ]  | 
||
| 526 | then  | 
||
| 527 | 39 | Patrice Nadeau | echo "Backup done"  | 
| 528 | 94 | Patrice Nadeau | else  | 
| 529 | 39 | Patrice Nadeau | echo "Bakup failed with error code $STATUS in step $STEP"  | 
| 530 | 94 | Patrice Nadeau | fi  | 
| 531 | 39 | Patrice Nadeau | |
| 532 | |||
| 533 | exit $STATUS  | 
||
| 534 | 94 | Patrice Nadeau | |
| 535 | 39 | Patrice Nadeau | </code></pre>  | 
| 536 | |||
| 537 | 1 | Patrice Nadeau | h2. Dépannage  | 
| 538 | |||
| 539 | h3. Mot de passe perdu  | 
||
| 540 | |||
| 541 | Le mot de passe admin par défaut est en _hash Sha1_ : *da3174755c5e82a436b6c7ff87c873ee50d6654b* et est *admin.*  | 
||
| 542 | |||
| 543 | h3. Le service tombe « DEAD » à chaque fois (webrick)  | 
||
| 544 | |||
| 545 | Effacer le fichier _/srv/redmine/tmp/pids/server.pid_.  |