DEV Community

Orestis Pantazos
Orestis Pantazos

Posted on • Edited on

🧪 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

Top comments (0)