gitlab安装-恢复备份

下载安装包
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.6-ce.0.el7.x86_64.rpm
如遇错误依赖
错误:依赖检测失败:
policycoreutils-python 被 gitlab-ce-10.0.6-ce.0.el7.x86_64 需要
解决方法:
yum install policycoreutils-python

rpm包解压安装
rpm -ivh gitlab-ce-10.0.6-ce.0.el7.x86_64.rpm


第一次安装必须执行重新配置
sudo gitlab-ctl reconfigure

gitlab 备份存放路径
/var/opt/gitlab/backups

 

git恢复备份
将备份文件传送到/var/opt/gitlab/backups
示例备份文件: 1627315357_2021_07_27_10.0.6_gitlab_backup.tar

gitlab-rake gitlab:backup:restore BACKUP=1627315357_2021_07_27_10.0.6 #恢复备份时在当前目录下操作 =号前面是git恢复命令 =号后面是备份的时间戳+日期+git版本 不需要添加_gitlab_backup.tar
sudo gitlab-ctl restart #重启
sudo gitlab-ctl reconfigure #重载配置文件

git域名配置
vim /etc/gitlab/gitlab.rb
external_url 'http://gitlab.inewmaker.com' 修改该该行http://内容为域名
gitlab-ctl reconfigure #重新跑一下配置


git汉化参考博客 https://www.cnblogs.com/yanjieli/p/10605381.html

posted @ 2021-07-29 17:09  Armored-forces  阅读(197)  评论(0)    收藏  举报