Thursday 9 February 2017

How to Install Gitlab on CentOS/RHEL 5/6/7

GitLab is a web-based Git repository manager and issue tracking features. GitLab is similar to GitHub, but GitLab has an open source version, unlike GitHub. Git repository management, code reviews, issue tracking, activity feeds and wikis. It comes with GitLab CI for continuous integration and delivery.


This article will help you to install Gitlab on CentOS/RHEL using Omnibus install method. The Omnibus project is a full-stack platform-specific solution.

Step 1: Install and Configure the necessary dependencies

You need to configure mail service on our server. We can use any mail service like postfix, sendmail, exim etc. In this article I am using postfix email service.
# yum install postfix 
# service postfix start
# chkconfig postfix on
# lokkit -s http -s ssh

Step 2: Install other dependencies

Now you need to install other dependencies packages. You following command to install dependencies:
# yum install curl openssh-server cronie

Step 3: Install GitLab package on Server

Use following command to install GitLab packages on server.
# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | # bash
# yum install gitlab-ce
If you are not comfortable installing the repository through a piped script, you can find the entire script here.

Step 4: Change External URl

If you want to change the external url the use follow below steps:
# vim /etc/gitlab/gitlab.rb
external_url 'http://host.domain.com'

Step 5: Configure GitLab on Server

# gitlab-ctl reconfigure

Step 6: Acces and login GitLab

You can browse GitLab from your browser using server IP or hostname. Use below details to login in GitLab:
http://192.168.10.55
or
http://hostname
Username: root 
Password: 5iveL!fe
gitlab
gitlab1
Note: If you do any changes in configuration file than you need to run reconfigure command to make the changes.Use following command to reconfigure:
# gitlab-ctl reconfigure

GitLab Detail:

Main Configuration File: /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
GitLab Document Root: /opt/gitlab
Default Repository Location: /var/opt/gitlab/git-data/repositories
Default Nginx Configuration File: /opt/gitlab/embedded/conf/nginx.conf
GitLab Nginx Configuration file Location: /var/opt/gitlab/nginx/conf
Postgresql data Directory: /var/opt/gitlab/postgresql/data

Harry

Author & Editor

A technology enthusiast and addictive blogger who likes to hacking tricks and wish to be the best White Hacket Hacker of the World.

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.