Projet

Général

Profil

Redmine » Historique » Version 11

Mehdi Abaakouk, 23/06/2016 17:14

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