How to Install GitLab on AlmaLinux 9

GitLab is an open-core company that operates GitLab, a DevOps software package that combines the ability to develop, secure, and operate software in a single application.

Note: GitLab requires a minimum of 4GB of system RAM.

In this article, we are going to learn how to install GitLab on AlmaLinux 9. So, let’s get started.

Checkout the GitLab Project Here.

Try this wiki on our VPS. Starting at just $5/month with 24x7 In-house customer support.

Update the System

Update the available packages to their latest version,

yum update -y 

yum upgrade -y 

Install the Required Packages

Install the required package dependencies,

dnf -y install curl vim policycoreutils python3-policycoreutils git

Add the GitLab CE Repository on AlmaLinux 9

Add the GitLab CE repository using below command,

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

Add the below lines to the file,



After added, verify if the repository has been added,

dnf repolist


[root@vps ~]# dnf repolist
repo id                                                                  repo name
appstream                                                                AlmaLinux 9 - AppStream
baseos                                                                   AlmaLinux 9 - BaseOS
extras                                                                   AlmaLinux 9 - Extras
gitlab_gitlab-ce                                                         gitlab_gitlab-ce
gitlab_gitlab-ce-source                                                  gitlab_gitlab-ce-source
[root@vps ~]# 

Install the GitLab CE on AlmaLinux 9

After the repositories added, Install GitLab CE on AlmaLinux 9 using below command,

dnf install gitlab-ce -y


Transaction Summary
Install  118 Packages

Total download size: 1.1 G
Installed size: 2.4 G
Downloading Packages:
It looks like GitLab has not been configured yet; skipping the upgrade script.

       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********

     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /

Thank you for installing GitLab!

Configure the GitLab CE on AlmaLinux 9,

Edit the GitLab configuration file which stores in /etc/gitlab/gitlab.rb,

vim /etc/gitlab/gitlab.rb

Edit the below line,

external_url ''

Note: Replace with your actual domain

Save the file and run the below command to apply changes,

gitlab-ctl reconfigure


[root@vps ~]# gitlab-ctl reconfigure
[2022-11-15T14:17:52+00:00] INFO: Started Cinc Zero at chefzero://localhost:1 with repository at /opt/gitlab/embedded (One version per cookbook)
Cinc Client, version 17.10.0
Infra Phase starting
[2022-11-15T14:17:52+00:00] INFO: *** Cinc Client 17.10.0 ***
[2022-11-15T14:17:52+00:00] INFO: Platform: x86_64-linux
[2022-11-15T14:17:52+00:00] INFO: Cinc-client pid: 65882
[2022-11-15T14:17:53+00:00] INFO: Setting the run_list to ["recipe[gitlab]"] from CLI options
[2022-11-15T14:17:53+00:00] INFO: Run List is [recipe[gitlab]]
[2022-11-15T14:17:53+00:00] INFO: Run List expands to [gitlab]
[2022-11-15T14:17:53+00:00] INFO: Starting Cinc Client Run for
[2022-11-15T14:17:53+00:00] INFO: Running start handlers
[2022-11-15T14:17:53+00:00] INFO: Start handlers complete.
Environment variable LANG specifies a non-UTF-8 locale. GitLab requires UTF-8 encoding to function properly. Please check your locale settings.
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

gitlab Reconfigured!

After done, check GitLab running status,

gitlab-ctl status


[root@vps ~]# gitlab-ctl status
run: alertmanager: (pid 69620) 3s; run: log: (pid 67620) 713s
run: gitaly: (pid 69186) 154s; run: log: (pid 66836) 888s
run: gitlab-exporter: (pid 69161) 155s; run: log: (pid 67447) 737s
run: gitlab-kas: (pid 69125) 158s; run: log: (pid 67070) 863s
run: gitlab-workhorse: (pid 69134) 157s; run: log: (pid 67251) 805s
run: logrotate: (pid 66647) 904s; run: log: (pid 66678) 901s
run: nginx: (pid 67297) 799s; run: log: (pid 67312) 797s
run: node-exporter: (pid 69150) 156s; run: log: (pid 67406) 754s
run: postgres-exporter: (pid 69346) 144s; run: log: (pid 67830) 680s
run: postgresql: (pid 66908) 870s; run: log: (pid 66921) 869s
run: prometheus: (pid 69302) 148s; run: log: (pid 67577) 719s
run: puma: (pid 68898) 180s; run: log: (pid 67174) 821s
run: redis: (pid 66694) 898s; run: log: (pid 66732) 895s
run: redis-exporter: (pid 69174) 155s; run: log: (pid 67564) 725s
run: sidekiq: (pid 69168) 155s; run: log: (pid 67197) 816s

You can start,stop GitLab using below command,

gitlab-ctl stop
gitlab-ctl start

Allow Ports on Firewall

Allow the HTTP/HTTPS through the firewall,

firewall-cmd --permanent --zone=public --add-service=http

firewall-cmd --permanent --zone=public --add-service=https

firewall-cmd --reload

Access GitLab Web Console

You can access visit GitLab browser using the provided URL http://Your_Domain_Name.

For password, you can obtain using below command,

cat /etc/gitlab/initial_root_password


[root@vps ~]# cat /etc/gitlab/initial_root_password
# WARNING: This value is valid only in the following conditions
#          1. If provided manually (either via `GITLAB_ROOT_PASSWORD` environment variable or via `gitlab_rails['initial_root_password']` setting in `gitlab.rb`, it was provided before database was seeded for the first time (usually, the first reconfigure run).
#          2. Password hasn't been changed manually, either via UI or via command line.
#          If the password shown here doesn't work, you must reset the admin password following

Password: eMMwu4e8UJN2f/+IKS1KCBAp1dTfmGMet2maOAewPg8=

# NOTE: This file will be automatically deleted in the first reconfigure run after 24 hours.
[root@vps ~]# 


The dashboard will look like this,


You can change your password here,