---
title: "启动和停止 obshell - OceanBase 数据库 V4.3.0 | OceanBase 文档中心"
description: "启动和停止 obshell 启动 obshell 执行如下命令即可启动 obshell。 ${home_path}/bin/obshell agent start [--ip] [-P] [--takeover] 示例如下： [admin@test001 ~]$ /home/admin/oceanbase/bin/o…"
---
切换语言

- 中文站 - 简体中文
- International - English
- 日本站 - 日本語

文档反馈![](https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*P8CuR4UJ_FkAAAAAAAAAAAAADiGDAQ/original) OceanBase 数据库分布式版 - V 4.3.0

# 启动和停止 obshell

更新时间：2026-04-10 11:58:35

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.3.0/zh-CN/700.reference/1500.Components-and-Tools/100.manage/100.obshell/210.use-case/100.start-stop-obshell.md)  

## 启动 obshell

执行如下命令即可启动 obshell。

```shell
${home_path}/bin/obshell agent start [--ip] [-P] [--takeover]

```

示例如下：

```shell
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell agent start --ip 10.10.10.1 -P 2886

```

`home_path` 为 OceanBase 数据库的安装目录，obshell 默认在 OceanBase 数据库安装目录的 `bin` 目录下。

选项说明见下表：

| 选项名 | 是否必选 | 数据类型 | 默认值 | 说明 |
| --- | --- | --- | --- | --- |
| --ip | 否 | string | 无 | 设置该 obshell 绑定到的 IP 地址 |
| -P/--port | 否 | int | 2886 | 设置该 obshell 绑定到的端口号 |
| --takeover | 否 | int | 1 | 设置值为非 0 值时表示接管启动，值设置为 0 时表示非接管启动。默认为 `1`，即表示接管启动 |

#### 注意

- 若您首次启动 obshell，且 OceanBase 集群从未启动过，必须指定 IP，端口可选。
 - 若您首次启动 obshell，且 OceanBase 集群启动过，如需进行接管，详见 [接管非 obshell 部署集群](https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000671671)。
 - 若 obshell 成功启动过，IP 和端口均为可选。

## 停止 obshell

执行如下命令即可停止 obshell。

```shell
${home_path}/bin/obshell agent stop

```

示例如下：

```shell
[admin@test001 ~]$ /home/admin/oceanbase/bin/obshell agent stop

```

 上一篇 下一篇 ![有帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*y6ocSqN8cqsAAAAAAAAAAAAAARQnAQ)![无帮助](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*BG9IQJyLHF8AAAAAAAAAAAAAARQnAQ)![反馈](https://gw.alipayobjects.com/mdn/ob_asset/afts/img/A*eTWdQKCRKHwAAAAAAAAAAAAAARQnAQ)[AI](https://www.oceanbase.com/obi) 咨询热线
