安装 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
发布了112 篇原创文章 · 获赞 6 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/studywinwin/article/details/104803941