Install GitLab

Install
https://packages.gitlab.com/gitlab/gitlab-ce/install#manual-deb

curl -fsSL https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey | gpg --dearmor > /usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg
 
/etc/apt/sources.list.d/gitlab_gitlab-ce.list
deb [signed-by=/usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu $(lsb_release -cs) main
deb-src [signed-by=/usr/share/keyrings/gitlab_gitlab-ce-archive-keyring.gpg] https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu $(lsb_release -cs) main

Old install

#!/bin/bash

# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
    sudo $0
    exit
fi

# install required packages
apt-get install -y ca-certificates curl cron

#  bypass the apt-cacher-ng proxy
echo 'Acquire::HTTP::Proxy::packages.gitlab.com "DIRECT";' > /etc/apt/apt.conf.d/99_gitlab

# download GitLab installation script
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash

# workaround for PostgreSQL shmmax issue
echo "kernel.shmmax=17179869184" >> /etc/sysctl.d/90-shmmax.conf
/sbin/sysctl -p /etc/sysctl.d/90-shmmax.conf

# install GitLab Community Edition
apt-get install -y gitlab-ce

# configure domain
sed -i "s|gitlab.example.com|$(hostname -A | tr -d ' ')|g" /etc/gitlab/gitlab.rb
gitlab-ctl reconfigure
>

HowTo
http://www.panticz.de/gitlab

Login

http://YOUR_SERVER_IP
user: root
pass: 5iveL!fe

Downloads: GitLab CE Download Archives
https://about.gitlab.com/downloads/archives/

# check instalation
gitlab-rake gitlab:check

# GitLab APT repository
https://packages.gitlab.com/gitlab/gitlab-ce

# rebuild an authorized_keys file
gitlab-rake gitlab:shell:setup
 
# install specific version
sudo apt-get install -y gitlab-ce=7.10.1~omnibus.1-1

Send email notification
Notify.test_email('foo@example.com', 'GitLab test subject', 'GitLab test message').deliver_now

GitLab backup to s3
https://stackoverflow.com/questions/37553070/gitlab-omnibus-delete-backup-from-amazon-s3/58100385#58100385

# /etc/gitlab/gitlab.rb
gitlab_rails['backup_upload_connection'] = {
  'provider' => 'AWS',
  'region' => 'ew-west-1',
  'aws_access_key_id' => 'foo,
  'aws_secret_access_key' => 'bar',
  'endpoint' => 'https://s3.example.com'
}
gitlab_rails['backup_upload_remote_directory'] = 'backups'

Skip DB migration

/etc/gitlab/gitlab.rb
...
gitlab_rails['auto_migrate'] = false
 
sudo gitlab-ctl reconfigure
 
apt install gitlab-ce=14.9.4-ce.0
 
apt-cache madison  gitlab-ce | grep 14.10

Links
https://packages.gitlab.com/gitlab/gitlab-ce/install
https://packages.gitlab.com/gitlab/gitlab-ce/
https://about.gitlab.com/downloads/
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#installation
https://www.gitlab.com/2014/02/14/gitlab-is-now-simple-to-install/
https://about.gitlab.com/downloads/archives/ - old GitLab packages archive