环境信息: CentOS Linux release 7.2.1511
安装版本: 3.1.0 单机

1、安装步骤
通过 YUM 软件源安装 OBD

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
sudo yum install -y ob-deploy

2、部署 OceanBase 数据库
2.1、增加配置文件
本地安装:即中控机器和目标机器是同一台机器,配置文件。
单机安装:即中控机器和目标机器不是同一台机器,且目标机器只有一台,配置文件。
分布式安装:配置文件。
配置信息如下

[root@xlucas1 oceanbase]# pwd
/opt/oceanbase
[root@xlucas1 oceanbase]# cat mini-local-example.yaml
oceanbase-ce:servers:# Please don't use hostname, only IP can be supported- 127.0.0.1global:home_path: /opt/oceanbase/data#这个路径一定要是是空的,否则会安装失败# 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: lomysql_port: 2883rpc_port: 2882zone: zone1cluster_id: 1datafile_size: 8G# please set memory limit to a suitable value which is matching resource. memory_limit: 8Gsystem_memory: 4Gstack_size: 512Kcpu_count: 16cache_wash_threshold: 1G__min_full_resource_pool_memory: 268435456workers_per_cpu_quota: 10schema_history_expire_time: 1d# The value of net_thread_count had better be same as cpu's core number. net_thread_count: 4sys_bkgd_migration_retry_num: 3minor_freeze_times: 10enable_separate_sys_clog: 0enable_merge_by_turn: FALSEdatafile_disk_percentage: 20

2.2、安装
注意这个路径是需要指定到配置文件

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/mini-local-example.yaml

安装成功提示

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/mini-local-example.yaml
oceanbase-ce-3.1.0 already installed
+-------------------------------------------------------------------+
|                              Packages                             |
+--------------+---------+------------------------------------------+
| Repository   | Version | Md5                                      |
+--------------+---------+------------------------------------------+
| oceanbase-ce | 3.1.0   | 56f57e9843e719d830ec03c206d914f4b3adc82b |
+--------------+---------+------------------------------------------+
Open ssh connection ok
Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository install ok
Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository lib check ok
127.0.0.1 initializes cluster work home
xlucas deployed

3、使用数据库
3.1、启动数据库

[root@xlucas1 oceanbase]# obd cluster start xlucas
Get local repositories and plugins ok
[WARN] (127.0.0.1) fs.aio-max-nr must not be less than 1048576 (Current value: 65536)
[WARN] (127.0.0.1) open files number must not be less than 655350 (Current value: 65535)
Start observer ok
observer program health check ok
Connect to observer ok
Initialize cluster
Cluster bootstrap ok
Wait for observer init ok
+---------------------------------------------+
|                   observer                  |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 3.1.0   | 2883 | zone1 | active |
+-----------+---------+------+-------+--------+
xlucas running

3.2、查看数据库状态

[root@xlucas1 oceanbase]# obd cluster display xlucas
Get local repositories and plugins ok
Connect to observer ok
Wait for observer init ok
+---------------------------------------------+
|                   observer                  |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 3.1.0   | 2883 | zone1 | active |
+-----------+---------+------+-------+--------+

3.3、安装 OceanBase 数据库客户端 OBClient

sudo yum install -y obclient

运行以下命令,使用 OBClient 客户端连接 OceanBase 数据库:

obclient -h<your_ip> -P<observer_mysql_port> -uroot
[root@xlucas1 ~]# obclient -h127.0.0.1 -P2883 -uroot
Welcome to the OceanBase.  Commands end with ; or \g.
Your MySQL connection id is 3221487655
Server version: 5.7.25 OceanBase 3.1.0 (r-) (Built May 30 2021 11:21:29)Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MySQL [(none)]>

3.4、简单使用

MySQL [oceanbase]> select svr_ip,svr_port, cpu_total, mem_total, disk_total, zone from __all_virtual_server_stat;
+-----------+----------+-----------+------------+------------+-------+
| svr_ip    | svr_port | cpu_total | mem_total  | disk_total | zone  |
+-----------+----------+-----------+------------+------------+-------+
| 127.0.0.1 |     2882 |        14 | 4294967296 | 8589934592 | zone1 |
+-----------+----------+-----------+------------+------------+-------+
1 row in set (0.007 sec)

5、遇到问题:
1、没有指定到配置文件,安装会报错,找不到配置文件

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/
[ERROR] copy error
[ERROR] Failed to create deploy: xlucas. please check you configuration file

2、在部署数据库的时候,配置文件中的home_path参数对应的路径要是空路径,否则会报错

