Redmine » Historique » Version 15
Skuld Skuld, 20/07/2017 21:35
1 | 1 | Laurent GUERBY | {{>toc}} |
---|---|---|---|
2 | 1 | Laurent GUERBY | |
3 | 1 | Laurent GUERBY | h1. Redmine |
4 | 1 | Laurent GUERBY | |
5 | 7 | Mehdi Abaakouk | La machine chiliproject contient: |
6 | 7 | Mehdi Abaakouk | |
7 | 7 | Mehdi Abaakouk | - une base données postgres |
8 | 7 | Mehdi Abaakouk | - une application installé dans /srv/http/redmine |
9 | 7 | Mehdi Abaakouk | - le git de git.tetaneutral.net dans /srv/http/repositories |
10 | 7 | Mehdi Abaakouk | |
11 | 1 | Laurent GUERBY | h2. Liens |
12 | 1 | Laurent GUERBY | |
13 | 1 | Laurent GUERBY | * https://wiki.ldn-fai.net/wiki/Redmine#Par_mail ouvrir un ticket redmine par mail |
14 | 10 | Mehdi Abaakouk | * https://github.com/sileht/redmine-stupid-captcha - simple captcha pour tetaneutral.net |
15 | 2 | Mehdi Abaakouk | |
16 | 6 | Mehdi Abaakouk | h2. Upgrade |
17 | 6 | Mehdi Abaakouk | |
18 | 14 | Mehdi Abaakouk | Example d'upgrade de 3.3.0 vers 3.3.2: |
19 | 14 | Mehdi Abaakouk | <pre> |
20 | 14 | Mehdi Abaakouk | # /etc/init.d/apache2 stop |
21 | 14 | Mehdi Abaakouk | # su - postgres |
22 | 14 | Mehdi Abaakouk | # pg_dump redmine > redmine-3.3.X-20170126.sql |
23 | 14 | Mehdi Abaakouk | # exit |
24 | 14 | Mehdi Abaakouk | |
25 | 14 | Mehdi Abaakouk | # cd /srv/http/redmine |
26 | 14 | Mehdi Abaakouk | # git fetch --all |
27 | 14 | Mehdi Abaakouk | # git pull --rebase origin/3.3-stable |
28 | 14 | Mehdi Abaakouk | |
29 | 14 | Mehdi Abaakouk | # cd plugins/redmine_git_hosting |
30 | 14 | Mehdi Abaakouk | # git stash # remets redcap dans les gems |
31 | 14 | Mehdi Abaakouk | # git fetch --all |
32 | 14 | Mehdi Abaakouk | # git tag | tail |
33 | 14 | Mehdi Abaakouk | 1.2.0 |
34 | 14 | Mehdi Abaakouk | 1.2.1 |
35 | 14 | Mehdi Abaakouk | 1.2.2 |
36 | 14 | Mehdi Abaakouk | # git checkout 1.2.2 |
37 | 14 | Mehdi Abaakouk | # git stash pop # re-enleve redcap dans les gems |
38 | 14 | Mehdi Abaakouk | |
39 | 14 | Mehdi Abaakouk | # cd ..plugins/redmine_bootstrap_kit |
40 | 14 | Mehdi Abaakouk | # git fetch --all |
41 | 14 | Mehdi Abaakouk | # git tag | tail |
42 | 14 | Mehdi Abaakouk | 0.2.4 |
43 | 14 | Mehdi Abaakouk | 0.2.5 |
44 | 14 | Mehdi Abaakouk | # git checkout 0.2.5 |
45 | 14 | Mehdi Abaakouk | |
46 | 14 | Mehdi Abaakouk | # cd ..plugins/redmine_startpage |
47 | 14 | Mehdi Abaakouk | # git pull --rebase # Ce project n'a que une branch master |
48 | 14 | Mehdi Abaakouk | |
49 | 14 | Mehdi Abaakouk | # cd ..plugins/redmine_revision_diff |
50 | 14 | Mehdi Abaakouk | # git fetch --all |
51 | 14 | Mehdi Abaakouk | # git tag | tail |
52 | 14 | Mehdi Abaakouk | v0.1.1 |
53 | 14 | Mehdi Abaakouk | v0.1.2 |
54 | 14 | Mehdi Abaakouk | # git checkout v0.1.2 |
55 | 14 | Mehdi Abaakouk | |
56 | 14 | Mehdi Abaakouk | # cd /srv/http/redmine |
57 | 14 | Mehdi Abaakouk | # bundle update |
58 | 14 | Mehdi Abaakouk | # gem cleanup # ignorer les erreurs |
59 | 14 | Mehdi Abaakouk | # bundle update |
60 | 14 | Mehdi Abaakouk | # bundle exec rake db:migrate RAILS_ENV=production |
61 | 14 | Mehdi Abaakouk | # bundle exec rake redmine:plugins:migrate RAILS_ENV=production |
62 | 14 | Mehdi Abaakouk | # bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production |
63 | 14 | Mehdi Abaakouk | |
64 | 14 | Mehdi Abaakouk | </pre> |
65 | 14 | Mehdi Abaakouk | |
66 | 6 | Mehdi Abaakouk | Example d'upgrade de 3.1.X vers 3.3.X: |
67 | 1 | Laurent GUERBY | |
68 | 13 | Mehdi Abaakouk | <pre> |
69 | 6 | Mehdi Abaakouk | # /etc/init.d/apache2 stop |
70 | 6 | Mehdi Abaakouk | # su - postgres |
71 | 11 | Mehdi Abaakouk | # pg_dump redmine > redmine-3.1.X-20160623.sql |
72 | 1 | Laurent GUERBY | # exit |
73 | 1 | Laurent GUERBY | # |
74 | 12 | Mehdi Abaakouk | # cd /srv/http/redmine |
75 | 13 | Mehdi Abaakouk | # git fetch --all |
76 | 1 | Laurent GUERBY | |
77 | 12 | Mehdi Abaakouk | ## For minor upgrade |
78 | 13 | Mehdi Abaakouk | # git pull --rebase origin/3.1-stable |
79 | 13 | Mehdi Abaakouk | |
80 | 12 | Mehdi Abaakouk | ## For major upgrade |
81 | 12 | Mehdi Abaakouk | # git checkout origin/3.3-stable -b ttnn/3.3 |
82 | 13 | Mehdi Abaakouk | # git log origin/3.1-stable..ttnn/3.1 --pretty='%h - %s' |
83 | 12 | Mehdi Abaakouk | # git cherry-pick ... # pour chaque commit custom de ttnn listé précédement |
84 | 9 | Mehdi Abaakouk | |
85 | 12 | Mehdi Abaakouk | # # Checkout plugins version compatible with redmine 3.3.X |
86 | 12 | Mehdi Abaakouk | |
87 | 1 | Laurent GUERBY | # cd plugins/redmine_git_hosting |
88 | 9 | Mehdi Abaakouk | # git fetch --all |
89 | 9 | Mehdi Abaakouk | # git checkout 1.2.1 |
90 | 12 | Mehdi Abaakouk | # vi Gemfile |
91 | 12 | Mehdi Abaakouk | ### comment redcap gem |
92 | 6 | Mehdi Abaakouk | # cd plugins/redmine_bootstrap_kit |
93 | 6 | Mehdi Abaakouk | # git fetch --all |
94 | 1 | Laurent GUERBY | # git checkout 0.2.4 |
95 | 1 | Laurent GUERBY | # cd /srv/http/redmine |
96 | 1 | Laurent GUERBY | |
97 | 14 | Mehdi Abaakouk | # bundle update |
98 | 14 | Mehdi Abaakouk | # gem cleanup # ignorer les erreurs |
99 | 14 | Mehdi Abaakouk | # bundle update |
100 | 6 | Mehdi Abaakouk | # bundle exec rake generate_secret_token |
101 | 6 | Mehdi Abaakouk | # bundle exec rake db:migrate RAILS_ENV=production |
102 | 6 | Mehdi Abaakouk | # bundle exec rake redmine:plugins:migrate RAILS_ENV=production |
103 | 9 | Mehdi Abaakouk | # bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production |
104 | 8 | Mehdi Abaakouk | </pre> |
105 | 2 | Mehdi Abaakouk | |
106 | 2 | Mehdi Abaakouk | h2. Investigation Erreur 500 |
107 | 2 | Mehdi Abaakouk | |
108 | 5 | Laurent GUERBY | http://lists.tetaneutral.net/pipermail/technique/2014-May/001335.html |
109 | 5 | Laurent GUERBY | |
110 | 2 | Mehdi Abaakouk | Erreur dans /srv/http/redmine/log/production.log: |
111 | 2 | Mehdi Abaakouk | |
112 | 2 | Mehdi Abaakouk | <pre> |
113 | 2 | Mehdi Abaakouk | Completed 500 Internal Server Error in 23.2ms |
114 | 2 | Mehdi Abaakouk | |
115 | 2 | Mehdi Abaakouk | ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "wiki_content_versions_pkey" |
116 | 2 | Mehdi Abaakouk | DETAIL: Key (id)=(164) already exists. |
117 | 2 | Mehdi Abaakouk | : INSERT INTO "wiki_content_versions" ("author_id", "comments", "compression", "data", "page_id", "updated_on", "version", "wiki_content_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING "id"): |
118 | 2 | Mehdi Abaakouk | </pre> |
119 | 2 | Mehdi Abaakouk | |
120 | 2 | Mehdi Abaakouk | <pre> |
121 | 2 | Mehdi Abaakouk | # su - postgres |
122 | 2 | Mehdi Abaakouk | # psql redmine |
123 | 3 | Mehdi Abaakouk | # select max(id) from wiki_content_versions; |
124 | 4 | Mehdi Abaakouk | max |
125 | 4 | Mehdi Abaakouk | ------ |
126 | 4 | Mehdi Abaakouk | 6193 |
127 | 4 | Mehdi Abaakouk | (1 row) |
128 | 3 | Mehdi Abaakouk | # alter sequence wiki_content_versions_id_seq start 6194; |
129 | 3 | Mehdi Abaakouk | # alter sequence wiki_content_versions_id_seq restart; |
130 | 2 | Mehdi Abaakouk | </pre> |