How to Install Gitlab On Debian 9 Stretch Linux

Install The Dependencies

There are a couple of dependencies that you need to install on Debian before you can set up Gitlab.

apt install curl openssh-server ca-certificates postfix

output:

[email protected]:~# apt install curl openssh-server ca-certificates postfix
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20161130+nmu1+deb9u1).

Add The Repository and Install

Gitlab provides a convenient script that adds the Gitlab repository to Debian and installs Gitlab.

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

output:

[email protected]:~# curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | bash
Detected operating system as debian/stretch.
Checking for curl...
Detected curl...
Checking for gpg...

install Gitlab with apt.

apt install gitlab-ce

output:

[email protected]:~# apt install gitlab-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
gitlab-ce

Reconfigure And Start

gitlab-ctl reconfigure

output:

[email protected]:~# gitlab-ctl reconfigure
Starting Chef Client, version 13.6.4
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
- gitlab (0.0.1)
- package (0.1.0)

start the Gitlab

gitlab-ctl start

stop the gitlab

gitlab-ctl stop

now navigate to your browser to set the password default user is root

http://<your_ip>

gitlab1