Install Gitlab on Ubuntu Server 18.04

Gitlab is one of the most popular version control, issues management and CI systems today. Based on Git for the version control, GitLab adds a plenty of tools, integrations and a beautiful graphical interface to manage your your projects and tasks. Often reffered as an self-hosted alternative to the popular service Github.com, Gitlab is actually a well developed and supported project. Gitlab CE is the community edition and is openly deployed as a self-hosted solution.

In this article we’ll go through the steps to install and setup your own Gitlab environment on a CloudBalkan Cloud Server.

Prerequisites

Starting with the prerequisites which are pretty basic and common. The PostgreSQL database server is the highly recommended choice:

sudo apt update
sudo apt install curl ca-certificates apt-transport-https postgresql

If you are planning to setup email notifications, you’ll need a mail transfer agent. If you don’t already have a SMTP server of your own, install the sendmail MTA:

sudo apt install sendmail

Installation

The actual installation is really simplified. Gitlab.com provides a repository that can be easily set up using the following script.

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

After adding the repository, the Gitlab installation is just a step away. The EXTERNAL_URL variable can be used to define your external address so the installer can build the proper configuration.

Replace ‘your.server.ip.address’ with an IP address or a domain, and run the install:

sudo EXTERNAL_URL=”http://your.server.ip.address” apt install gitlab-ee

Setup

That’s pretty much all. You can now browse your servers URL and login with the default ‘root’ user to start setting up your Gitlab version control environment.

Keep an eye on blog for articles tagged ‘Gitlab’ to learn more about setup, management and integrations.