gitlab跨版本升级步骤

  • 本地工作备忘录记录到线上,以删除本地文件

  • GitLab社区版不支持“直接跨版本升级”,需按照官方指南一步步向上升级,若版本越旧,需要跨的版本就越多

升级路径

https://docs.gitlab.com/ee/update/index.html#upgrade-paths
https://docs.gitlab.com/ee/update/package/
https://gitlab-com.gitlab.io/support/toolbox/upgrade-path/

GitLab 8: 8.11.Z > 8.12.0 > 8.17.7
GitLab 9: 9.0.13 > 9.5.10
GitLab 10: 10.0.7 > 10.8.7
GitLab 11: 11.0.6 > 11.11.8
GitLab 12: 12.0.12 > 12.1.17 > 12.10.14
GitLab 13: 13.0.14 > 13.1.11 > 13.8.8 > 13.12.15
GitLab 14: 14.0.12 > 14.3.6 > 14.9.5 > 14.10.5
GitLab 15: 15.0.5 > 15.1.6 (for GitLab instances with multiple web nodes) > 15.4.6 > 15.11.x
GitLab 16: latest 16.Y.Z

严重漏洞

https://zhuanlan.zhihu.com/p/557593326

先停止

gitlab-ctl stop unicorn && gitlab-ctl stop sidekiq && gitlab-ctl stop nginx

下载依次升级包

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.8.8-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-13.12.15-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.0.12-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.3.6-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.9.5-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.10.5-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.0.5-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.4.6-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-15.11.13-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-16.3.9-ce.0.el7.x86_64.rpm
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-16.7.10-ce.0.el7.x86_64.rpm

执行更新

rpm -Uvh gitlab-ce-13.8.8-ce.0.el7.x86_64.rpm

可能会报错policycoreutils-python,执行命令

#yum -y install policycoreutils-python

Centos8可能安装不成功,执行:

#cd /etc/yum.repos.d/
#sed -i ‘s/mirrorlist/#mirrorlist/g’ /etc/yum.repos.d/CentOS-*
#sed -i ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g’ /etc/yum.repos.d/CentOS-*
#yum -y install policycoreutils-python

重启

gitlab-ctl restart

Logo

汇聚全球AI编程工具,助力开发者即刻编程。

更多推荐