安装 gitlab 和 gitlab的备份与恢复

安装 gitlab

官方文档 https://about.gitlab.com/install/#centos-7

配置yum源

vim /etc/yum.repos.d/gitlab-ce.repo
[gitlab-ce]
name=gitlab-ce
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
enabled=1
gpgcheck=0
gpgkey=https://packages.gitlab.com/gpg.key

安装

花费的时间有点长

yum install gitlab-ce -y

配置

与gitlab相关的服务全部启动起来

gitlab-ctl reconfigure

在这里插入图片描述

相关命令

gitlab-ctl start|stop|restart|status

相关命令: https://www.cnops.xyz/archives/1204

浏览器访问
192.168.43.49
在这里插入图片描述

在这里插入图片描述

nginx的配置文件
/var/opt/gitlab/nginx/conf/gitlab-http.conf

可以创建组,在组里再创建项目
可以创建用户,在创建项目
其它的操作与 github 一样

gitlab的备份与恢复

在线备份

gitlab-rake gitlab:backup:create

备份的文件
/var/opt/gitlab/backups/1583933551_2020_03_11_12.8.5_gitlab_backup.tar

恢复

gitlab-ctl stop unicorn; gitlab-ctl stop sidekiq
gitlab-rake gitlab:backup:restore BACKUP=1583933551_2020_03_11_12.8.5
gitlab-ctl start
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值