如果長時間沒有升級導致,比如現在我這裏是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
成功了~