Jump to content

How to install GitLab

Recommended Posts

GitLab is git repository management with extensive features like code reviews, issue tracking, activity feeds, wikis, protected branches. This article will provide you the information on how to install GitLab on LCwHost Ltd servers.

First, let us mention, that GitLab is officially available with CentOS 6/7, Ubuntu 14.04/16.04, Debian 7/8/9, OpenSUSE 42.2/42.3 versions. Here we will be covering only CentOS, Debian and Ubuntu, since these are the most common OS used among our VPS. It is recommended at least 4 GB of free memory (RAM + swap) to run GitLab.

Also, let us clarify, that our OS templates comes with pre-installed web service (Apache) and has a default configuration. So before GitLab installation, we would recommend removing the Apache from your server:

For Debian/Ubuntu:

apt-get remove apache2 apache2-bin apache2-data apache2-doc apache2-mpm-prefork apache2-utils

For CentOS:

yum remove httpd httpd-tools

Once you removed all the Apache related packages, you can actually proceed with GitLab. First you will need to install some repositories, which will be used to download and install GitLab.

For Debian/Ubuntu:

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

For CentOS:

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

After you add the required repositories, you can proceed with installation:

For Debian/Ubuntu:

sudo EXTERNAL_URL="http://your.subdomain.com" apt-get install gitlab-ee

For CentOS:

sudo EXTERNAL_URL="http://your.subdomain.com" yum -y install gitlab-ee

Note. Change "http://your.subdomain.com" with your domain/subdomain, which will be used to open GitLab.

The installation may take up to 5-7 minutes, but once it is done, you will be present with some huge image on your terminal about completion. After that you will have to go to your chosen URL (for example: http://your.subdomain.com) and change the password.

The default username will be root, so you can log in to GitLab with this username and your newly changed password.

Note. If you install the GitLab, without removing Apache first, you may need to configure virtual host, as you will most likely be displayed with default Apache webpage, when trying to connect to your chosen URL.

More information on official site: https://about.gitlab.com/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...