Projet

Général

Profil

Redmine » Historique » Version 9

Mehdi Abaakouk, 01/09/2015 23:54

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 2 Mehdi Abaakouk
15 6 Mehdi Abaakouk
h2. Upgrade
16 6 Mehdi Abaakouk
17 8 Mehdi Abaakouk
<pre>
18 6 Mehdi Abaakouk
# /etc/init.d/apache2 stop
19 6 Mehdi Abaakouk
# su - postgres
20 9 Mehdi Abaakouk
# pgdump redmine > redmine-3.1.X-20150901.sql
21 6 Mehdi Abaakouk
# exit
22 6 Mehdi Abaakouk
#
23 6 Mehdi Abaakouk
# ssh -Tf -D9999 h2 -p 2222  sleep 15m
24 6 Mehdi Abaakouk
# 
25 6 Mehdi Abaakouk
# cd /srv/http/redmine
26 1 Laurent GUERBY
# tsocks git fetch pull --rebase
27 1 Laurent GUERBY
28 9 Mehdi Abaakouk
# # Checkout version compatible with redmine 3.1.X
29 9 Mehdi Abaakouk
30 9 Mehdi Abaakouk
# cd plugins/redmine_git_hosting
31 9 Mehdi Abaakouk
# git checkout 1.1.3
32 9 Mehdi Abaakouk
# vi Gemfile
33 9 Mehdi Abaakouk
### comment redcap gem
34 9 Mehdi Abaakouk
# cd plugins/redmine_bootstrap_kit
35 9 Mehdi Abaakouk
# git checkout 0.2.3
36 6 Mehdi Abaakouk
# cd /srv/http/redmine
37 6 Mehdi Abaakouk
38 6 Mehdi Abaakouk
# tsocks bundle update
39 6 Mehdi Abaakouk
# gem cleanup
40 1 Laurent GUERBY
# tsocks bundle update
41 6 Mehdi Abaakouk
# bundle exec rake generate_secret_token
42 6 Mehdi Abaakouk
# bundle exec rake db:migrate RAILS_ENV=production
43 6 Mehdi Abaakouk
# bundle exec rake redmine:plugins:migrate RAILS_ENV=production
44 9 Mehdi Abaakouk
# bundle exec rake tmp:cache:clear tmp:sessions:clear RAILS_ENV=production
45 8 Mehdi Abaakouk
</pre>
46 2 Mehdi Abaakouk
47 2 Mehdi Abaakouk
h2. Investigation Erreur 500
48 2 Mehdi Abaakouk
49 5 Laurent GUERBY
http://lists.tetaneutral.net/pipermail/technique/2014-May/001335.html
50 5 Laurent GUERBY
51 2 Mehdi Abaakouk
Erreur dans /srv/http/redmine/log/production.log:
52 2 Mehdi Abaakouk
53 2 Mehdi Abaakouk
<pre>
54 2 Mehdi Abaakouk
Completed 500 Internal Server Error in 23.2ms
55 2 Mehdi Abaakouk
56 2 Mehdi Abaakouk
ActiveRecord::RecordNotUnique (PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "wiki_content_versions_pkey"
57 2 Mehdi Abaakouk
DETAIL:  Key (id)=(164) already exists.
58 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"):
59 2 Mehdi Abaakouk
</pre>
60 2 Mehdi Abaakouk
61 2 Mehdi Abaakouk
<pre>
62 2 Mehdi Abaakouk
# su - postgres
63 2 Mehdi Abaakouk
# psql redmine
64 3 Mehdi Abaakouk
# select max(id) from wiki_content_versions;
65 4 Mehdi Abaakouk
max  
66 4 Mehdi Abaakouk
------
67 4 Mehdi Abaakouk
 6193
68 4 Mehdi Abaakouk
(1 row)
69 3 Mehdi Abaakouk
# alter sequence wiki_content_versions_id_seq start 6194;
70 3 Mehdi Abaakouk
# alter sequence wiki_content_versions_id_seq restart;
71 2 Mehdi Abaakouk
</pre>