How to install and configure Gitlab on Fedora 34

To Install and configure gitlab on Fedora 34.

Introduction:

GitLab was developed by GitLab Inc. as the complete DevOps platform for managing Git repositories, offering free public and private repositories, as well as a wiki, issue tracking, and continuous integration and deployment pipeline functionality. The Continuous Integration (CI) system is used to manage projects and provides the user interface in addition to other features of GitLab.

Step 1: Check the version of the OS.

[root@linuxhelp ~]# cat /etc/os-release
NAME=Fedora
VERSION="34 (Workstation Edition)"
ID=fedora
VERSION_ID=34
VERSION_CODENAME=""
PLATFORM_ID="platform:f34"
PRETTY_NAME="Fedora 34 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:34"
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation

Step 2: To Install the “curl policycoreutils openssh-server perl” package.

[root@linuxhelp ~]# dnf install -y curl policycoreutils openssh-server perl
Fedora 34 openh264 (From Cisco) - x86_64                                                              771  B/s | 2.5 kB     00:03    
Fedora Modular 34 - x86_64                                                                            569 kB/s | 4.9 MB     00:08    
Fedora Modular 34 - x86_64 - Updates                                                                  1.6 MB/s | 4.2 MB     00:02    
Fedora 34 - x86_64 - Updates                                                                          2.2 MB/s |  28 MB     00:13    
Fedora 34 - x86_64                                                                                    2.5 MB/s |  74 MB     00:28    
Package curl-7.76.0-1.fc34.x86_64 is already installed.
Package policycoreutils-3.2-1.fc34.x86_64 is already installed.
Package openssh-server-8.5p1-2.fc34.x86_64 is already installed.
perl-Digest-SHA                             x86_64                1:6.02-459.fc34                       fedora                  63 k
perl-DirHandle                              noarch                1.05-477.fc34                         updates                 23 k
perl-Dumpvalue                              noarch                2.27-477.fc34                         updates                 29 k
perl-Encode-devel                           x86_64                4:3.08-459.fc34                       fedora                  42 k
perl-English                                noarch                1.11-477.fc34                         updates                 24 k
perl-Env                                    noarch                1.04-458.fc34                         fedora                  20 k
perl-ExtUtils-CBuilder                      noarch                1:0.280236-2.fc34                     fedora                  47 k
perl-ExtUtils-Command                       noarch                2:7.62-1.fc34                         updates                 15 k
perl-ExtUtils-Constant                      noarch                0.25-477.fc34                         updates                 57 k
perl-ExtUtils-Embed                         noarch                1.35-477.fc34                         updates                 28 k

Step 3: Enable and Start the sshd service.

[root@linuxhelp ~]# systemctl enable sshd
Created symlink /etc/systemd/system/multi-user.target.wants/sshd.service → /usr/lib/systemd/system/sshd.service.
[root@linuxhelp ~]# systemctl start sshd

Step 4: To check the sshd status.

[root@linuxhelp ~]# systemctl status sshd
● sshd.service - OpenSSH server daemon
     Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
     Active: active (running) since Fri 2021-11-12 13:22:14 IST; 22s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 35101 (sshd)
      Tasks: 1 (limit: 4965)
     Memory: 2.0M
        CPU: 16ms
     CGroup: /system.slice/sshd.service
             └─35101 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

Nov 12 13:22:14 linuxhelp systemd[1]: Starting OpenSSH server daemon...
Nov 12 13:22:14 linuxhelp sshd[35101]: Server listening on 0.0.0.0 port 22.
Nov 12 13:22:14 linuxhelp sshd[35101]: Server listening on :: port 22.
Nov 12 13:22:14 linuxhelp systemd[1]: Started OpenSSH server daemon.

Step 5: To Start the firewall service for http and https.

[root@linuxhelp ~]# firewall-cmd --permanent --add-service=http
success
 [root@linuxhelp ~]# firewall-cmd --permanent --add-service=https
success

Step 6: To Reload the firewall service.

[root@linuxhelp ~]# systemctl reload firewalld

Step 7: To check the firewall status.

