备份(此方法不会删除已有数据,以防万一建议备份)
备份方法参加官网
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md
先删除当前版本
sudo gitlab-ctl stop
sudo gitlab-ctl uninstall
sudo yum remove gitlab-ce
sudo gitlab-ctl cleanse #保留数据不执行该命令
sudo rm -rf /opt/gitlab #保留数据不执行该命令
到该网址选择指定版本
https://packages.gitlab.com/gitlab/gitlab-ce
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce-10.7.2-ce.0.el7.x86_64
- 备选
# Debian/Ubuntu
dpkg -i gitlab-ce-XXX.deb
# CentOS/RHEL
rpm -Uvh gitlab-ce-XXX.rpm