[root@xlucas1 oceanbase]# obd cluster deploy xlucas -c /opt/oceanbase/mini-local-example.yaml
Update OceanBase-community-stable-el7 ok
Update OceanBase-development-kit-el7 ok
Download oceanbase-ce-3.1.0-1.el7.x86_64.rpm (44.17 M): 100% [####################################################################################################################################################] Time: 0:00:59 777.72 kB/s
Package oceanbase-ce-3.1.0 is available
install oceanbase-ce-3.1.0 for local ok
+-------------------------------------------------------------------+
|                              Packages                             |
+--------------+---------+------------------------------------------+
| Repository   | Version | Md5                                      |
+--------------+---------+------------------------------------------+
| oceanbase-ce | 3.1.0   | 56f57e9843e719d830ec03c206d914f4b3adc82b |
+--------------+---------+------------------------------------------+
Open ssh connection ok
Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository install ok
Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository lib check !!
[WARN] 127.0.0.1 oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b require: libmariadb.so.3Try to get lib-repository
Download oceanbase-ce-libs-3.1.0-1.el7.x86_64.rpm (413.07 K): 100% [##############################################################################################################################################] Time: 0:00:00 826.11 kB/s
Package oceanbase-ce-libs-3.1.0 is available
install oceanbase-ce-libs-3.1.0 for local ok
Use oceanbase-ce-libs-3.1.0-b70d3839280f145a86af26811bbfcdfaeb645509 for oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b
Remote oceanbase-ce-libs-3.1.0-b70d3839280f145a86af26811bbfcdfaeb645509 repository install ok
Remote oceanbase-ce-3.1.0-56f57e9843e719d830ec03c206d914f4b3adc82b repository lib check ok
127.0.0.1 initializes cluster work home
[ERROR] fail to init 127.0.0.1 home path: /opt/oceanbase is not empty

oceanbase安装相关推荐

  1. oceanbase安装记录

    1.在官网上下载 4.0 社区版. 2. 在centos 7.9 上安装 服务器配置至少是 CPU 4 Core,内存 16 GB. cat /etc/redhat-release cat /proc ...

  2. ob集群安装部署相关

    一.黑屏(命令行)模式安装ob三节点集群 1.主机规划 主机名 ip 内存(G) cpu 安装软件 占用端口 mgr1 172.16.80.57 128 32 observer(zone1).obcl ...

  3. OceanBase 2.2初体验

    OceanBase是蚂蚁金服自研的分布式关系数据库,2019年国庆期间以6088万tpmC值的成绩,超越Oracle荣登TPC-C基准测试性能榜首.最近因为一些原因赶了趟时髦,体验了一把OceanBa ...

  4. OceanBase试用版【学习记录】

    1. 什么是OceanBase OceanBase 数据库是阿里巴巴和蚂蚁集团不基于任何开源产品,完全自研的原生分布式关系数据库软件,在普通硬件上实现金融级高可用,首创"三地五中心" ...

  5. 体验 win10 下 oceanbase 数据库

    文章目录 oceanbase 简介 oceanbase 安装 oceanbase 接入 参考 oceanbase 简介 OceanBase是由蚂蚁金服.阿里巴巴完全自主研发的分布式关系型数据库,始创于 ...

  6. 收藏|2021年阿里云开源镜像站最热门镜像王全梳理(附下载链接和Top20镜像王排名)

    阿里云开源镜像站的初衷在于宣传自由软件的价值,提高大家的开发效率,帮助大家更快地进行应用创建. 全面.快速.稳定.可信 作为程序员肯定要和开源软件打交道,很多情况需要用到相关的代码库,而依赖和软件包的 ...

  7. 如何部署 OB 社区版

    第 2 章 :如何部署 OB 社区版 OB庆涛·发表于 2021.11.03运维实践 转载:OceanBase 社区版https://open.oceanbase.com/articles/86001 ...

  8. 收藏|2021年阿里云开源镜像站最热门镜像王全梳理 (附下载链接和Top20镜像王排名)

    阿里云官方镜像站:https://developer.aliyun.com/mirror/?utm_content=g_1000307095 简介: 阿里云开源镜像站的初衷在于宣传自由软件的价值,提高 ...

  9. 周六直播丨细致入微 – OceanBase云平台安装部署实战

    简介 OceanBase 是阿里巴巴和蚂蚁金服 100% 自主研发的原生分布式关系数据库,其在普通硬件上实现了金融级高可用.首创"三地五中心"城市级故障自动无损容灾新标准,具备卓越 ...

  10. 「OceanBase 4.1 体验」|快速安装部署

    文章目录 一.Oceanbase数据库简介 1.1 核心特性 1.2 系统架构 1.2.1 存储层 1.2.2 复制层 1.2.3 均衡层 1.2.4 事务层 1.2.4.1 原子性 1.2.4.2 ...

最新文章

  1. webpack 相关文章
  2. Python Day34
  3. plsql存储过程修改后怎么保存_证件照上传不成功,教你修改分辨率、调整照片大小...
  4. python tab和空格混用_Python编程常见十大错误,看完你自己都笑了!
  5. 32位汇编寄存器含义解释
  6. 对计算机网络的认识400字,对计算机网络的初步认识
  7. 第十四周项目一 平衡二叉树
  8. 惊恐!监控拍到神秘人形机器人凌晨三点出逃
  9. 手机重装android系统,安卓手机系统怎么重装(刷机)
  10. python挂机脚本怎么运行,Python实现自动挂机脚本(基础篇)
  11. 关于AIX上VMO调整参数的若干说明
  12. XAML中的Style
  13. layui解决数据表格右侧有空白现象
  14. html转pdf 图片跨域问题解决
  15. JavaScript新的对象创建方式---Object.create()
  16. 测试淘宝站内的搜索系统,请问你能想到哪些方法来进行测试?
  17. 阿里国际站如何有效覆盖关键词+关键词推广评分详解
  18. 特征选择-过滤式选择
  19. boot Strap笔记(哈哈哈哈)
  20. sdk版本对手机运行有什么影响 android,Android sdk版本以及兼容性问题

热门文章

  1. 计算机定时关机计划任务失败,如何设置定时关机任务?电脑设置定时关机任务方法...
  2. android 放大镜功能,Android放大镜效果实现
  3. 创建 Windows XP 图标
  4. 存储和多屏互动,蜂鸟网的NAS应用解析
  5. swiper 切换时间_改变Swiper切换和animate.js动画的时间曲线
  6. 绘制业务流程图—入门篇
  7. 人生不设限,要勇于去闯_《不如去闯》读书心得
  8. C语言小技巧之如何求平均数
  9. 计算机专业保研面试备考:线性代数
  10. 齿轮仿真软件ROMAX DESIGNER安装教程