[root@linuxhelp ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
     Loaded: loaded (/usr/lib/systemd/system/firewalld.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-11-09 12:22:27 IST; 3 days ago
       Docs: man:firewalld(1)
    Process: 35582 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
   Main PID: 615 (firewalld)
      Tasks: 4 (limit: 4965)
     Memory: 44.0M
        CPU: 1.458s
     CGroup: /system.slice/firewalld.service
             └─615 /usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid

Nov 09 12:22:24 fedora systemd[1]: Starting firewalld - dynamic firewall daemon...
Nov 09 12:22:27 fedora systemd[1]: Started firewalld - dynamic firewall daemon.
Nov 12 13:25:09 linuxhelp systemd[1]: Reloading firewalld - dynamic firewall daemon.
Nov 12 13:25:09 linuxhelp systemd[1]: Reloaded firewalld - dynamic firewall daemon.

Step 8: To install postfix.

[root@linuxhelp ~]# dnf install postfix
Last metadata expiration check: 0:06:29 ago on Fri 12 Nov 2021 01:19:50 PM IST.
Dependencies resolved.
======================================================================================================================================
 Package                       Architecture                 Version                               Repository                     Size
======================================================================================================================================
Installing:
 postfix                       x86_64                       2:3.5.10-2.fc34                       updates                       1.5 M
Installing dependencies:
 openssl                       x86_64                       1:1.1.1k-1.fc34                       fedora                        667 k

Transaction Summary
======================================================================================================================================
Install  2 Packages

Total download size: 2.1 M
Installed size: 5.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): postfix-3.5.10-2.fc34.x86_64.rpm                                                               1.3 MB/s | 1.5 MB     00:01    
(2/2): openssl-1.1.1k-1.fc34.x86_64.rpm                                                               251 kB/s | 667 kB     00:02    
--------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                 724 kB/s | 2.1 MB     00:02     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                              1/1 
  Installing       : openssl-1:1.1.1k-1.fc34.x86_64                                                                               1/2 
  Running scriptlet: postfix-2:3.5.10-2.fc34.x86_64                                                                               2/2 
  Installing       : postfix-2:3.5.10-2.fc34.x86_64                                                                               2/2 
  Running scriptlet: postfix-2:3.5.10-2.fc34.x86_64                                                                               2/2 
  Verifying        : postfix-2:3.5.10-2.fc34.x86_64                                                                               1/2 
  Verifying        : openssl-1:1.1.1k-1.fc34.x86_64                                                                               2/2 

Installed:
  openssl-1:1.1.1k-1.fc34.x86_64                                    postfix-2:3.5.10-2.fc34.x86_64                                   

Complete!

Step 9: Enable and Start the postfix service.

[root@linuxhelp ~]# systemctl enable postfix
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /usr/lib/systemd/system/postfix.service.
[root@linuxhelp ~]# systemctl start postfix

Step 10: To install this gitlab-ce package.

[root@linuxhelp ~]# wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-14.4.2-ce.0.el8.x86_64.rpm/download.rpm
--2021-11-12 17:29:48--  https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/8/gitlab-ce-14.4.2-ce.0.el8.x86_64.rpm/download.rpm
Resolving packages.gitlab.com (packages.gitlab.com)... 104.18.27.123, 104.18.26.123, 2606:4700::6812:1b7b, ...
Connecting to packages.gitlab.com (packages.gitlab.com)|104.18.27.123|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://d20rj4el6vkp4c.cloudfront.net/7/8/el/8/package_files/76676.rpm?t=1636723501_f8599279836849702f424daf93900b20118e1690 [following]
--2021-11-12 17:29:50--  https://d20rj4el6vkp4c.cloudfront.net/7/8/el/8/package_files/76676.rpm?t=1636723501_f8599279836849702f424daf93900b20118e1690
Resolving d20rj4el6vkp4c.cloudfront.net (d20rj4el6vkp4c.cloudfront.net)... 13.33.183.86, 13.33.183.88, 13.33.183.229, ...
Connecting to d20rj4el6vkp4c.cloudfront.net (d20rj4el6vkp4c.cloudfront.net)|13.33.183.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 971743744 (927M) [application/x-rpm]
Saving to: ‘gitlab-ce-14.4.2-ce.0.el8.x86_64.rpm’

gitlab-ce-14.4.2-ce.0.el8.x86_64. 100%[===========================================================>] 926.73M  17.8MB/s    in 51s     

2021-11-12 17:30:41 (18.3 MB/s) - ‘gitlab-ce-14.4.2-ce.0.el8.x86_64.rpm’ saved [971743744/971743744]

Step 11: To install this gitlab-ce rpm package.

[root@linuxhelp ~]# dnf install gitlab-ce-14.4.2-ce.0.el8.x86_64.rpm
gitlab-ce                                                                                             174  B/s | 862  B     00:04    
Last metadata expiration check: 0:00:01 ago on Fri 12 Nov 2021 05:24:16 PM IST.
Total size: 927 M
Installed size: 2.0 G
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
 Preparing        :                                                                                                              1/1 
 Running scriptlet: gitlab-ce-14.4.2-ce.0.el8.x86_64                                                                             1/1 
 Installing       : gitlab-ce-14.4.2-ce.0.el8.x86_64                                                                             1/1 
 Running scriptlet: gitlab-ce-14.4.2-ce.0.el8.x86_64                                                                             1/1 
Starting Chef Infra Client, version 15.17.4
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
 - gitlab (0.0.1)
 - package (0.1.0)
 - logrotate (0.1.0)
 - redis (0.1.0)
 - postgresql (0.1.0)
 - monitoring (0.1.0)
 - registry (0.1.0)
 - mattermost (0.1.0)
 - consul (0.1.0)
 - gitaly (0.1.0)
 - praefect (0.1.0)
 - gitlab-kas (0.1.0)
 - gitlab-pages (0.1.0)
Running handlers:
Running handlers complete
Chef Infra Client finished, 569/1520 resources updated in 09 minutes 15 seconds

Notes:
Default admin account has been configured with following details:
Username: root
Password: You didn't opt-in to print initial root password to STDOUT.
Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours.

NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password.

gitlab Reconfigured!

      *.                  *.
     ***                 ***
    *****               *****
   .******             *******
   ********            ********
  ,,,,,,,,,***********,,,,,,,,,
 ,,,,,,,,,,,*********,,,,,,,,,,,
 .,,,,,,,,,,,*******,,,,,,,,,,,,
     ,,,,,,,,,*****,,,,,,,,,.
        ,,,,,,,****,,,,,,
           .,,,***,,,,
               ,*,.
 


    _______ __  __          __
   / ____(_) /_/ /   ____ _/ /_
  / / __/ / __/ /   / __ `/ __ \
 / /_/ / / /_/ /___/ /_/ / /_/ /
 \____/_/\__/_____/\__,_/_.___/
 

Thank you for installing GitLab!
GitLab should be available at http://linuxhelp

For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md

Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=14-4


 Verifying        : gitlab-ce-14.4.2-ce.0.el8.x86_64                                                                             1/1 

Installed:
 gitlab-ce-14.4.2-ce.0.el8.x86_64                                                                                                    

Complete!

Step 12 : To reconfigure the gitlab-ce.

root@linuxhelp ~]# gitlab-ctl reconfigure
Starting Chef Infra Client, version 15.17.4
resolving cookbooks for run list: ["gitlab"]
Synchronizing Cookbooks:
  - gitlab (0.0.1)
  - logrotate (0.1.0)
  - postgresql (0.1.0)
  - package (0.1.0)
  - redis (0.1.0)
  
  - registry (0.1.0)
  - gitlab-kas (0.1.0)
  - consul (0.1.0)
  - nginx (0.1.0)
Installing Cookbook Gems:
Compiling Cookbooks...
Running handlers:
Running handlers complete
Chef Infra Client finished, 1/766 resources updated in 41 seconds

Notes: Found old initial root password file at /etc/gitlab/initial_root_password and deleted it.

gitlab Reconfigured!

Step 13: To access the Gitlab on browser.

With this installation and configuration of GitLab on fedora 34 comes to an end

FAQ
Q
Does GitLab provide software as a service?
A
GitLab SaaS is GitLab software as a service, which you can access at GitLab.com. There is no software to install. You just need to sign up.
Q
Does GitLab offer free hosting?
A
GitLab offers both free and paid options: Core, Starter, Premium, and Ultimate.
Q
Is GitLab private or public service?
A
As a public company, GitLab would benefit from brand recognition, access to capital, shareholder liquidity, autonomy, and transparency.
Q
Is GitLab hosted in the Cloud?
A
GitLab is highly scalable and can be hosted on-premises or on cloud storage, It also includes a wiki, issue-tracking, IDE, and CI/CD pipeline features.
Q
What is the purpose of GitLab?
A
GitLab is an open-source code repository and collaborative software development platform for large DevOps and DevSecOps projects,
The repository enables hosting different development chains and versions and allows users to inspect previous code and roll it back to it in the event of unforeseen problems.