Skip to content

Instantly share code, notes, and snippets.

@jniltinho
Last active April 18, 2020 07:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jniltinho/e29a68ab10f9658550c7a327365fd82b to your computer and use it in GitHub Desktop.
Save jniltinho/e29a68ab10f9658550c7a327365fd82b to your computer and use it in GitHub Desktop.
Install GitLab on Debian
#!/bin/bash
## Install GitLab 11.6.5-ce on Debian 9 | Ubuntu 18.04
## https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-gitlab-on-debian-9
## https://www.digitalocean.com/community/tutorials/how-to-build-docker-images-and-host-a-docker-image-repository-with-gitlab
## https://docs.docker.com/registry/deploying/
## https://about.gitlab.com/install/#debian
## VM HD 80GB, swap 2GB, / 78GB | Filesystem ext4 | 8GB RAM
## apt-cache madison gitlab-ce
## gitlab-ce=10.7.3-ce.0 gitlab-ce=11.6.5-ce.0
## Run as root (sudo su)
apt-get update
apt-get install -y ca-certificates curl openssh-server postfix
apt-get install -y apt-transport-https gnupg2 software-properties-common
## Gitlab
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash
EXTERNAL_URL="https://git.domain.com" apt-get install -y gitlab-ce
## Fix
## dpkg-reconfigure tzdata
## hostnamectl set-hostname git.linuxpro.com.br
## echo "" >>/etc/hosts
## echo "$SERVER_IP $SERVER_FQDN" >>/etc/hosts
## echo "$SERVER_FQDN" > /proc/sys/kernel/hostname
## sed -i "s|# letsencrypt\['enable'\] = nil|letsencrypt\['enable'\] = false|" /etc/gitlab/gitlab.rb
## gitlab-ctl reconfigure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment