GitLab服务器搭建

作者: 夹胡碰 | 来源:发表于2020-07-28 16:16 被阅读0次

1.软件准备

准备Centos7虚拟机
以下是百度网盘下载 提取码 6666
VMware-workstation-full-15
VMware15激活码 CG392-4PX5J-H816Z-HYZNG-PQRG2
CentOS-7-x86_64-DVD-1708.iso

2.环境准备

安装依赖
yum install -y curl policycoreutils-python openssh-server
关闭防火墙并禁用防火墙
systemctl stop firewalld
systemctl disable firewalld

3.安装GitLab

包含两种方式

3.1 [方式一] 设置gitlab安装源,下载最新版本
vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce repository
baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
gpgcheck=0
enabled=1
yum install -y gitlab-ce

注意: GitLab有离线导入导出功能,如果两个GitLab服务器版本不一致,容易导致导入失败,这种情况就可以使用指定版本安装。

3.2 [方式二]下载指定版本并安装
yum install -y gitlab-ce-10.4.1-ce.0.el7.x86_64.rpm
安装成功
image.png

4. GitLab启动及使用

修改配置
vim /etc/gitlab/gitlab.rb
# 修改访问IP
external_url 'http://192.168.227.129:8085'
启动
gitlab-ctl reconfigure
查看状态
gitlab-ctl status
image.png
UI界面

http://192.168.227.129:8085
首次登陆需要设置密码 eg: 12345678
账号为 root

image.png image.png
取消UI注册
image.png
image.png
注册用户
image.png

5. 拓展

  1. GitLab定时备份及恢复

相关文章

网友评论

    本文标题:GitLab服务器搭建

    本文链接:https://www.haomeiwen.com/subject/dxyfrktx.html