GitLab搭建-使用清华大学开源软件镜像站

GitLab搭建

  • GitLab是什么
  • GitLab解决什么问题
  • GitLab搭建
  • GitLab博客

GitLab是什么。


     GitLab是一个用于仓库管理系统的开源项目;使用Git作为代码管理工具,并在此基础上搭建起来的web服务。
     1、Web框架使用Ruby on Rails
     2、基于MIT代码发布协议
     3、需要gitonlite协同工作

安装要求:

  • Ubuntu/Debian(推荐这2个系统,也可以安装到CentOS系统中,并且在GitHub上有CentOS的GitLab一键安装脚本)
  • ruby 1.9.3+
  • MySQL
  • git
  • gitolite
  • redis

GitLab解决什么问题。

       通过Web界面进行访问公开的或者私人项目,它拥有和github类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个历史版本库。团队成员可以通过内置的聊天程序进行聊天,它还提供一个代码片段收集功能可以轻松实现代码复用。


GitLab搭建

CentOS 6
第一步:
sudo yum install curl openssh-server openssh-clients postfix cronie
sudo service postfix start
sudo chkconfig postfix on
sudo lokkit -s http -s ssh

第二步:注意这一步会出现无法定位gitlab-ce 办法如下解决
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce

第三步:
sudo gitlab-ctl reconfigure

  • 在进行gitlab-ce下载的时候会错误“无法定位gitlab-ce”。其中原因是阿里源或者163源没有该映像,我这里找到一个解决办法是浙大或者清华大学提供的镜像。https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
  • Debian/Ubuntu 用户

      首先信任 GitLab 的 GPG 公钥:
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null

      再选择你的 Debian/Ubuntu 版本,文本框中内容写进/etc/apt/source.list.d/gitlab-ce.list
deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu xenial main
      安装 gitlab-ce:
sudo apt-get update
sudo apt-get install gitlab-ce
  • CentOS/RHE
      新建 /etc/yum.repos.d/gitlab-ce.repo,内容为  
[gitlab-ce]
name=gitlab-ce
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
repo_gpgcheck=0
gpgcheck=0
enabled=1
gpgkey=https://packages.gitlab.com/gpg.key

      再执行
sudo yum makecache
sudo yum install gitlab-ce



  • 4
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值