In this article,we will look ho to install and configure for Gitlab CE.GitLab is a web-based open source Git repository manager.It enables developers to build, deploy and run their applications. GitLab provides several features, including wikis, issue tracking, code reviews, and activity feeds.

GitLab have 4 products:

Gitlab CE (Community Edition) – self-hosted and free
Gitlab EE (Enterprise Edition) – self-hosted and paid
GitLab.com – SaaS and free.
GitLab.io – Private GitLab instance managed by GitLab Inc.

Step-by-step installation of GitLab CE (Community Edition) on CentOS 7 Server.

Install the required packages and dependencies

We will be using curl to download the repository installer, policycoreutils for SELinux manager, OpenSSH, and postfix as local SMTP server.

sudo yum install curl policycoreutils-python openssh-server openssh-clients postfix

start the ssh and postfix services and enable it

systemctl start sshd
systemctl start postfix

systemctl enable sshd
systemctl enable postfix
Install Gitlab

Download the package with curl and run the script to add Gitlab CE repository.

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

 

Now install Gitlab through below command.

yum -y install gitlab-ce

When the installation complete, you will get the result as shown below.

Thank you for installing GitLab!
...
Complete!

With this, GitLab CE is now installed on the CentOS 7 server.

Now configure Gitlab URL

Configuration file of Gitlab in /etc/gitlab/gitlab.rb

vim /etc/gitlab/gitlab.rb

Change the external_url line with the domain name 'gitlab.techrunnr.com'

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

Now save the changes.
Enbale Nginx and HTTPS

Hope you have your SSL certificate files already generated.Now we will enable HTTPS and enable HTTP to the HTTPS connection.

vim /etc/gitlab/gitlab.rb

Change HTTP to HTTPS on external_url line

exsternal_url 'https://gitlab.techrunnr.com'

Now add the following lines

nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/techrunnr/ssl/techrunnr.crt"
nginx['ssl_certificate_key'] = "/etc/techrunnr/ssl/techrunnr.key"

Now save and apply the configuration.

gitlab-ctl reconfigure

And when all is complete, we will get the below result.

Gitlab Reconfigured !
Now access the GitLab URL through web
https://gitlab.techrunnr.com

 

 

 

 

 

 

 

Now need to set the password for admin account.

Once password is rest,we will redirected to login page

 

Now Gitlab has been installed and configured on centos 7,now you can edit your profile settings,change username,add ssh key,create project and start using th Gitlab.

 

© 2019, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points
Categories: application

0 Comments

Leave a Reply

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.