CentOS7 にGitLabをインストールしてみる

OCIリソースの管理をTerraform+GitLabでコード管理とCI/CDをやりたくて今回はGitLabのインストールをやってみます。
インストールするのはOmnibus package版のGitLab です。

CentOS環境

CentOS Linux release 7.8.2003 (Core)

依存関係のインストールと設定

$ yum install -y policycoreutils-python
$ firewall-cmd --permanent --add-service=http
$ systemctl reload firewalld
$ yum install -y curl
$ yum install -y openssh-server openssh-clients
$ systemctl enable sshd
$ systemctl start sshd
$ yum install postfix
$ systemctl enable postfix
$ systemctl start postfix

リポジトリを追加

$ curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

パッケージをインストール

下記のIPアドレスは適宜変更ください。

EXTERNAL_URL="http://192.168.250.52" yum install -y gitlab-ce

ログインしてみる

本当は http://192.168.250.52 にアクセスするとパスワードの変更画面が先に出てくるのですが、スクショ取るの忘れちゃいました。。
パスワード設定後は下記のログイン画面へ遷移します。
f:id:kyamisama:20201224101244j:plain
f:id:kyamisama:20201224101512j:plain
問題なくログインできました。次はGitLab CI/CDやりたいですね!