Facebook
Twitter
LinkedIn
YouTube
GitHub
Hasan's Blog
  • Home
    • About me
  • Hashicorp
  • Ansible
  • CI/CD
  • DevOps

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.

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 *

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
  • Home
    • About me
  • Hashicorp
  • Ansible
  • CI/CD
  • DevOps
@2017
Manage Cookie Consent
We use cookies to optimize our website and our service.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
Preferences
{title} {title} {title}