Published January 22, 2018 by

Install GitLab on CentOS 7

Gitlab is web GUI based manager for git repositories with support for CI\CD, issue tracking & wiki. Gitlab provides easy to use commands & controls for the git repositories, we can easily create new git repositories, manage them & all that using a nice graphical interface. With Gitlab, we can make our repositories completely private or can also allow public access over LAN or over the internet.

Versions of Gitlab:
  • Gitlab CE ( Community Edition )    ##This is the free version.
  • Gitlab EE (Enterprise Edition)        ##This is paid version.
Install GitLab CE

Update System And Set Firewall

# sudo yum update
sudo yum install -y curl policycoreutils-python openssh-server
# sudo systemctl enable sshd
# sudo systemctl start sshd
# sudo firewall-cmd --permanent --add-service=http
# sudo systemctl reload firewalld

Install Postfix to send notification emails

sudo yum install postfix
# sudo systemctl enable postfix
# sudo systemctl start postfix

Enable mail sending

# yum install mailx

Setup Gitlab Reposotiry

# curl | sudo bash

Install GitLab Package

Change the highlighted text in command to the URL at which you want to access your GitLab Server. And please wait sometimes it takes time approx 30 minutes (depending on internet speed). 

# sudo EXTERNAL_URL="" yum install -y gitlab-ee

Access GitLab

Go to browser and hit URL: localhost or server_ip or

It asks for change password set your GitLab password and login. Remeber by default your username is root

After successful login, you can access GitLab