如果长时间没有升级导致,比如现在我这里是8.14.6升级到11.7.5不可以直接一次性升级到11版本 ,要先从8升级到8的最后一个版本,再到9的最后一个版本,再到10的最后一个版本,最后才到11版本. 本来应该是这样升级的8.14.6-->8.17.8-->9.5.10-->10.8.7-->11.7.5 但是我直接从8.14.6-->9.5.10也成功了就省了一步 社区版下载最新版本11.7.5: https://packages.gitlab.com/gitlab/gitlab-ce

可以直接复制链接到下载器下载再上传到服务器 wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm/download.rpm

我的系统是centos7 筛选出el/7的版本 https://packages.gitlab.com/app/gitlab/gitlab-ce/search?dist=el%2F7&page=10 下载地址如下 https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-8.17.8-ce.0.el7.x86_64.rpm/download.rpm https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-9.5.10-ce.0.el7.x86_64.rpm/download.rpm https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm/download.rpm https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm/download.rpm

停止unicorn sidekiq nginx

[root@test32 backups]#  gitlab-ctl stop unicorn
ok: down: unicorn: 1s, normally up
[root@test32 backups]# gitlab-ctl stop sidekiq
ok: down: sidekiq: 1s, normally up
[root@test32 backups]# gitlab-ctl stop nginx
ok: down: nginx: 1s, normally up
[root@test32 backups]# 

[root@test32 backups]# cd /home/software
[root@test32 software]# rpm -Uvh gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm 
warning: gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing...                          ################################# [100%]
gitlab preinstall: It seems you are upgrading from 8.x version series
gitlab preinstall: to 11.x series. It is recommended to upgrade
gitlab preinstall: to the last minor version in a major version series first before
gitlab preinstall: jumping to the next major version.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations
gitlab preinstall: and upgrade to 10.8 first.
error: %pre(gitlab-ce-11.7.5-ce.0.el7.x86_64) scriptlet failed, exit status 1
error: gitlab-ce-11.7.5-ce.0.el7.x86_64: install failed
error: gitlab-ce-8.14.6-ce.0.el7.x86_64: erase skipped

升级失败

[root@test32 software]# gitlab-ctl reconfigure
[root@test32 software]# gitlab-ctl restart 

再打开gitlab 502 ,稍等一下再刷新 即可登录,说明升级失败没影响

升级的办法: 提示需要10.8版本的 查看文档https://docs.gitlab.com/ee/policy/maintenance.html#upgrade-recommendations

得知10.8.7是版本中的最后一个版本 去下载10.8.7版本的gitlab-ce 再次升级 需要9.5.10版本的gitlab

重启 gitlab-ctl restart

n多日志,截几屏如下

结束了 重启查看版本

[root@test32 software]# gitlab-ctl restart

成功升级到了9.5.10 ,接下来同样的步骤升级到10.8.7再到11.7.5

[root@test32 software]# rpm -Uvh gitlab-ce-10.8.7-ce.0.el7.x86_64.rpm

到现在升级到了10.8.7版本, 跨步太大了, 表示界面复杂看不懂 . 继续升级到11.7.5

gitlab-ctl stop unicorn
gitlab-ctl stop sidekiq
gitlab-ctl stop nginx
rpm -Uvh gitlab-ce-11.7.5-ce.0.el7.x86_64.rpm 
gitlab-ctl restart 

成功了~