合 OceanBase Docker安装体验
Tags: DockerOceanBase数据库Docker镜像OBCP
说明
相关连接:
https://open.oceanbase.com/blog/10900159
https://open.oceanbase.com/answer/detail?id=13700695
练习目的
本次练习目的是通过 OceanBase Docker 容器,快速的体验 OceanBase 的 自动化部署过程,以及了解 OceanBase 集群安装成功后的目录特点和使用方法。
练习条件
- 有笔记本或服务器,内存至少12G 。
- 操作系统不限,能安装 Docker 环境即可。
练习内容
请记录并分享下列内容:
- (必选)下载Docker 镜像:https://hub.docker.com/repository/docker/obpilot/oceanbase-ce 。
- (必选)使用 OBD 命令完成后续的 OceanBase 集群部署。
- (必选)创建一个业务租户、一个业务数据库,以及一些表等。
安装Docker
参考:https://www.dbaup.com/dbbao2centos7anzhuangdocker.html
Docker 运行在 CentOS 7 上,要求系统为64位、系统内核版本为 3.10 以上。CentOS 7 的内核一般都是3.10的,而CentOS 6.X 的内核一般都是2.6,在2.6的内核下,Docker运行会比较卡,所以一般会选择升级到3.10版本。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1、卸载掉旧版本的 Docker: yum remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-selinux docker-engine-selinux docker-engine 2、执行以下安装命令去安装依赖包: yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum -y install docker-ce docker-ce-cli containerd.io # 若执行报错,则配置yum源 wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo systemctl start docker systemctl status docker 3、检查版本 docker version docker info |
也可以一键安装Docker:
1 2 | curl -fsSL get.docker.com -o get-docker.sh sh get-docker.sh |
安装完成:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | [root@lhrdocker ~]# docker ps Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? [root@lhrdocker ~]# systemctl start docker systemctl status docker[root@lhrdocker ~]# systemctl status docker ● docker.service - Docker Application Container Engine Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled) Active: active (running) since Wed 2020-06-24 13:12:56 CST; 1s ago Docs: https://docs.docker.com Main PID: 9348 (dockerd) Memory: 38.4M CGroup: /system.slice/docker.service └─9348 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.403432651+08:00" level=info msg="ccResolverWrappe...e=grpc Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.403438749+08:00" level=info msg="ClientConn switc...e=grpc Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.422565741+08:00" level=info msg="Loading containe...tart." Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.498364397+08:00" level=info msg="Default bridge (...dress" Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.586263842+08:00" level=info msg="Loading containe...done." Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.614176483+08:00" level=warning msg="Not using nat...erlay2 Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.614312232+08:00" level=info msg="Docker daemon" c....03.12 Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.614366802+08:00" level=info msg="Daemon has compl...ation" Jun 24 13:12:56 lhrdocker dockerd[9348]: time="2020-06-24T13:12:56.700953028+08:00" level=info msg="API listen on /v....sock" Jun 24 13:12:56 lhrdocker systemd[1]: Started Docker Application Container Engine. Hint: Some lines were ellipsized, use -l to show in full. |