===========================
Gitlab 5.0のインストール (CentOS 6.5)
Gitlabアップデート 5.0 -> 6.0
Gitlabアップデート 6.0 -> 7.2
の後に行った作業です。
Requirements
- CentOS (Tested on 6.5)
- ruby (Tested on 2.1.2)
Upgrade
- gitlab停止
service gitlab stop
- バックアップ
su - git
cd /home/git/gitlab
bundle exec rake gitlab:backup:create RAILS_ENV=production
- アップグレードスクリプトでGitlab本体をアップグレード
su - git
cd /home/git/gitlab
if [ -f bin/upgrade.rb ]; then ruby bin/upgrade.rb; else ruby script/upgrade.rb; fi
- unicornのtimeoutを60秒に修正する(既に設定してあればそのまま)
vim config/unicorn.rb
-timeout 30
+timeout 60
- mysqlの接続設定を変更する
production:
-pool: 5
+pool: 10
+collation: utf8_general_ci
poolを増やしている。
- gitlab-shellをアップグレード
su - git
cd /home/git/gitlab-shell
git checkout v2.2.0
- gitlab-shellが利用するgitlabのURLを修正
cd /home/git/gitlab-shell
vim config.yml
-gitlab_url: "http://localhost:3000/"
+gitlab_url: "https://gitlab.example.com/"
vim lib/gitlab_config.rb
-@config['gitlab_url'] ||= "http://localhost:3000/"
+@config['gitlab_url'] ||= "https://gitlab.example.com/"
- 起動
service gitlab start
Trouble shooting
- ログを見てみる
cd /home/git/gitlab/log
tail -f *.log
-
ActionView::Template::Error
のようなエラーが出て500になる
config/gitlab.yml
内のgitのpathが合ってるか確認しましょう。
- submoduleを含むフォルダで500になる
submoduleを削除で解決します。もう一度追加すれば戻るかも。
- 日本語を含むタグ・ブランチ
消しましょう。