Gitlab Installation on Ubuntu

GitLab is a single application for the entire DevOps lifecycle that allows teams to work together better and bring more value to your customers, faster. GitLab does this by shortening your DevOps cycle time, bridging silos and stages, and taking work out of your hands.

One of the best open source Version Control tool.

Below are the prerequisites features to be present on the version control machine.

sudo apt-get update

sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get update
sudo apt-get install git
sudo apt-get install subversion

sudo apt-get update

sudo apt-get install ca-certificates curl openssh-server postfix
cd /tmp

Below link is to install community edition. use gitlab-ee in the below link for enterprise edition

curl -LO

less /tmp/

sudo bash /tmp/

sudo apt-get install gitlab-ce

Modify the configuration file of Gitlab in the below file for all the settings.

Ports,  link, mail configuration LDAP integration etc. 

vi /etc/gitlab/gitlab.rb

****************Sample piece of gitlab.rb*****************

external_url ''

### Email Settings

 gitlab_rails['gitlab_email_enabled'] = true
 gitlab_rails['gitlab_email_from'] = ''
 gitlab_rails['gitlab_email_display_name'] = 'Gitlab'
 gitlab_rails['gitlab_email_reply_to'] = ''
 gitlab_rails['gitlab_email_subject_suffix'] = 'Gitlab Alert!'

### GitLab user privileges

# gitlab_rails['gitlab_default_can_create_group'] = true
 gitlab_rails['gitlab_username_changing_enabled'] = true

###! **Use smtp instead of sendmail/postfix.**

 gitlab_rails['smtp_enable'] = true

 gitlab_rails['smtp_address'] = ""
 gitlab_rails['smtp_port'] = 587
 gitlab_rails['smtp_user_name'] = ""
 gitlab_rails['smtp_password'] = "mylab@1234"
 gitlab_rails['smtp_domain'] = ""
 gitlab_rails['smtp_authentication'] = "login"
 gitlab_rails['smtp_enable_starttls_auto'] = true
 gitlab_rails['smtp_tls'] = false

###! **Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'**

###! Docs:
 gitlab_rails['smtp_openssl_verify_mode'] = 'peer'


To test the mail service use the below code

gitlab-rails console

Notify.test_email('', 'Message Subject', 'Message Body').deliver_now

Login page :

No comments:
Write comments

Please do not enter spam links


More Services