Wiki » Historique » Version 9
Patrice Nadeau, 2014-07-19 10:29
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 | 9 | Patrice Nadeau | h3. redmine_codebutton |
33 | |||
34 | https://github.com/mediatainment/redmine_codebutton |
||
35 | |||
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 | Installation |
||
40 | <pre><code class="bash"> |
||
41 | cd /srv/redmine |
||
42 | git clone git://github.com/mediatainment/redmine_codebutton.git plugins/redmine_codebutton |
||
43 | rake redmine:plugins:migrate RAILS_ENV=production |
||
44 | rcredmine restart |
||
45 | </code></pre> |
||
46 | |||
47 | 5 | Patrice Nadeau | h1. Copie de securité |
48 | |||
49 | <pre> <code class="bash"> |
||
50 | #!/bin/bash |
||
51 | # |
||
52 | # backup_redmine.sh |
||
53 | # Backup of a Redmine setup |
||
54 | # Last Changes: 2013-02-23 |
||
55 | # Maintainer: Patrice Nadeau <patricen@telwarwick.net> |
||
56 | |||
57 | # TODO Verify the results (folder exist, enough disk pace , etc..) |
||
58 | |||
59 | ## The only variable needed to be changed |
||
60 | # Directory of the Redmine install |
||
61 | declare -r RAIL_ROOT='/srv/redmine' |
||
62 | # MySQL database |
||
63 | declare -r MYSQL_DB='' |
||
64 | # MySQL username for the Redemine db |
||
65 | declare -r MYSQL_USER='' |
||
66 | # MySQL password for the Redemine db |
||
67 | declare -r MYSQL_PASSWORD='' |
||
68 | # Directory for the backup (must exist and with no space in the name) |
||
69 | declare -r DIR='/root' |
||
70 | ## end |
||
71 | |||
72 | # Exit level |
||
73 | declare -ir EXIT_OK=0 |
||
74 | declare -ir EXIT_WARNING=1 |
||
75 | declare -ir EXIT_ERROR=2 |
||
76 | |||
77 | declare -i STATUS=$EXIT_OK |
||
78 | |||
79 | # The directory inside the archive |
||
80 | declare -r REDMINE='redmine' |
||
81 | TMP_DIR=$DIR/$REDMINE |
||
82 | |||
83 | # This will be used for the archive file |
||
84 | declare -r DST=$DIR/redmine_$(date +%Y%m%d_%H%M%S).tar.gz |
||
85 | |||
86 | # The temporary sql file |
||
87 | declare -r TMP_MYSQL=$TMP_DIR/$MYSQL_DB.mysql |
||
88 | |||
89 | echo "Backup in progress in $DST" |
||
90 | |||
91 | #### Create the temp directory #### |
||
92 | mkdir $TMP_DIR |
||
93 | |||
94 | #### backup MySQL #### |
||
95 | if [ $STATUS -eq $EXIT_OK ] |
||
96 | then |
||
97 | STEP='Creating MySQL backup' |
||
98 | mysqldump --user=$MYSQL_USER --password=$MYSQL_PASSWORD $MYSQL_DB \ |
||
99 | > $TMP_MYSQL |
||
100 | STATUS=$? |
||
101 | fi |
||
102 | |||
103 | #### backup the Redmine folder #### |
||
104 | if [ $STATUS -eq $EXIT_OK ] |
||
105 | then |
||
106 | STEP='Creating Redmine'"'"' files backup' |
||
107 | cp --recursive $RAIL_ROOT $TMP_DIR |
||
108 | STATUS=$? |
||
109 | fi |
||
110 | |||
111 | #### create the archive file #### |
||
112 | if [ $STATUS -eq $EXIT_OK ] |
||
113 | then |
||
114 | STEP="Creating archive" |
||
115 | tar --create --gzip --file $DST --directory=$DIR $REDMINE |
||
116 | STATUS=$? |
||
117 | fi |
||
118 | |||
119 | #### cleanup #### |
||
120 | if [ $STATUS -eq $EXIT_OK ] |
||
121 | then |
||
122 | STEP='Cleaning up' |
||
123 | rm --recursive --force $TMP_DIR |
||
124 | STATUS=$? |
||
125 | fi |
||
126 | |||
127 | #### exit #### |
||
128 | if [ $STATUS -eq $EXIT_OK ] |
||
129 | then |
||
130 | echo "Backup done" |
||
131 | else |
||
132 | echo "Bakup failed with error code $STATUS in step $STEP" |
||
133 | fi |
||
134 | |||
135 | |||
136 | exit $STATUS |
||
137 | |||
138 | </code></pre> |