基于CentOS系统安装OceanBase数据库

本文详细介绍了如何在CentOS 7.9系统上安装OceanBase数据库,包括通过YUM软件源下载安装、配置文件模板获取、数据库部署和启动、连接数据库以及解决安装过程中可能遇到的磁盘空间、网卡名称和内存不足等问题。
摘要由CSDN通过智能技术生成

镜像下载、域名解析、时间同步请点击 阿里云开源镜像站

一、OceanBase介绍

OceanBase是由蚂蚁集团完全自主研发的金融级分布式关系数据库,始创于2010年。OceanBase具有数据强一致、高可用、高性能、在线扩展、高度兼容SQL标准和主流关系数据库、低成本等特点。

OceanBase 社区版是一款开源分布式 HTAP(Hybrid Transactional/Analytical Processing)数据库管理系统,具有原生分布式架构,支持金融级高可用、透明水平扩展、分布式事务、多租户和语法兼容等企业级特性。OceanBase 内核通过大规模商用场景的考验,已服务众多行业客户,现面向未来持续构建内核技术竞争力。

二、OceanBase安装操作

本实验基于CentOS 7.9系统进行演示操作

[root@oceanbase ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

安装前期准备

本实验采用单机模式 的部署方式,在同一台机器上安装服务端和客户端进行测试。

需要内存大小8GB 以上;(本实验内存大小 10 GB)

磁盘空间大小65GB以上;(本实验磁盘大小 95 GB)

1、通过 YUM 软件源下载并安装 OBD

执行以下三种命令。

# yum install -y yum-utils
# yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
# yum install -y ob-deploy
[root@obd ~]# yum install -y yum-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package yum-utils-1.1.31-54.el7_8.noarch already installed and latest version
Nothing to do
[root@obd ~]# yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
Loaded plugins: fastestmirror
adding repo from: https://mirrors.aliyun.com/oceanbase/OceanBase.repo
grabbing file https://mirrors.aliyun.com/oceanbase/OceanBase.repo to /etc/yum.repos.d/OceanBase.repo
repo saved to /etc/yum.repos.d/OceanBase.repo
[root@obd ~]# yum install -y ob-deploy
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package ob-deploy-1.2.1-9.el7.x86_64 already installed and latest version
Nothing to do
[root@obd ~]#

或者

离线安装 OBD
1. 下载 OBD 离线 RPM 安装包。
2. 运行以下命令安装 OBD。
# yum install -y ob-deploy-1.0.0-1.el7.x86_64.rpm
# source /etc/profile.d/obd.sh

2、下载 OceanBase 数据库配置文件模板

从 Github 上下载对应的配置文件模板。本实验采用的是mini-local-example.yaml 配置文件

Gitee下载链接:

example/mini-local-example.yaml · OceanBase/obdeploy - Gitee.com

oceanbase-ce:
  servers:
    # Please don't use hostname, only IP can be supported
    - 127.0.0.1
  global:
    #  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
    home_path: /xyb/observer
    # The directory for data storage. The default value is $home_path/store.
    # data_dir: /data
    # The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
    # redo_dir: /redo
    # Please set devname as the network adaptor's name whose ip is  in the setting of severs.
    # if set severs as "127.0.0.1", please set devname as "lo"
    # if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
    devname: lo
    mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
    rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
    zone: zone1
    cluster_id: 1
    # please set memory limi
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值