How to Install GitLab on Ubuntu 16.04

The GitLab install on Ubuntu is the subject of this article. GitLab is resource hungry and fails when installed on VirtualBox VMs, Amazon Cloud EC2, and other “light” platforms.

How to Install GitLab – 3 Steps

Installing GitLab on a VirtualBox VM is first up and then we will discuss the differences for provisioning GitLab in its likely home on an Amazon AWS EC2 cloud machine sporting an Ubuntu operating system.

  1. provision 4 Gig of Swap Space (Vital for a successful GitLab install)
  2. Install the Postfix tools for sending and receiving e-mails
  3. perform the GitLab install proper

The swap space provisioning is a must. GitLab simply won’t install without it.

Then it pays to install Postfix. Skipping this will cause you many difficulties during the GitLab install proper.

sudo apt-get install postfix

Do not use an emacs or other dumb shell to install postfix. The install will pop up a dialog and ask you two questions.

  1. Which install option would you like? – Choose “Internet Site”
  2. What is the fully qualified domain name? – Enter something akin to

Download the Install Script for your Operating System

Visit this page in order to ensure you have the right (and most up to date) GitLab package.

curl -sS | sudo bash

In our case we are installing GitLab onto an Ubuntu 16.04 (Xenial) with a 64 bit architecture. So the below is the comand to run.
It executes the and should produce output that closely resembles the below.

Detected operating system as Ubuntu/xenial.
Checking for curl...
Detected curl...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/gitlab_gitlab-ce.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.

Update then Run the GitLab apt-get Install

Now that our packages have been updated (ensure above that it says “Running apt-get update”. That means we are ready to execute the provided GitLab install command.

sudo apt-get update
sudo apt-get install gitlab-ce

Well done – you are almost done with the install. Now we need to run the configuration aspect.

sudo gitlab-ctl reconfigure

Now that you are done – you can navigate to the portal and enjoy your new GitLab install.

The 7 Day to Day Git WorkFlow Commands

Git can be over-complicated so here are “simple as” listings command groups that deliver observable value.

Simple Git Workflow Commands

Visit the Simple Git Workflow for a no-frills list of git commands. You will use these Git commands all day every day.

Leave a Reply

Your email address will not be published. Required fields are marked *