Projet

Général

Profil

Redmine » Historique » Version 10

Mehdi Abaakouk, 17/11/2015 22:11

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