LoginSignup
15
12

More than 5 years have passed since last update.

GitLab逆引きメモ

Last updated at Posted at 2016-03-01

必要に迫られたGitLab関連の逆引きメモになります。

アップデートに失敗する場合

環境としてはCentOS7yum updateで下記のようなエラーが出る場合です。

gitlab preinstall: It seems you are upgrading from x.x version series
gitlab preinstall: to c.x series. It is recommended to upgrade
gitlab preinstall: to the last minor version in a major version series first before
gitlab preinstall: jumping to the next major version.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
gitlab preinstall: and upgrade to x.x first.
error: %pre(gitlab-ce-x.x.x-ce.0.el7.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package gitlab-ce-x.x.x-ce.0.el7.x86_64
  1. yum list installed | grep gitlab-ceでインストールされているバージョンを確認。
  2. yum --showduplicate list gitlab-ceで利用可能なバージョンを確認。
  3. and upgrade to x.x first.で指定されているバージョンの更新コマンドを実行。

更新コマンド

yum update gitlab-ce-x.x.x-ce.0.el7

参考
GitLab Maintenance Policy

タイムゾーンを"Asia/Tokyo"に変更する

GitLabのタイムゾーンはデフォルトだとUTCになっているので"Asia/Tokyo"に変更する。

/etc/gitlab/gitlab.rb
# gitlab_rails['time_zone'] = 'UTC'

time_zoneの#を削除してAsia/Tokyoへ変更

/etc/gitlab/gitlab.rb
gitlab_rails['time_zone'] = 'Asia/Tokyo'

設定反映

# gitlab-ctl reconfigure

参考

omnibus-gitlabでtimezoneをAsia/Tokyoにする | orca8の備忘録

GitLabのホスト名を変更

external_urlを変更1

/etc/gitlab/gitlab.r
## Url on which GitLab will be reachable.
## For more details on configuring external_url see:
## https://gitlab.com/gitlab-org/omnibus-gitlab/blob/629def0a7a26e7c2326566f0758d4a27857b52a3/README.md#configuring-the-external-url-for-gitlab
external_url 'http://example.jp'

設定の反映

gitlab-ctl reconfigure

  1. /var/opt/gitlab/gitlab-rails/etc/gitlab.ymlは変更しない。 

15
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
12