SlideShare a Scribd company logo
GitLab Installation with Git & Gitolite on CentOS – 6.3




                       Raiful Hasan

                     DIVINE IT LIMITED
GitLab Installation on CentOS – 6.3


Preperation:


The main problem with installing GitLab on CentOS is that - other than Ubuntu or Fedora - it
doesn't have the ICU(lib) installed and
that's why ruby crashes/doesn't run around.

We will work as root most of the time, so make sure you have the permissions to do so


First of all we need to add the epel repo to yum to get all the packages we want.



1: rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm

Then we install all required packages:



1: yum -y groupinstall 'Development Tools' 'Additional Development'
2: yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel
expat-devel db4-devel byacc gitolite sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-
devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel redis



Up next: Downloading and extracting ruby:


1: curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
2: tar xzvf ruby-1.9.3-p0.tar.gz
3: cd ruby-1.9.3-p0




1) Configure without binary suffix

1: ./configure --enable-shared --disable-pthread

Now install ruby:

1: make && make install




DIVINE IT LIMITED                                                                                              Page 2
GitLab Installation on CentOS – 6.3


Some may need to install qt-devel qtwebkit-devel by running (Replace the 64 in the path with
32 if you're running on a 32 bit box)


1: yum install qt-devel qtwebkit-devel
2: export PATH=$PATH:/usr/lib64/qt4/bin

Now we have to install all the gems GitLab needs to run:


1: gem update --system
2: gem update
3: gem install rails

Now everything is set up and we can start to configure the environment for GitLab. First we
create a user, that will run GitLab:


1: adduser --shell /bin/bash --create-home --home-dir /home/gitlab gitlab

Because this user will be the Admin of the repos on the server, we need to have a RSA key pair
to authenticate:


1: su gitlab
2: ssh-keygen -t rsa # as gitlab user



Now switch back to root account. Because GitLab is only a graphical user interface to manage
repos, we need a powerfull backend. gitolite will do this for us.
We also need a user for gitolite.


1: adduser --system --shell /bin/sh --comment 'gitolite' --create-home --home-dir /home/git git



Gitolite needs to know one key, that it knows as admin. We will pass the key of GitLab to
gitolite. To do so we first copy the private key of our gitlab user to the home
directory of our gitolite user:


1: # make sure you do this as root
2: cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub




DIVINE IT LIMITED                                                                                 Page 3
GitLab Installation on CentOS – 6.3


Now we need to initialize gitolite:


1: su git
2: gl-setup ~/gitlab.pub # this passes the admin key to gitolite

When the prompt appears edit the provided file (it's in a vi-Editor) and set $REPO_UMASK to
0007

Switch back to root user now.

We now need to give our management software (GitLab) access to the repos:



1: usermod -a -G git gitlab
2: chmod -R g+rwX /home/git/repositories/
3: chmod 770 /home/git



Because the gitlab user will need a password later on, we configure it right now, so we are
finished with all the user stuff.


1: passwd gitlab # please choose a good password :)



As next step we need to introduce GitLab to gitolite (that is, we let them change their SSH-keys)


1: su gitlab
2: ssh git@localhost



and back to the root user, so we don't need to care about permissions.

GitLab needs a few gems, we haven't installed yet:

1:   curl http://python-distribute.org/distribute_setup.py | python
2:   easy_install pip
3:   pip install pygments
4:   gem install bundler



As mentioned before, the gitlab user will have to do a bit of administration stuff, so we need to

DIVINE IT LIMITED                                                                          Page 4
GitLab Installation on CentOS – 6.3


give him sudo rights. To do so, we edit the sudoers file with visudo:


1: visudo



Add gitlab ALL=(ALL) ALL after root ALL=(ALL) ALL so it looks like this:


1:   ...
2:   root ALL=(ALL) ALL
3:   gitlab ALL=(ALL) ALL
4:   ...



Do not edit anything else!!!

After another two gems we are finished with the gem stuff:



1: gem install ruby-debug19
2: gem install charlock_holmes



We now switch to our gitlab user and we won't use our root account anymore:


1: su gitlab



Get the GitLab software:

1: cd && git clone git://github.com/gitlabhq/gitlabhq.git
2: cd gitlabhq
We're nearly done. Next we bundle our application.


1: bundle install



GitLab will use a MySQL database (in our case), which we need to install and start:

1: yum -y install mysql-server
2: /etc/init.d/mysqld start


DIVINE IT LIMITED                                                                     Page 5
GitLab Installation on CentOS – 6.3


To configure the MySQL server easily we use:



1: mysql_secure_installation



Remember the password type in for root!

We now connect to our database server to create a user for GitLab:



1: mysql -u root -p # when prompted enter the root password we've chosen in mysql_secure_installation



We now have a mysql shell. Mind the trailing ; !



1: mysql> CREATE DATABASE gitlab CHARACTER SET UTF8;
2: mysql> GRANT ALL PRIVILEGES ON gitlab.* TO 'gitlabusr'@'localhost' IDENTIFIED BY 'supersecret' WITH GRANT
OPTION;
3: mysql> quit



Remember the password and username (here: gitlabusr and supersecret)!


To create the database a script is deployed with GitLab. However it needs an additional service
to run:



1: sudo nohup redis-server > /dev/null



Enter the password created for the gitlab user and hit CTRL+Z. Then type



1: bg



The service is now running in background.

DIVINE IT LIMITED                                                                                       Page 6
GitLab Installation on CentOS – 6.3


We now configure GitLab by copying the configurion files from example to real:



1: cp ~/gitlabhq/config/database.yml.example ~/gitlabhq/config/database.yml
2: cp ~/gitlabhq/config/gitlab.yml.example ~/gitlabhq/config/gitlab.yml

In database.yml we have to edit the production settings of database (at the very top of the file).
We have to change the database-name, username and password.

We will now create the database structure:



1: RAILS_ENV=production rake db:setup
2: RAILS_ENV=production rake db:seed_fu



To start the server we use



1: bundle exec rails s -e production




That's it. We're done. All have to do now, is set up firewall and navigate to http://ip-or-
domain:3000/ and log in with

user: admin@local.host
pass: 5iveL!fe




DIVINE IT LIMITED                                                                             Page 7

More Related Content

What's hot

How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
Tiago Simões
 
AWS 기반 Docker, Kubernetes
AWS 기반 Docker, KubernetesAWS 기반 Docker, Kubernetes
AWS 기반 Docker, Kubernetes
정빈 권
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...
Tiago Simões
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
YoungHeon (Roy) Kim
 
Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...
Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...
Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...
SUSE
 
Installing spark 2
Installing spark 2Installing spark 2
Installing spark 2
Ahmed Mekawy
 
Installing OpenStack Juno using RDO on RHEL
Installing OpenStack Juno using RDO on RHELInstalling OpenStack Juno using RDO on RHEL
Installing OpenStack Juno using RDO on RHEL
openstackstl
 
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open sourceHow to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
Taehee Jang
 
MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & cluster
elliando dias
 
Openstack installation using rdo multi node
Openstack installation using rdo multi nodeOpenstack installation using rdo multi node
Openstack installation using rdo multi node
Narasimha sreeram
 
Installing hive on ubuntu 16
Installing hive on ubuntu 16Installing hive on ubuntu 16
Installing hive on ubuntu 16
Enrique Davila
 
使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台
NUTC, imac
 
Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource Consulting
Open Source Consulting
 
Installing apache sqoop
Installing apache sqoopInstalling apache sqoop
Installing apache sqoop
Enrique Davila
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
NUTC, imac
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Arun Ganesh
 
Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16
Enrique Davila
 
{'python': 'dict'}
{'python': 'dict'}{'python': 'dict'}
{'python': 'dict'}
nybon
 
Docker 基本概念與指令操作
Docker  基本概念與指令操作Docker  基本概念與指令操作
Docker 基本概念與指令操作
NUTC, imac
 
CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지
충섭 김
 

What's hot (20)

How to go the extra mile on monitoring
How to go the extra mile on monitoringHow to go the extra mile on monitoring
How to go the extra mile on monitoring
 
AWS 기반 Docker, Kubernetes
AWS 기반 Docker, KubernetesAWS 기반 Docker, Kubernetes
AWS 기반 Docker, Kubernetes
 
How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...How to create a multi tenancy for an interactive data analysis with jupyter h...
How to create a multi tenancy for an interactive data analysis with jupyter h...
 
My sql failover test using orchestrator
My sql failover test  using orchestratorMy sql failover test  using orchestrator
My sql failover test using orchestrator
 
Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...
Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...
Software-defined Datacenter Maintenance - No More Sleepless Nights and Long W...
 
Installing spark 2
Installing spark 2Installing spark 2
Installing spark 2
 
Installing OpenStack Juno using RDO on RHEL
Installing OpenStack Juno using RDO on RHELInstalling OpenStack Juno using RDO on RHEL
Installing OpenStack Juno using RDO on RHEL
 
How to manage Microsoft Azure with open source
How to manage Microsoft Azure with open sourceHow to manage Microsoft Azure with open source
How to manage Microsoft Azure with open source
 
MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & cluster
 
Openstack installation using rdo multi node
Openstack installation using rdo multi nodeOpenstack installation using rdo multi node
Openstack installation using rdo multi node
 
Installing hive on ubuntu 16
Installing hive on ubuntu 16Installing hive on ubuntu 16
Installing hive on ubuntu 16
 
使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台
 
Docker on openstack by OpenSource Consulting
Docker on openstack by OpenSource ConsultingDocker on openstack by OpenSource Consulting
Docker on openstack by OpenSource Consulting
 
Installing apache sqoop
Installing apache sqoopInstalling apache sqoop
Installing apache sqoop
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
 
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of IndiaTutorial to setup OpenStreetMap tileserver with customized boundaries of India
Tutorial to setup OpenStreetMap tileserver with customized boundaries of India
 
Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16
 
{'python': 'dict'}
{'python': 'dict'}{'python': 'dict'}
{'python': 'dict'}
 
Docker 基本概念與指令操作
Docker  基本概念與指令操作Docker  基本概念與指令操作
Docker 基本概念與指令操作
 
CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지
 

Viewers also liked

git 101
git 101git 101
git 101
Adriano Melo
 
Git Rápido e Fácil
Git Rápido e FácilGit Rápido e Fácil
Git Rápido e Fácil
Giordano Alves
 
Basics About Git & GitHub
Basics About Git & GitHubBasics About Git & GitHub
Basics About Git & GitHub
Raiful Hasan
 
Nway-Project, Git, github & opensource
Nway-Project, Git, github & opensourceNway-Project, Git, github & opensource
Nway-Project, Git, github & opensource
Hudson Mendes
 
Introdução ao Git
Introdução ao Git   Introdução ao Git
Introdução ao Git
Eduardo D'Avila
 
Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012
Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012
Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012
Mauro George
 
Fluxo de desenvolvimento de software utilizando Git
Fluxo de desenvolvimento de software utilizando GitFluxo de desenvolvimento de software utilizando Git
Fluxo de desenvolvimento de software utilizando Git
Bruno Ricardo Siqueira
 
GIT Introduction
GIT IntroductionGIT Introduction
GIT Introduction
Raiful Hasan
 
Controle de versão utilizando git
Controle de versão utilizando gitControle de versão utilizando git
Controle de versão utilizando git
fredmosc
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
viniciusban
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
viniciusban
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
Kumaran Balachandran
 
Introduction to Gitlab
Introduction to GitlabIntroduction to Gitlab
Introduction to Gitlab
Julien Pivotto
 
Aprendendo Git
Aprendendo GitAprendendo Git
Aprendendo Git
Bismarck Gomes
 

Viewers also liked (14)

git 101
git 101git 101
git 101
 
Git Rápido e Fácil
Git Rápido e FácilGit Rápido e Fácil
Git Rápido e Fácil
 
Basics About Git & GitHub
Basics About Git & GitHubBasics About Git & GitHub
Basics About Git & GitHub
 
Nway-Project, Git, github & opensource
Nway-Project, Git, github & opensourceNway-Project, Git, github & opensource
Nway-Project, Git, github & opensource
 
Introdução ao Git
Introdução ao Git   Introdução ao Git
Introdução ao Git
 
Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012
Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012
Git para iniciantes v1.3.0 @ PHP Conference Brasil 2012
 
Fluxo de desenvolvimento de software utilizando Git
Fluxo de desenvolvimento de software utilizando GitFluxo de desenvolvimento de software utilizando Git
Fluxo de desenvolvimento de software utilizando Git
 
GIT Introduction
GIT IntroductionGIT Introduction
GIT Introduction
 
Controle de versão utilizando git
Controle de versão utilizando gitControle de versão utilizando git
Controle de versão utilizando git
 
Gitlab flow
Gitlab flowGitlab flow
Gitlab flow
 
Gitlab flow solo
Gitlab flow soloGitlab flow solo
Gitlab flow solo
 
Up GitLab Presentation 2015
Up GitLab Presentation 2015Up GitLab Presentation 2015
Up GitLab Presentation 2015
 
Introduction to Gitlab
Introduction to GitlabIntroduction to Gitlab
Introduction to Gitlab
 
Aprendendo Git
Aprendendo GitAprendendo Git
Aprendendo Git
 

Similar to Gitlab installation

How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
VEXXHOST Private Cloud
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
alignan
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
OlinData
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
Matt Gauger
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
Teerapat Khunpech
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
Anuj Sharma
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
bpowell29a
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
Somkiat Puisungnoen
 
Git github
Git githubGit github
Git github
Anurag Deb
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
HuthaifaAlmaqrami1
 
5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI
Sebastian Witowski
 
Git intro hands on windows with msysgit
Git intro hands on windows with msysgitGit intro hands on windows with msysgit
Git intro hands on windows with msysgit
Geshan Manandhar
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
Lingvokot
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
Hello Git
Hello GitHello Git
Hello Git
bsadd
 
Git training
Git trainingGit training
Git training
eric7master
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
Cloud 66
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
David Newbury
 
Git hooks
Git hooksGit hooks
Git hooks
Skills Matter
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
Hitesh670643
 

Similar to Gitlab installation (20)

How To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub CloneHow To Install GitLab As Your Private GitHub Clone
How To Install GitLab As Your Private GitHub Clone
 
GIT in a nutshell
GIT in a nutshellGIT in a nutshell
GIT in a nutshell
 
FOSDEM 2017: GitLab CI
FOSDEM 2017:  GitLab CIFOSDEM 2017:  GitLab CI
FOSDEM 2017: GitLab CI
 
Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010Matt Gauger - Git & Github web414 December 2010
Matt Gauger - Git & Github web414 December 2010
 
Gitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTreeGitlab Training with GIT and SourceTree
Gitlab Training with GIT and SourceTree
 
Git for a newbie
Git for a newbieGit for a newbie
Git for a newbie
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Introduction to Git and Github
Introduction to Git and GithubIntroduction to Git and Github
Introduction to Git and Github
 
Git github
Git githubGit github
Git github
 
1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx1-Intro to VC & GIT PDF.pptx
1-Intro to VC & GIT PDF.pptx
 
5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI5 Things I Wish I Knew About Gitlab CI
5 Things I Wish I Knew About Gitlab CI
 
Git intro hands on windows with msysgit
Git intro hands on windows with msysgitGit intro hands on windows with msysgit
Git intro hands on windows with msysgit
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
Hello Git
Hello GitHello Git
Hello Git
 
Git training
Git trainingGit training
Git training
 
Docker at Digital Ocean
Docker at Digital OceanDocker at Digital Ocean
Docker at Digital Ocean
 
Introduction to Git for Artists
Introduction to Git for ArtistsIntroduction to Git for Artists
Introduction to Git for Artists
 
Git hooks
Git hooksGit hooks
Git hooks
 
Git and Github.pptx
Git and Github.pptxGit and Github.pptx
Git and Github.pptx
 

Recently uploaded

Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
Fwdays
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
UiPathCommunity
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
manji sharman06
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
FilipTomaszewski5
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 

Recently uploaded (20)

Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba"NATO Hackathon Winner: AI-Powered Drug Search",  Taras Kloba
"NATO Hackathon Winner: AI-Powered Drug Search", Taras Kloba
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
Day 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio FundamentalsDay 2 - Intro to UiPath Studio Fundamentals
Day 2 - Intro to UiPath Studio Fundamentals
 
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
Call Girls Chandigarh🔥7023059433🔥Agency Profile Escorts in Chandigarh Availab...
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeckPoznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
Poznań ACE event - 19.06.2024 Team 24 Wrapup slidedeck
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 

Gitlab installation

  • 1. GitLab Installation with Git & Gitolite on CentOS – 6.3 Raiful Hasan DIVINE IT LIMITED
  • 2. GitLab Installation on CentOS – 6.3 Preperation: The main problem with installing GitLab on CentOS is that - other than Ubuntu or Fedora - it doesn't have the ICU(lib) installed and that's why ruby crashes/doesn't run around. We will work as root most of the time, so make sure you have the permissions to do so First of all we need to add the epel repo to yum to get all the packages we want. 1: rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm Then we install all required packages: 1: yum -y groupinstall 'Development Tools' 'Additional Development' 2: yum -y install readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc gitolite sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2- devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel redis Up next: Downloading and extracting ruby: 1: curl -O http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz 2: tar xzvf ruby-1.9.3-p0.tar.gz 3: cd ruby-1.9.3-p0 1) Configure without binary suffix 1: ./configure --enable-shared --disable-pthread Now install ruby: 1: make && make install DIVINE IT LIMITED Page 2
  • 3. GitLab Installation on CentOS – 6.3 Some may need to install qt-devel qtwebkit-devel by running (Replace the 64 in the path with 32 if you're running on a 32 bit box) 1: yum install qt-devel qtwebkit-devel 2: export PATH=$PATH:/usr/lib64/qt4/bin Now we have to install all the gems GitLab needs to run: 1: gem update --system 2: gem update 3: gem install rails Now everything is set up and we can start to configure the environment for GitLab. First we create a user, that will run GitLab: 1: adduser --shell /bin/bash --create-home --home-dir /home/gitlab gitlab Because this user will be the Admin of the repos on the server, we need to have a RSA key pair to authenticate: 1: su gitlab 2: ssh-keygen -t rsa # as gitlab user Now switch back to root account. Because GitLab is only a graphical user interface to manage repos, we need a powerfull backend. gitolite will do this for us. We also need a user for gitolite. 1: adduser --system --shell /bin/sh --comment 'gitolite' --create-home --home-dir /home/git git Gitolite needs to know one key, that it knows as admin. We will pass the key of GitLab to gitolite. To do so we first copy the private key of our gitlab user to the home directory of our gitolite user: 1: # make sure you do this as root 2: cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub DIVINE IT LIMITED Page 3
  • 4. GitLab Installation on CentOS – 6.3 Now we need to initialize gitolite: 1: su git 2: gl-setup ~/gitlab.pub # this passes the admin key to gitolite When the prompt appears edit the provided file (it's in a vi-Editor) and set $REPO_UMASK to 0007 Switch back to root user now. We now need to give our management software (GitLab) access to the repos: 1: usermod -a -G git gitlab 2: chmod -R g+rwX /home/git/repositories/ 3: chmod 770 /home/git Because the gitlab user will need a password later on, we configure it right now, so we are finished with all the user stuff. 1: passwd gitlab # please choose a good password :) As next step we need to introduce GitLab to gitolite (that is, we let them change their SSH-keys) 1: su gitlab 2: ssh git@localhost and back to the root user, so we don't need to care about permissions. GitLab needs a few gems, we haven't installed yet: 1: curl http://python-distribute.org/distribute_setup.py | python 2: easy_install pip 3: pip install pygments 4: gem install bundler As mentioned before, the gitlab user will have to do a bit of administration stuff, so we need to DIVINE IT LIMITED Page 4
  • 5. GitLab Installation on CentOS – 6.3 give him sudo rights. To do so, we edit the sudoers file with visudo: 1: visudo Add gitlab ALL=(ALL) ALL after root ALL=(ALL) ALL so it looks like this: 1: ... 2: root ALL=(ALL) ALL 3: gitlab ALL=(ALL) ALL 4: ... Do not edit anything else!!! After another two gems we are finished with the gem stuff: 1: gem install ruby-debug19 2: gem install charlock_holmes We now switch to our gitlab user and we won't use our root account anymore: 1: su gitlab Get the GitLab software: 1: cd && git clone git://github.com/gitlabhq/gitlabhq.git 2: cd gitlabhq We're nearly done. Next we bundle our application. 1: bundle install GitLab will use a MySQL database (in our case), which we need to install and start: 1: yum -y install mysql-server 2: /etc/init.d/mysqld start DIVINE IT LIMITED Page 5
  • 6. GitLab Installation on CentOS – 6.3 To configure the MySQL server easily we use: 1: mysql_secure_installation Remember the password type in for root! We now connect to our database server to create a user for GitLab: 1: mysql -u root -p # when prompted enter the root password we've chosen in mysql_secure_installation We now have a mysql shell. Mind the trailing ; ! 1: mysql> CREATE DATABASE gitlab CHARACTER SET UTF8; 2: mysql> GRANT ALL PRIVILEGES ON gitlab.* TO 'gitlabusr'@'localhost' IDENTIFIED BY 'supersecret' WITH GRANT OPTION; 3: mysql> quit Remember the password and username (here: gitlabusr and supersecret)! To create the database a script is deployed with GitLab. However it needs an additional service to run: 1: sudo nohup redis-server > /dev/null Enter the password created for the gitlab user and hit CTRL+Z. Then type 1: bg The service is now running in background. DIVINE IT LIMITED Page 6
  • 7. GitLab Installation on CentOS – 6.3 We now configure GitLab by copying the configurion files from example to real: 1: cp ~/gitlabhq/config/database.yml.example ~/gitlabhq/config/database.yml 2: cp ~/gitlabhq/config/gitlab.yml.example ~/gitlabhq/config/gitlab.yml In database.yml we have to edit the production settings of database (at the very top of the file). We have to change the database-name, username and password. We will now create the database structure: 1: RAILS_ENV=production rake db:setup 2: RAILS_ENV=production rake db:seed_fu To start the server we use 1: bundle exec rails s -e production That's it. We're done. All have to do now, is set up firewall and navigate to http://ip-or- domain:3000/ and log in with user: admin@local.host pass: 5iveL!fe DIVINE IT LIMITED Page 7