1.9 KiB
1.9 KiB
在 CentOS7 镜像上部署 OceanBase 数据库
OceanBase 数据库支持在 CentOS7 上运行。本文介绍如何在 CentOS7 的 Docker 镜像上部署 OceanBase 数据库。
前提条件
在 CentOS7 的 Docker 镜像上部署 OceanBase 数据库之前,您需要确认以下信息:
操作步骤
按照以下步骤下载 CentOS7 镜像并部署 OceanBase 数据库。
-
拉取 CentOS7 镜像。
docker pull centos:7 docker run -d -i -t centos:7 /bin/bash docker exec -it <CONTAINER ID> /bin/bash注意
您必须将
CONTAINER ID替换为您的 centos:7 容器 ID。 -
使用 OBD 部署 OceanBase 数据库。
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详细信息,参考 快速上手。
-
增加 Docker 内存至 8G。
详细信息,Mac 用户参考 Docker 桌面版 Mac 用户手册,Window 用户参考 Docker 桌面版 Windows 用户手册。
-
连接 OceanBase 数据库。
yum install -y obclient obd cluster start c1 obclient -h127.0.0.1 -P2881 -uroot详细信息,参考 快速上手。