5分钟快速部署OceanBase

 一、安装OBD部署工具

# 1、如果没有yum-utils,则需要安装
yum install -y yum-utils

# 2、配置OBD yum源
yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo

# 3、安装OBD
yum install -y ob-deploy


 二、部署名为demo的OB数据库

# 部署名为demo实例的命令
obd cluster deploy demo -c mini-local-example.yaml 
# mini-local-example.yaml配置文件内容见下文
# 也可从gitee上面下载:https://gitee.com/oceanbase/obdeploy/tree/master/example
oceanbase-ce:
  servers:
    - 127.0.0.1
  global:
    home_path: /root/observer
    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
    memory_limit: 6G # The maximum running memory for an observer
    system_memory: 1G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
    datafile_size: 2G # Size of the data file. 
    datafile_next: 2G # the auto extend step. Please enter an capacity, such as 2G
    datafile_maxsize: 20G # the auto extend max size. Please enter an capacity, such as 20G
    log_disk_size: 13G # The size of disk space used by the clog files.
    cpu_count: 16
    production_mode: false
    enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
    enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.
    max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.

 三、安装客户端,并修改系统资源配置

# 1.安装obclient客户端工具
yum install -y obclient

# 2.查看系统资源配置情况
ulimit -a
# 3.修改文件描述符的最大值为20万,缺省值是1024,1024对于OB数据库来说不够用,启动会报错
ulimit -n 200000
# 4.修改用户最大可用进程数为20万,缺省值是14988,修改原因同上
ulimit -u 200000

 四、启动demo实例

# 启动命令
obd cluster start demo

# 销毁命令用destroy(若启动失败,要先销毁再重新部署)
obd cluster destroy demo

 五、连接demo实例,结果如下

        启动成功后,会打印出连接命令(见上图红框内容),复制粘贴即可。

参考链接:

1. 两分钟快速试玩 OceanBase 数据库_哔哩哔哩_bilibili 

2. OceanBase社区

3. OceanBase错误码SOP

  • 10
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值