How To Install and Configure GitLab on CentOS 8 / RHEL 8

Windows Articles

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

How to run the Linux Tail command in Windows 10.

Hi! The title of this post may seem incongruous, but it's not. In fact, for some time Microsoft has approached positions with...

How to compress large videos in Windows 10

Hello, how are you? Multimedia resources are definitely used in any system. Indeed, we live in the age of technology. That's why...

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

Introduction:

GitLab is a powerful Open source platform based on git for accelerated software development & collaboration. GitLab provides various scratch features like Auto DevOps, Kubernetes integration, GitLab Container Registry etc. There are two distinct editions available for GitLab.

  • GitLab Community Edition (CE) -Available for public
  • GiLab Enterprise Edition (EE) -For Enterprises with greater features.

In this article you will cover the Installation of GitLab on CentOS 8 / RHEL 8. Just follow the below steps to get started.

Step 1: Update your system

Make sure your system is updated or update it by

sudo yum -y update

Step 2: Install Dependencies

Run the given command to install the Dependencies on your CentOS 8 system.

sudo yum -y install curl vim policycoreutils python3-policycoreutils

You can Install Postfix to send mail notifications by

sudo yum -y install postfix

Now, after installation start and enable Postfix services.

sudo systemctl enable postfix
sudo systemctl start postfix

To configure external email relay service after setting up Gitlab check the below:

How To configure an external SMTP Server.

Step 3: Adding the GitLab CE Repository

Add the GitLab Repository for CentOS 8 / RHEL 8

sudo vi /etc/yum.repos.d/gitlab-ce.repo

After it paste the below data into the above file.

[gitlab-ce]
name=gitlab-ce
baseurl=https://packages.gitlab.com/gitlab/gitlab-ce/el/7/$basearch
repo_gpgcheck=1
gpgcheck=1
enabled=1
gpgkey=https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey/gitlab-gitlab-ce-3D645A26AB9FBD22.pub.gpg
metadata_expire=300

Now, save the file & update your RPM packages.

sudo yum makecache

Step 4: Installing GitLab CE on CentOS 8 / RHEL 8

Run the given command to Install GitLab CE

EXTERNAL_URL="http://git.example.com" yum install -y gitlab-ce

Step 5: Configuring GitLab CE

After successful installation, move toward configuring GitLab CE that works for our environment. You can find the main configuration file under /etc/gitlab/gitlab.rb

sudo vi /etc/gitlab/gitlab.rb

Now, set up your URL on which GitLab will be reachable:

external_url 'http://gitlab.example.com'

Save & and run the reconfiguration script

sudo gitlab-ctl reconfigure

You will see a similar output upon successful reconfiguration

Step 6: Allow Firewall

Type the given command to allow firewall access as http, https, and ssh services & reload it.

sudo firewall-cmd --permanent --add-service={ssh,http,https} --permanent 
sudo firewall-cmd --reload

Step 7: Accessing Gitlab Web Console

Finish the GitLab installation by visiting http://gitlab.example.com.

Provide password details for root and click “Change Your Password

After it you can provide these details to access GitLab Administration dashboard.

Step 8: Disable User Sign Up

Login as a root user

Go to Settings page at the bottom left navigation pane and expand the Sign-up restrictions section to disable sign up for new users.

Unchecked the sing-up enabled & save changes

Logout to confirm the changes. Note the changes.

Step 9: Secure GitLab with SSL (Recommended)

As you all know SSL provides you a high security to stay away from spammers. I recommend to Install SSL on your GitLab server. Follow the below link if you don’t know to Install SSL.

How To Secure GitLab server with SSL certificate

Step 10: Enable LDAP authentication (Optional)

To use LDAP as a primary authentication method, configure GitLab to use an LDAP server such as FreeIPA to authenticate users.

How To Configure FreeIPA LDAP Authentication

More articles

1 COMMENT

  1. I followed your tutorial and when I execute :
    # EXTERNAL_URL=”http://git.example.com” yum install -y gitlab-ce

    I get:
    Last metadata expiration check: 0:02:51 ago on Mon 27 Jan 2020 10:56:19 AM EET.
    Error:
    Problem: cannot install the best candidate for the job
    – nothing provides policycoreutils-python needed by gitlab-ce-12.7.2-ce.0.el7.x86_64
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

    It seems that CentOS 8 is till very raw. I have no idea how it worked for you.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to enable and disable startup applications in Windows 10

Hello! Windows 10 is an attractive and very easy to use system. However, some criticism has come for being too "heavy". That...

How to install Oracle Java 15 on Ubuntu 20.04 / 18.04?

Hello, friends. We know that Java is one of the most popular programming languages and now it's version 15. So in this...

How to run the Linux Tail command in Windows 10.

Hi! The title of this post may seem incongruous, but it's not. In fact, for some time Microsoft has approached positions with...

How to compress large videos in Windows 10

Hello, how are you? Multimedia resources are definitely used in any system. Indeed, we live in the age of technology. That's why...

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...
x