Facebook
Twitter
LinkedIn
YouTube
GitHub
Hasan's Blog
  • General
  • CI/CD
  • DevOps
  • Test Mgmt & Automation
  • Blog
    • About me

How to Install and Configure GitLab on CentOS 8/7

2020/05/09Hasan NaqviCI/CDNo comments

How to Install and Configure GitLab on CentOS 8/7

Gitlab is one of the best alternatives to Github for hosting your open source projects, that you will find out there.

In this article, we will explain how to install and configure Gitlab (Git-repository manager) on CentOS 8/7 or RHEL 8/7 Linux distributions.

Step 1: Install and Configure Required Dependencies

1. First, start by installing the following necessary dependencies using the yum package manager

sudo yum install curl policycoreutils-python openssh-server

2. Next, install Postfix service to send notification emails, and enable it to start at system boot, then check if it is up and running using following commands.

sudo yum install postfix
sudo systemctl start postfix
sudo systemctl enable postfix
sudo systemctl status postfix

During Postfix installation a configuration window may appear. Select ‘Internet Site‘ and use your server’s external DNS for ‘mail name‘ and press enter. If extra screens appear, continue to press enter to accept the defaults.

Step 2: Add GitLab Repository and Install Package

3. Now add the GitLab package YUM repository to your system by running the following script.

sudo curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

4. Next, install the GitLab Community Edition package using the following command and make sure to change ‘http://gitlab.hasanyousuf.com‘ to the URL at which you want to access your GitLab instance from a web browser.

EXTERNAL_URL="http://gitlab.hasanyousuf" yum install -y gitlab-ce

Note: If you want to change your main URL, you can configure it in the GitLab main configuration file /etc/gitlab/gitlab.rb in the external_url section. Once changed, don’t forget to reconfigure gitlab to apply the recent changes in the configuration file using the following command.

sudogitlab-ctl reconfigure

5. If you have a system firewall enabled, you need to open port 80 (HTTP) and 443 (HTTPS) to allow connections in the system firewall.

sudo firewall-cmd --permanent --add-service=80/tcp

sudo firewall-cmd --permanent --add-service=443/tcp sudo systemctl reload firewalld

Step 3: Perform Initial Gitlab Setup

6. Now, open a web browser and access your gitlab instance using the following URL you set during installation.

http://gitlab.hasanyousuf.com

7. On your first visit, you’ll be redirected to a password reset screen, create a new password for your new admin account and click “Change your password”. Once you set, it will be redirected back to the login screen and login with username root and the password you set.

Related Posts:

  • Install Node.js on Ubuntu 16.04
  • How to Install Python 3.8 on Ubuntu 18.04
  • How To Install Java with Apt-Get on Ubuntu 16.10
  • Minimise your development time by automating your…
  • Schedule a job periodically in Jenkins during working days

Share this:

  • Twitter
  • Facebook

Related

Tags: github, Gitlab, Version Control
Previous post How to Install Python 3.8 on Ubuntu 18.04

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Hasan Naqvi

Categories

  • Casperjs (1)
  • CI/CD (4)
  • DevOps (6)
  • Gruntjs (2)
  • Jira (1)
  • Linux (1)
  • Programming (1)
  • Uncategorized (14)
  • VMware (1)

Archives

  • May 2020 (1)
  • April 2020 (1)
  • March 2020 (2)
  • September 2019 (2)
  • May 2018 (1)
  • September 2017 (3)
  • July 2017 (1)
  • June 2017 (4)
  • May 2017 (1)
  • July 2015 (2)
  • January 2015 (1)
  • October 2014 (1)
  • September 2014 (5)
  • August 2014 (1)

Tags

Arduino Arduino sketch Arduino sketch upload bash shell casperjs Couchdb Curl docker container docker images github Gitlab gnu Parallel gruntjs JAVA JAVA jenkins Jira JPA Json Linux linux mint Maven mint MYSQL Tomcat Ubuntu Version Control xpath

Top Posts & Pages

  • CURD functions and REST api
  • How to completely uninstall Android Studio on MAC?
  • Before you can run vmware several modules must be compiled and loaded into the running kernel
  • Trying to upload Blink example (Arduino sketch) on my Arduino uno
  • fill form using xpath in casperjs
  • Delete docker images & containers in one command
  • How to import data in couchdb using JSON file

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

  • General
  • CI/CD
  • DevOps
  • Test Mgmt & Automation
  • Blog
    • About me
@2017