0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Rocky Linux 9にGitLab Community Edition 17をインストールする

Posted at

What's?

Rocky Linux 9にGitLab Community Edition 17をインストールしてみます。

GitLabのインストールドキュメントを確認する

GitLab 17のサポートOSを確認すると、実はRocky Linuxは入っていません。

RHEL互換のOSでは、AlmaLinuxとOracle Linuxですね。

インストールページを見ると、AlmaLinuxのインストール手順でRHEL互換のディストリビューションという括りで扱えそうなのでよいでしょう。

versions 8, 9 for RHEL compatible distributions

まあ、自己責任ですね。

AlmaLinuxのインストール手順はこちら。

Official Linux package / AlmaLinux

こちらに沿ってインストールしてみます。

環境

今回の環境はこちらです。

$ cat /etc/redhat-release
Rocky Linux release 9.5 (Blue Onyx)


$ uname -srvmpio
Linux 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Apr 30 17:38:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Rocky Linux 9にGitLab CE 17をインストールする

こちらの手順に沿ってインストールしていきます。

Official Linux package / AlmaLinux

必要なパッケージのインストール。

$ sudo dnf install -y curl policycoreutils openssh-server perl

firewalldの設定変更。

$ sudo firewall-cmd --permanent --add-service=http
$ sudo firewall-cmd --permanent --add-service=https
$ sudo systemctl reload firewalld

GitLabのyumリポジトリの追加。ドキュメントとは違って、gitlab-ceにしています(ドキュメントはgitlab-ee)。

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

gitlab-ceをインストール。

$ sudo EXTERNAL_URL='http://[GitLabのIPアドレス]' dnf install -y gitlab-ce

今回はGitLabには以下のIPアドレスでアクセスします。

$ sudo EXTERNAL_URL='http://172.21.72.219' dnf install -y gitlab-ce

インストールが完了しました。

Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.

NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

gitlab Reconfigured!

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.



     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/


Thank you for installing GitLab!
GitLab should be available at http://172.21.72.219

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=17-11

バージョン。

$ sudo gitlab-rake gitlab:env:info

System information
System:
Current User:   git
Using RVM:      no
Ruby Version:   3.2.5
Gem Version:    3.6.6
Bundler Version:2.6.5
Rake Version:   13.0.6
Redis Version:  7.2.7
Sidekiq Version:7.3.9
Go Version:     unknown

GitLab information
Version:        17.11.2
Revision:       059055d0bcc
Directory:      /opt/gitlab/embedded/service/gitlab-rails
DB Adapter:     PostgreSQL
DB Version:     16.8
URL:            http://172.21.72.219
HTTP Clone URL: http://172.21.72.219/some-group/some-project.git
SSH Clone URL:  git@172.21.72.219:some-group/some-project.git
Using LDAP:     no
Using Omniauth: yes
Omniauth Providers:

GitLab Shell
Version:        14.41.0
Repository storages:
- default:      unix:/var/opt/gitlab/gitaly/gitaly.socket
GitLab Shell path:              /opt/gitlab/embedded/service/gitlab-shell

Gitaly
- default Address:      unix:/var/opt/gitlab/gitaly/gitaly.socket
- default Version:      17.11.2
- default Git Version:  2.49.0.gl1

dnfでのパッケージ情報。

$ dnf info gitlab-ce
メタデータの期限切れの最終確認: 0:00:05 前の 2025年05月15日 13時13分35秒 に実施しました。
インストール済みパッケージ
名前         : gitlab-ce
バージョン   : 17.11.2
リリース     : ce.0.el9
Arch         : x86_64
サイズ       : 3.3 G
ソース       : gitlab-ce-17.11.2-ce.0.el9.src.rpm
リポジトリー : @System
repo から    : gitlab_gitlab-ce
概要         : GitLab Community Edition (including NGINX, Postgres, Redis)
URL          : https://about.gitlab.com/
ライセンス   : MIT
説明         : GitLab Community Edition (including NGINX, Postgres, Redis)

rootアカウントのパスワードは、以下で確認します。

$ sudo cat /etc/gitlab/initial_root_password

あとはWeb UIにアクセスして使い始めましょう。

image.png

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?