阿牛 发表于 2018-1-11 19:20:31

ubuntu/debian/centos/rhel使用镜像源一键安装gitlab-ce服务

  国内镜像源:浙大开源站http://mirrors.lifetoy.org/gitlab-ce/
  清华大学 TUNA 镜像源 https://mirror.tuna.tsinghua.edu.cn/gitlab-ce/
  一、ubuntu/debian
  1. 添加GitLab 的 GPG 公钥:
  

    curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null  

  

  2.选择版本增加镜像源
  Debian7(Wheezy)
  

    echo "deb http://mirrors.lifetoy.org/gitlab-ce/debian wheezy main" | sudo tee -a /etc/apt/sources.list.d/gitlab-ce.list  

  

  Debian8(Jessie)
  

    echo "deb http://mirrors.lifetoy.org/gitlab-ce/debian jessie main" | sudo tee -a /etc/apt/sources.list.d/gitlab-ce.list  

  

  Ubuntu 14.04 LTS(trusty)
  

    echo "deb http://mirrors.lifetoy.org/gitlab-ce/ubuntu trusty main" | sudo tee -a /etc/apt/sources.list.d/gitlab-ce.list  

  

  Ubuntu 16.04 LTS(xenial)
  

    echo "deb http://mirrors.lifetoy.org/gitlab-ce/ubuntu xenial main" | sudo tee -a /etc/apt/sources.list.d/gitlab-ce.list  

  

  3. 安装gitlab-ce
  

    sudo apt-get update  
    sudo apt-get install gitlab-ce  
  

  二、centos/rhel  
  1. /etc/yum.repos.d/gitlab-ce.repo
  centos6/rhel6
  

  
name=gitlab-ce
  
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
  
repo_gpgcheck=0 gpgcheck=0 enabled=1 gpgkey=https://packages.gitlab.com/gpg.key
  

  

  centos7/rhel7
  

  
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
  

  

  2.安装GitLab-CE:
  

  sudo yum makecache  
  sudo yum install gitlab-ce
  

  
页: [1]
查看完整版本: ubuntu/debian/centos/rhel使用镜像源一键安装gitlab-ce服务