歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> CentOS系統安裝GitLab的步驟

CentOS系統安裝GitLab的步驟

日期:2017/3/2 11:42:26   编辑:Linux技術

  GitLab是用於倉庫管理系統的開源項目,一般安裝於Ubuntu和Debian系統,當然也可以安裝於CentOS系統,今天小編要給大家介紹的就是GitLab在CentOS系統下的安裝,以及GitLab安裝前的配置,一起來學習下吧。

 CentOS系統安裝GitLab的步驟

  前置要求

  一定要先關閉iptable與selinux

  本文安裝的系統為centos 6.2 64位系統,安裝在dell r410機器

  1、安裝epel與基礎依賴庫及軟件

  cd /tmp

  wget http://download.Fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

  1rpm -Uvh epel-release-6-8.noarch.rpm

  2yum install -y readline-devel libyaml-devel gdbm-devel ncurses-devel redis openssl-devel

  3zlib-devel gcc gcc-c++ make autoconf readline-devel curl-devel expat-devel gettext-devel

  4tk-devel libxml2-devel libffi-devel libxslt-devel libicu-devel httpd httpd-devel gitolite git-all python-devel python-pip sqlite-devel sendmail vim mysql-devel mysql-server patch libyaml* pcre-devel

  2、安裝ruby(一般默認安裝都是1.8的,官方要求1.9以上)

  mkdir /tmp/ruby && cd /tmp/ruby

  curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz

  cd ruby-1.9.3-p392/

  。/configure

  make

  make install

  gem install bundler

  ln -s /usr/local/bin/ruby /usr/bin/ruby

  ln -s /usr/local/bin/gem /usr/bin/gem

  ln -s /usr/local/bin/bundle /usr/bin/bundle

  3、創建一個git用戶供GitLab使用

  adduser --comment ‘GitLab’ git

  chmod –R 755 /home/git

  4、安裝gitlab 的shell

  # Login as git

  sudo su git

  # Go to home directory

  cd /home/git

  # Clone gitlab shell

  git clone https://github.com/gitlabhq/gitlab-shell.git

  cd gitlab-shell

  # switch to right version

  git checkout v1.3.0

  cp config.yml.example config.yml

  # Edit config and replace gitlab_url

  # with something like ‘http://domain.com/’

  vim config.yml

  # Do setup

  。/bin/install

上一頁12下一頁共2頁

Copyright © Linux教程網 All Rights Reserved