DEV Community

Orestis Pantazos
Orestis Pantazos

Posted on • Edited on

2 1

🧪 Install and Configure GitLab instance on Ubuntu 18.04

Step 1:

Installing the dependencies

sudo apt update

sudo apt install ca-certificates curl openssh-server postfix

Step 2:

Installing GitLab instance

cd /tmp

curl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh

sudo apt install gitlab-ce

Step 3:

Adjusting the firewall rules

sudo ufw status

Output:

Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
OpenSSH (v6)               ALLOW       Anywhere (v6)
Enter fullscreen mode Exit fullscreen mode

sudo ufw allow http

sudo ufw allow https

sudo ufw allow OpenSSH

sudo ufw status

Output:

Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere                  
80/tcp                     ALLOW       Anywhere                  
443/tcp                    ALLOW       Anywhere                  
OpenSSH (v6)               ALLOW       Anywhere (v6)             
80/tcp (v6)                ALLOW       Anywhere (v6)             
443/tcp (v6)               ALLOW       Anywhere (v6)
Enter fullscreen mode Exit fullscreen mode

Step 4:

Editing the GitLab configuration file

sudo nano /etc/gitlab/gitlab.rb
Enter fullscreen mode Exit fullscreen mode

/etc/gitlab/gitlab.rb

##! For more details on configuring external_url see:
##! https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-the-external-url-for-gitlab
external_url 'https://opendevops.dev'
Enter fullscreen mode Exit fullscreen mode
letsencrypt['contact_emails'] = ['opantazos@gmail.com']
Enter fullscreen mode Exit fullscreen mode
sudo gitlab-ctl reconfigure
Enter fullscreen mode Exit fullscreen mode

Step 5:

Launch the GitLab instance

https://opendevops.dev

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs