Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Gitlab Cookbook

You're reading from   Gitlab Cookbook Over 60 hands-on recipes to efficiently self-host your own Git repository using GitLab

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783986842
Length 172 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jeroen van Baarsen Jeroen van Baarsen
Author Profile Icon Jeroen van Baarsen
Jeroen van Baarsen
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Introduction and Installation 2. Explaining Git FREE CHAPTER 3. Managing Users, Groups, and Permissions 4. Issue Tracker and Wiki 5. Maintaining Your GitLab Instance 6. Webhooks, External Services, and the API 7. Using LDAP and OmniAuth Providers 8. GitLab CI A. Tips and Tricks Index

Setting up the server dependencies for source installation

To install GitLab from source, we need to install some dependencies on the server. Besides installing the required packages, we will also create the user that will serve our GitLab installation.

How to do it…

The installation procedure is applicable for Debian-based systems only. GitLab also supports other Linux distributions, but the installation process is a bit different. For more information, visit the gitlab.com website. Perform the following steps:

  1. Install the required packages using the following command:
    $ sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server redis-server checkinstall libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate
    
  2. Install Ruby using the following commands:
    $ mkdir /tmp/ruby && cd /tmp/ruby 
    $ curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p481.tar.gz | tar xz cd ruby-2.0.0-p481 
    $ ./configure --disable-install-rdoc 
    $ make 
    $ sudo make install
    
  3. Install the Bundler gem:
    $ sudo gem install bundler --no-ri --no-rdoc
    
  4. Create the Git user:
    $ sudo adduser --disabled-login --gecos 'GitLab' git
    

How it works…

At this point, we have installed the server dependencies and installed Ruby on our system. We also installed the Bundler gem; bundler is the package manager for Ruby, and as GitLab is written in Ruby, this one will be very important later on, so we can download all the dependencies for GitLab.

The Git user was created so that GitLab and all its dependencies can run under its own user; that way, it is possible to sandbox the installation better and make sure that our system stays secure.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime