赞
踩
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/
centos7选择el7 centos8选择el8下载
- # 安装
- yum install -y gitlab-ce-13.0.1-ce.0.el7.x86_64.rpm
-
- # 修改配置 设置访问的域名 如下(访问者需要在主机配置hosts 节点ip /gitlab.tech.com)
- vim /etc/gitlab/gitlab.rb
-
- external_url 'http://gitlab.tech.com'
-
- # 重载配置 启动打包的多个服务
- gitlab-ctl reconfigure
-
- # 停掉暂时不用的服务(默认装了很多相关的服务)
- gitlab-ctl stop gitlab-exporter
- gitlab-ctl stop grafana
- gitlab-ctl stop prometheus
访问者需要在主机配置hosts,gitlab节点ip gitlab.tech.com
ssh key可以让开发者电脑安全的访问gitlab,需要先生成一对秘钥,公钥保存到gitlab中
应在开发者电脑执行,为了演示在linux执行
- # 生成ssh key
- ssh-keygen -t rsa -C "你的邮箱"
-
- Generating public/private rsa key pair.
- Enter file in which to save the key (/root/.ssh/id_rsa):
- Created directory '/root/.ssh'.
- Enter passphrase (empty for no passphrase):
- Enter same passphrase again:
- Your identification has been saved in /root/.ssh/id_rsa.
- Your public key has been saved in /root/.ssh/id_rsa.pub.
- The key fingerprint is:
- SHA256:PuJSFTr3bbWdomPFI1KL52UQmKWiIreJO78PALW2Rvw 你的邮箱
-
- # 将公钥内容保存到gitlab
- cat id_rsa.pub
-
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/KDk7DnwPDHaAOa1nP2bza4Y5XwgCXtWk/tN2+mGN1kyQBgRz/JuO6Gw+HeXDCmslaD/a+JNhdt7pSjHUS8BJUNXOYkMS/gPIHLYxooZKsF34PqfjZYmcKa+eOLY73FwRQoJu/FvRnw1YHSXKkmmfpB0hYJmQk940ZaZ4uZ2/b/G2Ug8bSiWQG7s5P2f1MtkdfsKzdATRkqCP03LN+vZtcbq/K8jMAm3a4HyQYk4XqDkxd457+hGUj1AXs7qfs5ZHHYkRSKAAqszyoy5rXEaHBBYBkv57sMAZM/MxBjWkTw9gCrOOR+UNwtROSfc3nBuw811OnTFIX/PP4NJNybjL 你的邮箱
-
-
-
先创建组
在创建的组中创建project
新版的gitlab默认开启了 Auto DevOps,如果不需要持续集成可以关闭
如果需重启gitlab,可以执行如下
gitlab-ctl restart
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。