实践练习二:手动部署 OceanBase 集群

由于测试资源限制,本次为单机部署。

  1. 更改系统参数
    在这里插入图片描述

  2. 下载需要的离线离线包上传至中控机
    https://open.oceanbase.com/softwareCenter/community

在这里插入图片描述

  1. 安装obd
rpm -ivh ob-deploy-1.2.1-9.el7.x86_64.rpm 
  1. 构建本地源
source /etc/profile.d/obd.sh
obd mirror clone  *.rpm
  1. 准备配置文件
## Only need to configure when remote login is required
#https://gitee.com/oceanbase/obdeploy/blob/master/example/mini-distributed-example.yaml
user:
  username: root
  password: root
#  key_file: your ssh-key file path if need
oceanbase-ce:
  servers:
    - name: z1
      # Please don't use hostname, only IP can be supported
      ip: 127.0.0.1
  global:
    # 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"
    syslog_level: ERROR
    devname: lo
    cluster_id: 1
    datafile_size: 8G
    # please set memory limit to a suitable value which is matching resource.
    memory_limit: 8G
    system_memory: 4G
    stack_size: 512K
    cpu_count: 16
    cache_wash_threshold: 1G
    __min_full_resource_pool_memory: 268435456
    workers_per_cpu_quota: 10
    schema_history_expire_time: 1d
    # The value of net_thread_count had better be same as cpu's core number.
    net_thread_count: 4
    major_freeze_duty_time: Disable
    minor_freeze_times: 10
    enable_separate_sys_clog: 0
    enable_merge_by_turn: FALSE
    datafile_disk_percentage: 20
    appname: myob_test8
  z1:
    mysql_port: 13881
    rpc_port: 13882
    home_path: /root/observer_test
zone: zone1
  1. 部署
obd cluster deploy myob -c mini-local-example.yaml

在这里插入图片描述

  1. 启动
obd cluster start test

在这里插入图片描述

  1. 安装obproxy
rpm -ivh  obproxy-3.2.0-1.el7.x86_64.rpm
cd /home/admin/obproxy-3.2.0/ && bin/obproxy -r "127.0.0.1:13881" -p 2883 -o "enable_strict_kernel_release=false,enable_cluster_checkout=false,enable_metadb_used=false" -c obdemo

在这里插入图片描述
在这里插入图片描述

登陆:
在这里插入图片描述

  1. 创建租户
CREATE resource unit S4C1G max_cpu=4, min_cpu=4, max_memory='1G', min_memory='1G', max_iops=10000, min_iops=1000, max_session_num=1000000, max_disk_size='1024G';
CREATE resource pool my_pool unit = 'S4C1G', unit_num = 1;
create tenant obmysql resource_pool_list=('my_pool'), primary_zone='RANDOM',comment 'mysql tenant/instance', charset='utf8' set ob_tcp_invited_nodes='%', ob_compatibility_mode='mysql';

在这里插入图片描述

  1. 使用租户登陆创建业务表
    在这里插入图片描述
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值