---
title: "通过 oat-cli 配置部署环境 - OceanBase 数据库 V4.0.0-preview | OceanBase 文档中心"
description: "通过 oat-cli 配置部署环境 您需要使用 oat-cli 修改各服务器的部署环境配置。 添加 admin 用户 为便于后续维护，部署前，您需要为每台服务器添加 admin 用户。 [root@hostname /]# cd /root/t-oceanbase-antman/clonescripts [root@…"
image: https://mdn.alipayobjects.com/huamei_22khvb/afts/img/A*OSPzQ6GUQF4AAAAAQHAAAAgAeiGDAQ/original
---
切换语言

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

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

# 通过 oat-cli 配置部署环境

更新时间：2023-07-24 17:45:58

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V4.0.0-preview/zh-CN/400.deploy/300.deploy-oceanbase-database-enterprise/400.command-line-deployment/100.configure-a-deployment-environment-command-line/200.configure-deployment-environment-by-using-the-oat-cli.md)  

您需要使用 oat-cli 修改各服务器的部署环境配置。

## 添加 admin 用户

为便于后续维护，部署前，您需要为每台服务器添加 admin 用户。

```shell
[root@hostname /]# cd /root/t-oceanbase-antman/clonescripts
[root@hostname clonescripts]# ./clone.sh -u

```

## 修改操作系统内核配置

### OCP 服务器

执行以下命令，对每台 OCP 服务器进行设置。

```shell
[root@hostname /]# cd /root/t-oceanbase-antman/clonescripts
[root@hostname clonescripts]# ./clone.sh -c -r ocp

```

### OBServer 节点

执行以下命令，对每台 OBServer 节点进行设置。

```shell
[root@hostname /]# cd /root/t-oceanbase-antman/clonescripts
[root@hostname clonescripts]# ./clone.sh -c -r ob

```

## 安装依赖包

### OCP 服务器安装依赖包

在每台 OCP 服务器执行以下命令，安装依赖包。

```shell
[root@hostname /]# cd /root/t-oceanbase-antman/clonescripts
[root@hostname clonescripts]# ./clone.sh -m -r ocp

```

### OBServer 节点安装依赖包

在每台 OBServer 节点执行以下命令，安装依赖包。

```shell
[root@hostname /]# cd /root/t-oceanbase-antman/clonescripts
[root@hostname clonescripts]# ./clone.sh -m -r ob

```

## OCP 与 OMS 服务器安装 Docker

在 OCP 与 OMS 服务器上执行以下命令，安装 Docker。

```shell
[root@hostname /]# cd /root/t-oceanbase-antman/clonescripts
[root@hostname clonescripts]# ./clone.sh -i

```

 上一篇 下一篇 ![有帮助](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) 咨询热线
