Wiki » Historique » Version 10
Patrice Nadeau, 2014-07-19 10:54
| 1 | 1 | Patrice Nadeau | {{toc}} |
|---|---|---|---|
| 2 | |||
| 3 | 6 | Patrice Nadeau | h1. Readmine |
| 4 | |||
| 5 | h1. Installation |
||
| 6 | |||
| 7 | h2. Prérequis |
||
| 8 | 1 | Patrice Nadeau | |
| 9 | 7 | Patrice Nadeau | h1. Personalisation |
| 10 | |||
| 11 | 8 | Patrice Nadeau | h2. Plugins |
| 12 | 1 | Patrice Nadeau | |
| 13 | h3. Redmine Rouge |
||
| 14 | 4 | Patrice Nadeau | |
| 15 | 1 | Patrice Nadeau | Plugin pour le "syntax highlight. |
| 16 | 4 | Patrice Nadeau | |
| 17 | "Language supporté":http://rouge.jayferd.us/demo |
||
| 18 | 1 | Patrice Nadeau | |
| 19 | https://github.com/ngyuki/redmine_rouge |
||
| 20 | |||
| 21 | <pre> |
||
| 22 | <code class="bash"> |
||
| 23 | cd /srv/redmine/plugins |
||
| 24 | git clone https://github.com/ngyuki/redmine_rouge.git |
||
| 25 | cd .. |
||
| 26 | bundle install |
||
| 27 | 2 | Patrice Nadeau | # Relancer redmine |
| 28 | rcredmine restart |
||
| 29 | 1 | Patrice Nadeau | </code> |
| 30 | </pre> |
||
| 31 | 5 | Patrice Nadeau | |
| 32 | 10 | Patrice Nadeau | h3. mine_codebutton |
| 33 | 9 | Patrice Nadeau | |
| 34 | 10 | Patrice Nadeau | http://www.redmine.org/plugins/codehightlight_button |
| 35 | 9 | Patrice Nadeau | |
| 36 | Bouton permettant de sélectionner du code et d'activer la syntaxe selon un langage. |
||
| 37 | >Ne fonctionne pas pour les langages supplémentaires supportées par le plug-in _Redmine Rouge_. Voir "ici":https://github.com/mediatainment/redmine_codebutton/issues/2 |
||
| 38 | |||
| 39 | 1 | Patrice Nadeau | Installation |
| 40 | <pre><code class="bash"> |
||
| 41 | 10 | Patrice Nadeau | cd /srv/redmine/plugins |
| 42 | git clone https://github.com/mediatainment/redmine_codebutton.git |
||
| 43 | cd .. |
||
| 44 | rake redmine:plugins |
||
| 45 | 9 | Patrice Nadeau | rake redmine:plugins:migrate RAILS_ENV=production |
| 46 | 10 | Patrice Nadeau | # Relancer Redmine |
| 47 | 9 | Patrice Nadeau | rcredmine restart |
| 48 | </code></pre> |
||
| 49 | |||
| 50 | 5 | Patrice Nadeau | h1. Copie de securité |
| 51 | |||
| 52 | <pre> <code class="bash"> |
||
| 53 | #!/bin/bash |
||
| 54 | # |
||
| 55 | # backup_redmine.sh |
||
| 56 | # Backup of a Redmine setup |
||
| 57 | # Last Changes: 2013-02-23 |
||
| 58 | # Maintainer: Patrice Nadeau <patricen@telwarwick.net> |
||
| 59 | |||
| 60 | # TODO Verify the results (folder exist, enough disk pace , etc..) |
||
| 61 | |||
| 62 | ## The only variable needed to be changed |
||
| 63 | # Directory of the Redmine install |
||
| 64 | declare -r RAIL_ROOT='/srv/redmine' |
||
| 65 | # MySQL database |
||
| 66 | declare -r MYSQL_DB='' |
||
| 67 | # MySQL username for the Redemine db |
||
| 68 | declare -r MYSQL_USER='' |
||
| 69 | # MySQL password for the Redemine db |
||
| 70 | declare -r MYSQL_PASSWORD='' |
||
| 71 | # Directory for the backup (must exist and with no space in the name) |
||
| 72 | declare -r DIR='/root' |
||
| 73 | ## end |
||
| 74 | |||
| 75 | # Exit level |
||
| 76 | declare -ir EXIT_OK=0 |
||
| 77 | declare -ir EXIT_WARNING=1 |
||
| 78 | declare -ir EXIT_ERROR=2 |
||
| 79 | |||
| 80 | declare -i STATUS=$EXIT_OK |
||
| 81 | |||
| 82 | # The directory inside the archive |
||
| 83 | declare -r REDMINE='redmine' |
||
| 84 | TMP_DIR=$DIR/$REDMINE |
||
| 85 | |||
| 86 | # This will be used for the archive file |
||
| 87 | declare -r DST=$DIR/redmine_$(date +%Y%m%d_%H%M%S).tar.gz |
||
| 88 | |||
| 89 | # The temporary sql file |
||
| 90 | declare -r TMP_MYSQL=$TMP_DIR/$MYSQL_DB.mysql |
||
| 91 | |||
| 92 | echo "Backup in progress in $DST" |
||
| 93 | |||
| 94 | #### Create the temp directory #### |
||
| 95 | mkdir $TMP_DIR |
||
| 96 | |||
| 97 | #### backup MySQL #### |
||
| 98 | if [ $STATUS -eq $EXIT_OK ] |
||
| 99 | then |
||
| 100 | STEP='Creating MySQL backup' |
||
| 101 | mysqldump --user=$MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DB \ |
||
| 102 | > $TMP_MYSQL |
||
| 103 | STATUS=$? |
||
| 104 | fi |
||
| 105 | |||
| 106 | #### backup the Redmine folder #### |
||
| 107 | if [ $STATUS -eq $EXIT_OK ] |
||
| 108 | then |
||
| 109 | STEP='Creating Redmine'"'"' files backup' |
||
| 110 | cp --recursive $RAIL_ROOT $TMP_DIR |
||
| 111 | STATUS=$? |
||
| 112 | fi |
||
| 113 | |||
| 114 | #### create the archive file #### |
||
| 115 | if [ $STATUS -eq $EXIT_OK ] |
||
| 116 | then |
||
| 117 | STEP="Creating archive" |
||
| 118 | tar --create --gzip --file $DST --directory=$DIR $REDMINE |
||
| 119 | STATUS=$? |
||
| 120 | fi |
||
| 121 | |||
| 122 | #### cleanup #### |
||
| 123 | if [ $STATUS -eq $EXIT_OK ] |
||
| 124 | then |
||
| 125 | STEP='Cleaning up' |
||
| 126 | rm --recursive --force $TMP_DIR |
||
| 127 | STATUS=$? |
||
| 128 | fi |
||
| 129 | |||
| 130 | #### exit #### |
||
| 131 | if [ $STATUS -eq $EXIT_OK ] |
||
| 132 | then |
||
| 133 | echo "Backup done" |
||
| 134 | else |
||
| 135 | echo "Bakup failed with error code $STATUS in step $STEP" |
||
| 136 | fi |
||
| 137 | |||
| 138 | |||
| 139 | exit $STATUS |
||
| 140 | |||
| 141 | </code></pre> |