ユーザ用ツール

サイト用ツール


linux:gitlab_ce

GitLab CE

導入

GitLab CEリポジトリを追加する。

vim /etc/yum.repos.d/gitlab_gitlab-ce.repo

以下の内容を記載する。

[gitlab_gitlab-ce]
name=gitlab_gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
 https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

[gitlab_gitlab-ce-source]
name=gitlab_gitlab-ce-source
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/8/SRPMS
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
 https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
metadata_expire=300

GPG鍵が古い場合があるので、最新バージョンに更新しておく。

rpm --import https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey

以下のコマンドを実行し、スクリプトを実行することで簡単にリポジトリをインストールすることができる。

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | bash
dnf install gitlab-ce -y

以下の部分を環境に合わせて変更する。 external_url 'http://nkgit.domain.internal'

編集したら、以下のコマンドを実行して変更を適用する。

gitlab-ctl reconfigure

初期パスワードは/etc/gitlab/initial_root_passwordに記載されている。 設定したURLに接続してrootでログインする。

linux/gitlab_ce.txt · 最終更新: 2025/10/29 02:13 by mikoto