首批通过分布式安全可靠测评,为关键业务系统打造
升级 obd
更新时间:2025-11-06 19:42:33
本文根据 obd 所在的机器是否可以连接外部网络,分为在线部署和离线部署两种方法介绍如何升级 obd。
背景介绍
安装 obd 有两种常见方式:通过 OceanBase All in One 安装、使用 RPM 包安装。不同安装方式有如下不同的升级方法:
若原 obd 是通过 OceanBase All in One 安装,建议参见 安装 obd 中 升级 OceanBase All in One 步骤升级 obd。
若原 obd 是使用 RPM 包安装,建议通过
obd update命令升级,具体可参见本文操作。
在线升级
当机器可以连接外部网络时,您可按照如下操作升级 obd。在线升级时会自动将 obd 升级到最新版本,如需指定升级目标版本,可下载指定版本的安装包后参见下文 离线升级 步骤操作。
开启远程镜像库
obd mirror enable remote执行成功后,可执行
obd mirror list命令验证远程镜像库是否被开启。查看 Type=remote 对应行的Enabled列为True,说明已打开远程镜像源,输出如下:+-----------------------------------------------------------------------------+ | Mirror Repository List | +----------------------------+--------+---------+----------+------------------+ | SectionName | Type | Enabled | Avaiable | Update Time | +----------------------------+--------+---------+----------+------------------+ | local | local | - | True | 2025-03-25 13:48 | | oceanbase.community.stable | remote | True | True | 2025-03-25 13:48 | | oceanbase.development-kit | remote | True | True | 2025-03-25 13:48 | +----------------------------+--------+---------+----------+------------------+升级 obd
obd update验证 obd 版本
obd --version输出如下,升级到了 V3.1.2 版本。
OceanBase Deploy: 3.1.2 REVISION: 739be300c448342b2850c71087bee01091dd7cb7 BUILD_BRANCH: HEAD BUILD_TIME: Feb 14 2025 14:43:32OURCE Copyright (C) 2025 OceanBase License Apache 2.0: Apache version 2 or later <https://www.apache.org/licenses/LICENSE-2.0>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
离线升级
当机器无法连接外部网络时,您需先访问 OceanBase 软件下载中心 获取 obd 的安装包,并将其上传到 obd 所在机器中。之后可在安装包所在目录下按照如下步骤升级 obd。
上传安装包到本地镜像库
obd mirror clone ob-deploy-*.rpm上传后可执行
obd mirror list local | grep ob-deploy命令查看本地镜像库中的安装包,输出如下:| ob-deploy | 3.1.2 | 1.el7 | x86_64 | 75a9be0ab6bd723754febe30970a27fd52c5cdd7 |关闭远程镜像库
obd mirror disable remote执行成功后可执行
obd mirror list命令确认远程镜像库是否被关闭,查看 Type=remote 对应行的Enabled列为False,说明已关闭远程镜像源,输出如下。+-----------------------------------------------------------------------------+ | Mirror Repository List | +----------------------------+--------+---------+----------+------------------+ | SectionName | Type | Enabled | Avaiable | Update Time | +----------------------------+--------+---------+----------+------------------+ | local | local | - | True | 2025-03-25 14:04 | | oceanbase.community.stable | remote | False | False | 2025-03-25 13:53 | | oceanbase.development-kit | remote | False | False | 2025-03-25 13:53 | +----------------------------+--------+---------+----------+------------------+升级 obd
obd update验证 obd 版本
obd --version输出如下,升级到了 V3.1.2 版本。
OceanBase Deploy: 3.1.2 REVISION: 739be300c448342b2850c71087bee01091dd7cb7 BUILD_BRANCH: HEAD BUILD_TIME: Feb 14 2025 14:43:32OURCE Copyright (C) 2025 OceanBase License Apache 2.0: Apache version 2 or later <https://www.apache.org/licenses/LICENSE-2.0>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.