0%

GitLab 安装、迁移和升级

GitLab 安装、迁移和升级

记录GitLab 安装、迁移和升级命令。

安装介质可以从 gitlab 官网 选择对应的操作系统版本进行下载

操作系统版本:CentOS 6.5_64

GitLab 版本:7.14.1

GitLab 安装

1
2
3
4
5
6
yum install curl openssh-server postfix cronie
service postfix start
chkconfig postfix on
chkconfig iptables off
service iptables stop
rpm -ivh gitlab-ce-7.14.1-ce.0.el6.x86_64.rpm

GitLab 迁移

注意:gitlab 版本要保持一致

1
2
3
4
5
cp 1454176910_gitlab_backup.tar /var/opt/gitlab/backups
gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
gitlab-rake gitlab:backup:restore BACKUP=1454176910
gitlab-ctl start

GitLab 升级

注意:gitlab 服务器升级版本会自动备份

1
rpm -Uvh gitlab-ce-8.3.1-ce.1.el6.x86_64.rpm