未验证 提交 02b42498 编写于 作者: 张素娟 提交者: GitHub

update Q&A (#81)

* Update Q&A.md

* Update Q&A.md
上级 7cbe7a44
......@@ -30,19 +30,67 @@ oceanbase-ce:
A:您可以修改 `~/.obd/plugins/oceanbase-ce/` 下的启动相关插件。比如您为 3.1.0 版本的 OceanBase-CE 添加了一个新的启动配置,可以修改 `~/.obd/plugins/oceanbase-ce/3.1.0/start.py`
## Q:如何在离线模式下更新 OBD 本地镜像?
A:当您安装 OBD 的机器不能连通公网,却需要更新 OBD 或其他组件时,您可先在一台可以连通公网的机器上下载好您需要的 RPM 包,将其拷贝到安装 OBD 的机器上后通过 `obd mirror clone` 将新的 RPM 包添加到 local mirror 中。
下面展示如何更新本地仓库中的 OBD 镜像:
```shell
# 先在一台可以连通公网的机器上下载 OBD 1.2.1 el7 RPM 包
# 最新的 RPM 包链接可以在对应的组件的 git 仓库中的 release note 或 OceanBase 开源官网(https://open.oceanbase.com/softwareCenter/community)中获得
wget https://github.com/oceanbase/obdeploy/releases/download/v1.2.1/ob-deploy-1.2.1-9.el7.x86_64.rpm
# 将下载好的 RPM 包拷贝到安装 OBD 的机器(obd_server)中
sh ob-deploy-1.2.1-9.el7.x86_64.rpm obd_server:~
# 将下载好的镜像加入到 local 中
obd mirror clone ob-deploy-1.2.1-9.el7.x86_64.rpm
# 关闭远程镜像源
obd mirror disable remote
```
## Q:如何升级 OBD?
A:您可以使用 `obd update` 命令升级 OBD。当您升级完成后可以使用命令 `obd --version` 查看版本,确认是否升级成功。
A:升级 OBD 有以下两种方式,您可根据您的实际情况进行选择:
+ 如果您的机器可以连通公网或者您配置的 mirror 中有用于更新的 OBD 的 RPM 包,您可直接使用 `obd update` 命令升级 OBD。当您升级完成后可以使用命令 `obd --version` 查看版本,确认是否升级成功。
+ 如果您的机器不能连通公网且您配置的 mirror 中没有用于更新的 OBD 的 RPM 包,请先通过 `obd mirror clone` 将用于更新的 OBD 的 RPM 包添加到 local mirror 中,之后再使用 `obd update` 命令升级 OBD。
下面展示在离线模式下,如何在 CentOS7 系统中将 OBD 升级到 V1.2.1:
```shell
# 先在一台可以连通公网的机器上下载 OBD 1.2.1 el7 RPM 包
# 最新的 RPM 包链接可以在 git 仓库中的 release note 或 OceanBase 开源官网(https://open.oceanbase.com/softwareCenter/community)中获得
wget https://github.com/oceanbase/obdeploy/releases/download/v1.2.1/ob-deploy-1.2.1-9.el7.x86_64.rpm
# 将下载好的 RPM 包拷贝到安装 OBD 的机器(obd_server)中
sh ob-deploy-1.2.1-9.el7.x86_64.rpm obd_server:~
# 在 OBD 机器上执行以下命令完成升级
# 1.将下载好的镜像加入到 local 中
obd mirror clone ob-deploy-1.2.1-9.el7.x86_64.rpm
# 2.关闭远程镜像源
obd mirror disable remote
# 3.升级
obd update
```
## Q:如何使用 OBD 升级 OceanBase 数据库?
A:您可使用 `obd cluster upgrade` 命令升级 OceanBase 数据库。
A:使用 OBD 升级 OceanBase 数据库有以下两种方式,您可根据您的实际情况进行选择:
+ 如果您的机器可以连通公网或者您配置的 mirror 中有用于更新的 OceanBase 数据库的 RPM 包,您可直接使用 `obd cluster upgrade` 命令升级 OceanBase 数据库。
+ 如果您的机器不能连通公网且您配置的 mirror 中没有用于更新的 OceanBase 数据库的 RPM 包,请先通过 `obd mirror clone` 将用于更新的 OceanBase 数据库的 RPM 包添加到 local mirror 中,之后再使用 `obd cluster upgrade` 命令升级 OceanBase 数据库。
例如,若您想要从 OceanBase V3.1.1 升级到 V3.1.2,命令如下
下面展示在离线模式下,如何在 CentOS7 系统中使用 OBD 将 OceanBase-CE V3.1.1 升级到 V3.1.2
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce
# 请先确认您的 OBD 版本,如果版本低于 V1.2.1,请先更新 OBD 的版本
# 在一台可以连通公网的机器上下载 OceanBase-CE RPM 包
# 最新的 RPM 包链接可以在 git 仓库中的 release note 或 OceanBase 开源官网(https://open.oceanbase.com/softwareCenter/community)中获得
wget https://github.com/oceanbase/oceanbase/releases/download/v3.1.2_CE/oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm
# 将下载好的 RPM 包拷贝到安装 OBD 的机器(obd_server)中
sh oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm obd_server:~
# 在 OBD 机器上执行以下命令完成升级
# 1.将下载好的镜像加入到 local 中
obd mirror clone oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm
# 2.关闭远程镜像源
obd mirror disable remote
# 3.升级
obd cluster upgrade <deploy name> -c oceanbase-ce -V 3.1.2
```
### 报错处理
......@@ -50,6 +98,5 @@ obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce
您可能会遇到 `Too many match` 的报错,这时只需在 `Candidates` 上选择一个 `hash` 即可。比如:
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
obd cluster upgrade <deploy name> -c oceanbase-ce -V 3.1.2 --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
```
......@@ -30,19 +30,67 @@ oceanbase-ce:
A: You can modify the startup plug-ins in the `~/.obd/plugins/oceanbase-ce/` directory. For example, after you add a new startup configuration item for OceanBase-CE V3.1.0, you can modify the `start.py` file in the `~/.obd/plugins/oceanbase-ce/3.1.0` directory.
## Q: How to update OBD local mirror in offline mode?
A: When your machine with OBD installed cannot connect to the public network, but you need to update OBD or other components, you can download the RPM package you need on another machine that can connect to the public network, copy the RPM package to the machine where OBD installed, and then add the new RPM package to the local mirror through `obd mirror clone` command.
The following shows how to update the OBD mirror in the local repository:
```shell
# First, download the OBD 1.2.1 el7 RPM package on a machine that can connect to the public network.
# Links to the latest RPM packages are available in the release notes of the corresponding component's git repository or on the OceanBase open source website (https://open.oceanbase.com/softwareCenter/community).
wget https://github.com/oceanbase/obdeploy/releases/download/v1.2.1/ob-deploy-1.2.1-9.el7.x86_64.rpm
# Copy the downloaded RPM package to the machine where OBD is installed, i.e. obd_server.
sh ob-deploy-1.2.1-9.el7.x86_64.rpm obd_server:~
# Add the downloaded mirror to local.
obd mirror clone ob-deploy-1.2.1-9.el7.x86_64.rpm
# Close the remote mirror source.
obd mirror disable remote
```
## Q:How to update OBD?
A:You can use the `obd update` command to update OBD. When you are done with the update, use the `obd --version` command to confirm the version of OBD.
A:There are two ways to update your OBD, which you can choose from depending on your situation:
+ If your machine can connect to the public network or have the RPM package for the updated OBD in the mirror you configured, you can directly use the `obd update` command to update the OBD. When you finish with the update, use the `obd --version` command to check the version of OBD and confirm whether the update is successful.
+ If your machine cannot connect to the public network and there is no RPM package for the updated OBD in the mirror you configured. Please add the RPM package that used to update OBD to the local mirror via `obd mirror clone` command first, and then use the `obd update` command to update the OBD.
The following shows how to update OBD to V1.2.1 on CentOS7 offline mode:
```shell
# First, download the OBD 1.2.1 el7 RPM package on a machine that can connect to the public network.
# Links to the latest RPM packages are available in the release notes of the corresponding component's git repository or on the OceanBase open source website (https://open.oceanbase.com/softwareCenter/community).
wget https://github.com/oceanbase/obdeploy/releases/download/v1.2.1/ob-deploy-1.2.1-9.el7.x86_64.rpm
# Copy the downloaded RPM package to the machine where OBD is installed, i.e. obd_server.
sh ob-deploy-1.2.1-9.el7.x86_64.rpm obd_server:~
# Execute the following command on the OBD machine to complete the upgrade.
# 1.Add the downloaded mirror to local.
obd mirror clone ob-deploy-1.2.1-9.el7.x86_64.rpm
# 2.Close the remote mirror source.
obd mirror disable remote
# 3.Update.
obd update
```
## Q: How to upgrade OceanBase with OBD?
A: You can use the `Too many match` command to upgrade OceanBase.
For example, if you want to upgrade OceanBase from V3.1.1 to V3.1.2, you can run these commands:
A: There are two ways to upgrade OceanBase with OBD, which you can choose from depending on your situation:
+ If your machine can connect to the public network or have the RPM package for the updated OceanBase in the mirror you configured, you can directly use the `obd cluster upgrade` command to upgrade the OceanBase.
+ If your machine cannot connect to the public network and there is no RPM package for the updated OceanBase in the mirror you configured. Please add the RPM package that used to update OceanBase to the local mirror via `obd mirror clone` command first, and then use the `obd cluster upgrade` command to upgrade the OceanBase.
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce
The following shows how to upgrade OceanBase-CE from V3.1.1 to V3.1.2 with OBD on CentOS7 offline mode:
```shell
# First, you should check your OBD version, and if the version is lower than V1.2.1, please update the OBD version.
# Download the OceanBase-CE RPM package on a machine that can connect to the public network.
# Links to the latest RPM packages are available in the release notes of the corresponding component's git repository or on the OceanBase open source website (https://open.oceanbase.com/softwareCenter/community).
wget https://github.com/oceanbase/oceanbase/releases/download/v3.1.2_CE/oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm
# Copy the downloaded RPM package to the machine where OBD is installed, i.e. obd_server.
sh oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm obd_server:~
# Execute the following command on the OBD machine to complete the upgrade.
# 1.Add the downloaded mirror to local.
obd mirror clone oceanbase-ce-3.1.2-10000392021123010.el7.x86_64.rpm
# 2.Close the remote mirror source.
obd mirror disable remote
# 3.Upgrade.
obd cluster upgrade <deploy name> -c oceanbase-ce -V 3.1.2
```
### error processing
......@@ -50,6 +98,5 @@ obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce
You may encounter a `Too many match` error, just select a `hash` on `Candidates`. For example:
```shell
export LANG=en_US.UTF-8
obd cluster upgrade s1 -V 3.1.2 -v -c oceanbase-ce --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
obd cluster upgrade <deploy name> -c oceanbase-ce -V 3.1.2 --usable 7fafba0fac1e90cbd1b5b7ae5fa129b64dc63aed
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册