In this video I explain how to install and configure GitLab in Debian 11 however below you can read the tutorial for other Linux distributions.
GitLab is an open source end-to-end software development platform with built-in version control, issue tracking, code review, CI/CD, and more. Self-host GitLab on your own servers, in a container, or on a cloud provider. Source: GitLab CE
GitLab FOSS is a read-only mirror of GitLab, with all proprietary code removed. This project was previously used to host GitLab Community Edition, but all development has now moved to GitLab CE Source: GitLab CE / Gitlab FOSS
Tutorial
Basic requirements for a a virtual machine
8 GB RAM
4 vCPUs
40 GB disk space
Disk space:
system disk (sda) …. 40GB
– If needed, create a separate /opt partition (~20GB) as GitLab is installed in /opt/gitlab
data disk (sdb) ….. 60GB
– mount on /data
– define the GitLab data directory /data/gitlab
If needed increase partitions size.
Add a secondary disk and create partition.
1
sudo fdisk /dev/sdb
Then type enter the letters in sequence and set the parameters
n
hit Enter
p
hit Enter
1
hit Enter twice
t
hit Enter
8E
hit Enter
w
hit Enter
sudo zypper install curl perl
# Check if opening the firewall is needed with: sudo systemctl status firewalldsudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo systemctl reload firewalld
#Add the GitLab package repository and install the packagecurl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
# Install GitLab CEsudo zypper install gitlab-ee
Debian
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
id="os=debian&dist=bullseye"curl -ssf "https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.list?$id" >/etc/apt/sources.list.d/gitlab-ce.list
curl -L https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey | gpg --dearmor > /etc/apt/trusted.gpg.d/gitlab-ce.gpg
sudo vim /etc/apt/sources.list.d/gitlab-ce.list
#change the gpg key to: /etc/apt/trusted.gpg.d/gitlab-ce.gpg#It should looks like below:# this file was generated by packages.gitlab.com for# the repository at https://packages.gitlab.com/gitlab/gitlab-cedeb [signed-by=/etc/apt/trusted.gpg.d/gitlab-ce.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/debian/ bullseye main
deb-src [signed-by=/etc/apt/trusted.gpg.d/gitlab-ce.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/debian/ bullseye main
# Update aptsudo apt update
# Install GitLab CEsudo apt install gitlab-ce