在 CentOS7 镜像上部署 OceanBase 数据库 ================================================== OceanBase 数据库支持在 CentOS7 上运行。本文介绍如何在 CentOS7 的 Docker 镜像上部署 OceanBase 数据库。 前提条件 ------------------------- 在 CentOS7 的 Docker 镜像上部署 OceanBase 数据库之前,您需要确认以下信息: * 您已经安装了 Docker 和 Git。 Docker 安装详情,参考 [Docker 文档](https://www.docker.com/get-started)。 Git 安装详情,参考 [Git 文档](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)。 * 您已经启动了 Docker。 操作步骤 ------------------------- 按照以下步骤下载 CentOS7 镜像并部署 OceanBase 数据库。 1. 拉取 CentOS7 镜像。 ```bash docker pull centos:7 docker run -d -i -t centos:7 /bin/bash docker exec -it /bin/bash ``` **注意** 您必须将 `CONTAINER ID` 替换为您的 centos:7 容器 ID。 2. 使用 OBD 部署 OceanBase 数据库。 ```unknow yum install -y yum-utils yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo yum install -y ob-deploy source /etc/profile.d/obd.sh git clone https://github.com/oceanbase/obdeploy.git cd obdeploy obd cluster deploy c1 -c ./example/mini-local-example.yaml ``` 详细信息,参考 [快速上手](https://open.oceanbase.com/quickStart)。 3. 增加 Docker 内存至 8G。 详细信息,Mac 用户参考 [Docker 桌面版 Mac 用户手册](https://docs.docker.com/docker-for-mac/#memory),Window 用户参考 [Docker 桌面版 Windows 用户手册](https://docs.docker.com/docker-for-windows/#advanced)。 4. 连接 OceanBase 数据库。 ```unknow yum install -y obclient obd cluster start c1 obclient -h127.0.0.1 -P2881 -uroot ``` 详细信息,参考 [快速上手](https://open.oceanbase.com/quickStart)。