GitLab:如何升级到最新的小版本

24

我尝试将我的gitlab-CE从10.3.2更新到最新的版本 (目前是11.4),但它给了我这个实际上是安全的错误。

[...]
gitlab preinstall: It seems you are upgrading from 10.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.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_11.2.3-ce.0_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/gitlab-ce_11.2.3-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@this-vm# apt-cache policy gitlab-ce | grep Installed
  Installed: 10.3.2-ce.0

但是如何安装到最新的次版本?他们所提到的文档并没有说明如何操作。 你们有没有遇到过这样的问题?

但是如何安装到最新的次版本?他们所提到的文档并没有说明如何操作。你们有没有遇到过这样的问题?
7个回答

48

建议按照此处的建议,尝试升级到最新的小版本:

apt-get update
apt-get install gitlab-ce=<YOUR-LATEST-MINOR-VERSION>-ce.0
gitlab-ctl reconfigure
gitlab-ctl restart

在您的情况下,最新的次要版本是: 10.8.6 [截至今日]。
您可以查看 版本列表。 请记得在您的初始版本与目标版本之间检查变更内容

在我的情况下,不需要运行gitlab-ctl reconfigure,因为安装会自动执行“重新配置GitLab以应用迁移”。 - ReaperSoon
1
您还可以使用 $ apt update && apt show gitlab-ce -a 查看不同版本并找到所需的版本。 - Tic

6

针对 CentOS/RHEL 的参考:

按照以下步骤在 (CentOS/RHEL) 上安装次要版本。

将 11.xx 的次要版本更新为最新的 11.11.5 版本:

sudo yum install gitlab-ce-11.11.5-ce.0.el6.x86_64

同样适用于其他版本,您可以在https://packages.gitlab.com/gitlab/gitlab-ce找到需要使用的特定版本/安装命令。搜索版本字符串,例如gitlab-ce-11。单击适用于您操作系统版本的RPM或Deb包,然后您将看到所有的gitlab版本,您可以在其中找到最新版本名称并按照上述说明进行安装,但只需将其替换为您的次要版本名称,例如gitlab-ce-11.11.5-ce.0.el6.x86_64 从一个版本升级到另一个版本应该按照以下建议或官方页面here进行。
12.7.5 -> 12.10.5
11.3.4 -> 11.11.1
10.6.6 -> 10.8.3
11.3.4 -> 11.11.8
10.6.6 -> 10.8.7
9.2.3 -> 9.5.5
8.9.4 -> 8.12.3 

建议您先升级到同一主要版本中最新的次要版本,然后再升级到下一个稳定版本。


1
我正在尝试将我们现有的gitlab-ce版本11.2.1更新到最新的gitlab-ce 12.2.0。在使用yum update安装12.2.0后,当我尝试gitlab-ctl reconfigure时,出现了错误提示,需要先安装gitlab 11.0.0
因此,我删除了gitlab 12.2.0并安装了11.0.0版本。
yum remove gitlab-ce-12.2.0-ce.0.el7.x86_64.rpm
wget https://ftp.sjtu.edu.cn/sites/gitlab-ce/yum/el7/gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
rpm -Uvh gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
gitlab-ctl reconfigure
sudo gitlab-ctl restart

这个过程非常成功,我的旧数据还在,我可以使用旧凭据登录。前端版本显示为11.0.0。现在我要升级到最新版本。
gitlab-ctl stop
yum remove gitlab-ce-11.11.0-ce.0.el7.x86_64.rpm
wget https://ftp.sjtu.edu.cn/sites/gitlab-ce/yum/el7/gitlab-ce-12.2.0-ce.0.el7.x86_64.rpm
rpm -Uvh gitlab-ce-12.2.0-ce.0.el7.x86_64.rpm
gitlab-ctl reconfigure
gitlab-ctl restart

我升级到版本12后,但是遇到了另一个错误,警报管理器服务无法启动,因此我在/etc/gitlab/gitlab.rb中添加了以下代码块。

alertmanager['flags'] = {
  'cluster.advertise-address' => "127.0.0.1:9093",
}

我重新启动了GitLab,一切都正常运行。

gitlab-ctl restart

0
`enter code here`Check the latest version
1.sudo gitlab-rake gitlab:env:info:If it is above 13.12.0 then proceed with step 3.If its below please follow serially.
2."sudo apt upgrade gitlab-ee=13.12.5-ee.0": Update to any version of 13.12.x.
3.sudo apt-get update
4.sudo apt-get install gitlab-ee

0

我原本使用的是版本13.6.4,然后进行了以下升级路径:13.6.5 -> 13.6.7 -> 13.8.8 -> 13.9.2 -> 13.12.12 -> 14.0.11 -> 14.1.8 -> 14.3.6 -> 14.6.2 -> 14.9.5 -> 14.10.5 -> 15.0.2 -> 15.1.0 -> 15.4.6 -> 15.9.1 -> 15.10.0。


升级Gitlab不应需要这样的步骤。 - snowpeak

0

0
现在有一个非常有用的工具,可以让你设置当前版本和期望的版本。然后,该工具会告诉你需要安装的中间版本,以便进行升级(请注意,你必须按照特定的顺序应用这些版本,因为某些更新会在后续更新中进行数据库更改)。 Gitlab升级路径链接

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接