{"id":29571915,"url":"https://github.com/oceanbase/obdeploy","last_synced_at":"2025-07-19T04:36:36.102Z","repository":{"id":38109056,"uuid":"372536637","full_name":"oceanbase/obdeploy","owner":"oceanbase","description":"A deployer and package manager for OceanBase open-source software.","archived":false,"fork":false,"pushed_at":"2025-07-14T06:02:27.000Z","size":9577,"stargazers_count":92,"open_issues_count":12,"forks_count":134,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-07-14T06:05:19.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://open.oceanbase.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oceanbase.png","metadata":{"files":{"readme":"README-CN.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-05-31T14:35:57.000Z","updated_at":"2025-07-14T03:30:28.000Z","dependencies_parsed_at":"2023-11-09T10:28:04.533Z","dependency_job_id":"c896ffea-8c13-4f5d-9e41-e30efa22ab71","html_url":"https://github.com/oceanbase/obdeploy","commit_stats":null,"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/oceanbase/obdeploy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobdeploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobdeploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobdeploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobdeploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oceanbase","download_url":"https://codeload.github.com/oceanbase/obdeploy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oceanbase%2Fobdeploy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265889162,"owners_count":23844539,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-19T04:36:35.511Z","updated_at":"2025-07-19T04:36:36.081Z","avatar_url":"https://github.com/oceanbase.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OceanBase Deployer\n\n\u003c!--\n# coding: utf-8\n# Copyright (c) 2025 OceanBase.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n--\u003e\n\n\u003c!-- TODO: some badges here --\u003e\n\nOceanBase Deployer（简称 OBD）是 OceanBase 开源软件的安装部署工具。OBD 同时也是包管理器，可以用来管理 OceanBase 所有的开源软件。本文介绍如何安装 OBD、使用 OBD 和 OBD 的命令。\n\n## 安装 OBD\n\n您可以使用以下方式安装 OBD：\n\n### 方案1： 使用 RPM 包（Centos 7 及以上）安装\n\n```shell\nsudo yum install -y yum-utils\nsudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo\nsudo yum install -y ob-deploy\nsource /etc/profile.d/obd.sh\n```\n\n### 方案2：使用源码安装\n\n使用源码安装 OBD 之前，请确认您已安装以下依赖：\n\n- gcc\n- wget\n- python-devel\n- openssl-devel\n- xz-devel\n- mysql-devel\n\nPython3.8 使用以下命令安装：\n\n首先请先使用Python 2.7 环境下执行以下命令：\n\n```shell\n# 这一步是为了编译observer升级所需的解释器。如果不使用升级功能可以不执行该步骤\nsh rpm/build.sh executer\n```\n\n然后再在Python3.8 环境执行以下命令：\n\n```shell\nsh rpm/build.sh build_obd\nsource /etc/profile.d/obd.sh\n```\n\n## 快速启动 OceanBase 数据库\n\n[安装 OBD](./docs/zh-CN/200.quick-start/100.install-obd.md) 后，您可执行 `obd demo` 命令快速启动本地单节点 OceanBase 数据库。在此之前您需要确认以下信息：\n\n* `2881` 和 `2882` 端口没有被占用。\n\n* 机器可用内存不低于 `6 G`。\n\n* 机器 CPU 数目不低于 `2`。\n\n* 机器可用磁盘空间不小于 `54 G`。\n\n```shell\n# 部署并启动 OceanBase 数据库\nobd demo\n# 使用 OBClient 客户端连接到 OceanBase 数据库。\nobclient -h127.0.0.1 -uroot -P2881\n```\n\n## 使用 OBD 启动 OceanBase 数据库集群\n\n如何使用 OBD 启动 OceanBase 数据库集群，请参考文档[使用 OBD 启动 OceanBase 数据库集群](./docs/zh-CN/400.user-guide/300.command-line-operations/200.start-the-oceanbase-cluster-by-using-obd.md)。\n\n## 其他 OBD 命令\n\nOBD 有多级命令，您可以在每个层级中使用 `-h/--help` 选项查看子命令的帮助信息。\n\n- [镜像和仓库命令组](./docs/zh-CN/300.obd-command/200.command-group-for-mirroring-and-warehousing.md)\n- [集群命令组](./docs/zh-CN/300.obd-command/100.cluster-command-groups.md)\n- [测试命令组](./docs/zh-CN/300.obd-command/300.test-command-group.md)\n\n## Q\u0026A\n\n### Q: 如何指定使用组件的版本？\n\nA: 在部署配置文件中使用版本声明。例如，如果您使用的是 OceanBase-CE 3.1.0 版本，可以指定以下配置：\n\n```yaml\noceanbase-ce:\n  version: 3.1.0\n```\n\n### Q: 如何指定使用特定版本的组件？\n\nA: 在部署配置文件中使用 package_hash 或 tag 声明。\n如果您给自己编译的 OceanBase-CE 设置了 tag，您可以使用 tag 来指定。如：\n\n```yaml\noceanbase-ce:\n  tag: my-oceanbase\n```\n\n您也可以通过 package_hash 来指定特定的版本。当您使用 `obd mirror` 相关命令时会打印出组件的 md5 值，这个值即为 package_hash。\n\n```yaml\noceanbase-ce:\n  package_hash: 929df53459404d9b0c1f945e7e23ea4b89972069\n```\n\n### Q：我修改了 OceanBase-CE 了代码，需要修改启动流程怎么办？\n\nA：您可以修改 `~/.obd/plugins/oceanbase-ce/` 下的启动相关插件。比如您为 3.1.0 版本的 OceanBase-CE 添加了一个新的启动配置，可以修改 `~/.obd/plugins/oceanbase-ce/3.1.0/start.py`。\n\n### Q：如何升级 OBD？\n\nA：您可以使用 `obd update` 命令升级 OBD。当您升级完成后可以使用命令 `obd --version` 查看版本，确认是否升级成功。\n\n## 协议\n\nOBD 采用 [Apache-2.0](./LICENSE) 协议。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanbase%2Fobdeploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foceanbase%2Fobdeploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foceanbase%2Fobdeploy/lists"}