X

How To Install GitLab Community Edition On Ubuntu 20.04

In this tutorial how to install GitLab community edition on Ubuntu 20.04. GitLab is an open source application primarily used to host Git repositories on your local network. This application allows for internal repository store that’s why development team have used it from the local network.

How To Reset FusionPBX Admin Password

How To Install OpenProject v11 On Linux Server

Prerequisites

  • 2 cores
  • 8GB of RAM
###################################
Operating System: Ubuntu 20.04
Server IP : 10.66.100.40
RAM  : 4GB
Disk  : 50GB
Service  : GitLab Community
###################################

Step #01: Check server version and ip address.

root@GitLab:~# lsb_release -a && ip r
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
default via 10.66.100.10 dev enp0s3 proto static
10.66.0.0/16 dev enp0s3 proto kernel scope link src 10.66.100.40

Add server ip address on hosts file.

root@GitLab:~# cat /etc/hosts
127.0.0.1 localhost
10.66.100.40 GitLab.technologyrss.local    GitLab

Server update and upgrade then install some required package.

root@GitLab:~# apt-get update && apt upgrade -y
root@GitLab:~# apt-get install -y curl openssh-server ca-certificates tzdata perl postfix

Step #02: Download installation GitLab script repo

root@GitLab:~# curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
root@GitLab:~# apt-get install gitlab-ce

After completed installation process then see as like below:

It looks like GitLab has not been configured yet; skipping the upgrade script.
       *.                  *.
      ***                 ***
     *****               *****
    .******             *******
    ********            ********
   ,,,,,,,,,***********,,,,,,,,,
  ,,,,,,,,,,,*********,,,,,,,,,,,
  .,,,,,,,,,,,*******,,,,,,,,,,,,
      ,,,,,,,,,*****,,,,,,,,,.
         ,,,,,,,****,,,,,,
            .,,,***,,,,
                ,*,.
     _______ __  __          __
    / ____(_) /_/ /   ____ _/ /_
   / / __/ / __/ /   / __ `/ __ \
  / /_/ / / /_/ /___/ /_/ / /_/ /
  \____/_/\__/_____/\__,_/_.___/

Thank you for installing GitLab!

Run the following command to reconfigure Gitlab:

root@GitLab:~# gitlab-ctl reconfigure

This process is automated completed, so not needed any extra command or to answer any prompts.

Now run all service start command as like below.

root@GitLab:~# gitlab-ctl start
ok: run: alertmanager: (pid 1702) 2118s
ok: run: gitaly: (pid 1691) 2118s
ok: run: gitlab-exporter: (pid 1689) 2118s
ok: run: gitlab-workhorse: (pid 1690) 2118s
ok: run: grafana: (pid 2788) 1740s
ok: run: logrotate: (pid 1677) 2118s
ok: run: nginx: (pid 1678) 2118s
ok: run: node-exporter: (pid 1687) 2118s
ok: run: postgres-exporter: (pid 1673) 2118s
ok: run: postgresql: (pid 1672) 2118s
ok: run: prometheus: (pid 1679) 2118s
ok: run: puma: (pid 1675) 2118s
ok: run: redis: (pid 1686) 2118s
ok: run: redis-exporter: (pid 1688) 2118s
ok: run: sidekiq: (pid 1674) 2118s

Also check status as like below:

root@GitLab:~# gitlab-ctl status
run: alertmanager: (pid 1702) 2148s; run: log: (pid 1671) 2148s
run: gitaly: (pid 1691) 2148s; run: log: (pid 1670) 2148s
run: gitlab-exporter: (pid 1689) 2148s; run: log: (pid 1682) 2148s
run: gitlab-workhorse: (pid 1690) 2148s; run: log: (pid 1685) 2148s
run: grafana: (pid 2788) 1770s; run: log: (pid 2785) 1770s
run: logrotate: (pid 1677) 2148s; run: log: (pid 1665) 2148s
run: nginx: (pid 1678) 2148s; run: log: (pid 1666) 2148s
run: node-exporter: (pid 1687) 2148s; run: log: (pid 1683) 2148s
run: postgres-exporter: (pid 1673) 2148s; run: log: (pid 1663) 2148s
run: postgresql: (pid 1672) 2148s; run: log: (pid 1664) 2148s
run: prometheus: (pid 1679) 2148s; run: log: (pid 1676) 2148s
run: puma: (pid 1675) 2148s; run: log: (pid 1669) 2148s
run: redis: (pid 1686) 2148s; run: log: (pid 1680) 2148s
run: redis-exporter: (pid 1688) 2148s; run: log: (pid 1681) 2148s
run: sidekiq: (pid 1674) 2148s; run: log: (pid 1668) 2148s

Step #03: Access server ip address.

http://10.66.100.40/

Try using root password but I see this is not working. So I find out this how to reset root password without login. Follow below steps for reset root password.

root@GitLab:~# gitlab-rails console -e production

Then run below command for reset root password, Must be replace your own password.

user = User.where(id: 1).first
user.password = 'passw0rd'
user.password_confirmation = 'passw0rd'
user.save!

Then I success ! for web login using root user and password. 🙂

 

0 0 votes
Article Rating
Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment