---
title: "安装 OBAgent | OceanBase 文档中心"
description: 安装 OBAgent 本文将介绍如何安装 OBAgent ，您可以使用 RPM 包或者构建源码安装 OBAgent。 环境依赖 构建 OBAgent 需要 Go 1.14 版本及以上。 PRM 包 OBAgent 提供 RPM 包，您可以去 Release 页面 下载 RPM 包，然后使用以下命令安装： rpm -i…
---
切换语言

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

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

# 安装 OBAgent

更新时间：2026-05-29 15:57:05

[编辑](https://github.com/oceanbase/oceanbase-doc/edit/V3.1.5/zh-CN/1800.supporting-tools/200.ob-agent/300.install-and-deploy-obagent/100.install-obagent.md)  

本文将介绍如何安装 OBAgent ，您可以使用 RPM 包或者构建源码安装 OBAgent。

## 环境依赖

构建 OBAgent 需要 Go 1.14 版本及以上。

## PRM 包

OBAgent 提供 RPM 包，您可以去 [Release 页面](https://mirrors.aliyun.com/oceanbase/community/stable/el/7/x86_64/obagent-1.0.0-1.el7.x86_64.rpm) 下载 RPM 包，然后使用以下命令安装：

```shell
rpm -ivh obagent-1.0.0-1.el7.x86_64.rpm

```

## 构建源码

### Debug 模式

```shell
make build // make build will be debug mode by default
make build-debug

```

### Release 模式

```shell
make build-release

```

## OBAgent 安装目录结构

OBAgent 的安装目录包含三个子目录：`bin`、`conf` 和 `run`。OBAgent 的安装目录如下：

```shell
# 目录结构示例
.
├── bin
│   └── monagent
├── conf
│   ├── config_properties
│   │   ├── monagent_basic_auth.yaml
│   │   └── monagent_pipeline.yaml
│   ├── module_config
│   │   ├── monagent_basic_auth.yaml
│   │   ├── monagent_config.yaml
│   │   ├── monitor_node_host.yaml
│   │   └── monitor_ob.yaml
│   ├── monagent.yaml
│   └── prometheus_config
│       ├── prometheus.yaml
│       └── rules
│           ├── host_rules.yaml
│           └── ob_rules.yaml
└── run

```

其中，`bin` 用来存放二进制文件。`conf` 用来存放程序启动配置、模块配置模板、KV 变量配置和 Prometheus 的配置模板。`run` 用来存放运行文件。更多关于配置文件的信息，参考 [monagent 配置文件说明](https://www.oceanbase.com/docs/community-observer-cn-10000000001879800)。

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