GitLab Notes

Gineesh Gineesh Follow · 2 mins read
GitLab Notes
Share this

Install GitLab Runner (Binary)


# Download binary
sudo curl -L --output /usr/local/bin/gitlab-runner ""

# Give it permissions to execute:
sudo chmod +x /usr/local/bin/gitlab-runner

# Create a GitLab CI user:
sudo useradd --comment 'GitLab Runner' --create-home gitlab-runner --shell /bin/bash

# Install and run as service:
sudo gitlab-runner install --user=gitlab-runner --working-directory=/home/gitlab-runner
sudo gitlab-runner start

Run GitLab Runner in Docker

docker run -d --name gitlab-runner --restart always \
     -v /srv/gitlab-runner/config:/etc/gitlab-runner \
     -v /var/run/docker.sock:/var/run/docker.sock \

sudo docker run -d --name gitlab-runner --restart always \
     -v /home/devops/gitlab-runner/config:/etc/gitlab-runner \
     -v /var/run/docker.sock:/var/run/docker.sock \

How to Install GitLab CE in a disconnected environment

  • Download the package from:
    • click on the RPM link for the OS and download the RPM file.
$ wget --content-disposition
  • And transfer to server.

  • Follow for the instructions
  • enable repos needed
  • install dependencies
$ sudo dnf install -y \
    curl \
    policycoreutils \
    openssh-server \
    perl \
    postfix \
    openssl \
    tzdata \
# Enable OpenSSH server daemon if not enabled: sudo systemctl status sshd
sudo systemctl enable sshd 
sudo systemctl start sshd

# Check if opening the firewall is needed with: sudo systemctl status firewalld
$ sudo firewall-cmd --permanent --add-service=http && \
    sudo firewall-cmd --permanent --add-service=https && \
    sudo systemctl reload firewalld


$ sudo dnf install postfix && \
    sudo systemctl enable postfix && \
    sudo systemctl start postfix

Install Git

  • make sure RHEL repos are enabled (local or satellite)
$ sudo EXTERNAL_URL="http://gitlab.lab.local" \
    GITLAB_ROOT_PASSWORD="gitlabadmin" \
    dnf localinstall -y gitlab-ce-14.5.2-ce.0.el8.x86_64.rpm


  1. If any error with gpgchec, then disable gpgcheck by adding --nogpgcheck at the end of dnf or yum command.
  2. If you missed to mention the root password while installing, then get the default randomg password generated by installaer. (This password will be removed by gitlab-ctl reconfigure later.)
$ sudo cat /etc/gitlab/initial_root_password


Written by Gineesh Follow
Backpacker, Foodie, Techie

Latest Stories