当前位置:网站首页>[cloud native] - docker installation and deployment of distributed database oceanbase
[cloud native] - docker installation and deployment of distributed database oceanbase
2022-06-28 02:39:00 【It bond】
hello ! Hello everyone , I am a 【IT bond 】, Jianghu people jeames007,10 year DBA Work experience
A highly motivated 【 Bloggers in big data field 】!
China DBA union (ACDU) member , Currently engaged in DBA And program programming
Good at mainstream data Oracle、MySQL、PG Operations and development , Backup recovery , Installation migration , performance optimization 、 Fault emergency treatment, etc .
If there is a pair of 【 database 】 Interested in 【 Cutie 】, Welcome to your attention 【IT bond 】
️️️ Thank you, big and small !️️️
List of articles
Preface
Fast experience OceanBase Of Automate the deployment process , And understand OceanBase Directory features and usage after successful cluster installation️ 1. What is? OceanBase
OceanBase It is a domestic native distributed database independently developed by ant group , From 2010 year . Continuous 9 Years of stable support 11, Innovative launch “ Three places five centers ” New urban disaster recovery standards , It's a TPC-C and TPC-H A domestic native distributed database that has set a new world record in the test . The product adopts self-developed integrated architecture , Take into account the scalability of distributed architecture and the performance advantages of centralized architecture , Support with one set of engines at the same time TP and AP Mixed load of , With strong data consistency 、 High availability 、 High performance 、 Online expansion 、 Highly compatible SQL Standards and mainstream relational databases 、 Low cost and so on .

️ 2. Hardware requirements
1. There are notebooks or servers , Memory at least 12G .
2. The operating system is not limited to , Can be installed Docker Just the environment .
Docker Official mirror image :https://hub.docker.com/r/obpilot/oceanbase-ce
️ 3.docker Deploy OceanBase
3.1 download ob docker Mirror image
Download mirroring :
docker pull obpilot/oceanbase-ce:latest

3.2 Create a container
New container creation
docker run -itd -m 10G -p 2881:2881 -p 2883:2883
–name oceanbase-ce obpilot/oceanbase-ce:latest
Into the container
[[email protected] ~]# docker exec -it oceanbase-ce bash
After entering the container , You can see readme.md file

3.3 obd Tools to view clusters and start
-- See the list of clusters
[[email protected] ~]$ obd cluster list
The configuration file :/home/admin/.obd/cluster/obdemo/config.yaml

-- Start cluster
[[email protected] ~]$ obd cluster start obdemo
If you encounter the following two errors
[ERROR] (127.0.0.1) open files number must not be less than 20000 (Current value: 1024)
[ERROR] (127.0.0.1) not enough memory. (Free: 6.7G, Need: 8.0G)
One is that the maximum number of files opened by users is not enough , One is insufficient available memory 8G, Successfully started after solving .

[[email protected] ~]$ obd cluster list
+------------------------------------------------------------+
| Cluster List |
+--------+---------------------------------+-----------------+
| Name | Configuration Path | Status (Cached) |
+--------+---------------------------------+-----------------+
| obdemo | /home/admin/.obd/cluster/obdemo | running |
+--------+---------------------------------+-----------------+
[[email protected] ~]$ netstat -tulnp | grep 88
tcp 0 0 0.0.0.0:2881 0.0.0.0:* LISTEN 95/observer
tcp 0 0 0.0.0.0:2882 0.0.0.0:* LISTEN 95/observer
tcp 0 0 0.0.0.0:2883 0.0.0.0:* LISTEN 714/obproxy
tcp 0 0 0.0.0.0:2884 0.0.0.0:* LISTEN 714/obproxy
3.4 Sign in ob Database and create tenants
admin The user's password is : adminPWD123
[[email protected] ~]$ obclient -h127.1 [email protected]#obce-single -P2883 -prootPWD123 -c -A oceanbase
Welcome to the OceanBase. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05)
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 [oceanbase]> show databases;
+--------------------+
| Database |
+--------------------+
| oceanbase |
| information_schema |
| mysql |
| SYS |
| LBACSYS |
| ORAAUDITOR |
| test |
+--------------------+
7 rows in set (0.014 sec)

Create resource unit 、 Resource pool 、 Tenant
MySQL [oceanbase]> 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';
MySQL [oceanbase]> CREATE resource pool my_pool unit = 'S4C1G', unit_num = 1;
MySQL [oceanbase]> 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';
3.5 Sign in obmysql tenant And create databases and tables
[[email protected] ~]$ obclient -h 127.1 [email protected]#obce-single -P2883 -p -c -A test
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05)
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 [test]> show databases;
+--------------------+
| Database |
+--------------------+
| oceanbase |
| information_schema |
| mysql |
| test |
+--------------------+
4 rows in set (0.005 sec)
MySQL [test]> create database mesdb charset utf8mb4;
Query OK, 1 row affected (0.118 sec)
MySQL [test]> use mesdb
Database changed
MySQL [mesdb]>
MySQL [mesdb]>
MySQL [mesdb]>
MySQL [mesdb]> source /tmp/mysql_employees.sql


边栏推荐
- Is it safe for qiniu to open an account? How do I open an account online?
- Opencv——霍夫变换以及遇到的一些问题
- How to use data-driven "customer lifecycle management" to improve lead conversion rate and customer satisfaction?
- 4G-learn from great partners
- New choice for database Amazon Aurora
- 【倒立摆控制】基于UKF无迹卡尔曼滤波的倒立摆控制simulink仿真
- NER中BiLSTM-CRF解读Forward_algorithm
- 《低代码解决方案》——覆盖工单、维修和财务全流程的数字化售后服务低代码解决方案
- Keil "St link USB communication error" solution
- SQL 注入绕过(四)
猜你喜欢

Embedded must learn, detailed explanation of hardware resource interface -- Based on arm am335x development board (Part 1)

【历史上的今天】6 月 15 日:第一个手机病毒;AI 巨匠司马贺诞生;Chromebook 发布

【历史上的今天】6 月 5 日:洛夫莱斯和巴贝奇相遇;公钥密码学先驱诞生;函数语言设计先驱出生

Figure out the difference between MIT, BSD and Apache open source protocols

NER中BiLSTM-CRF解读Forward_algorithm

【历史上的今天】6 月 6 日:世界 IPv6 启动纪念日;《俄罗斯方块》发布;小红书成立

Based on am335x development board arm cortex-a8 -- acontis EtherCAT master station development case

Mysql大合集,你要内容的这里全都有

How to systematically learn LabVIEW?

低代码DSL里面在数仓中的实践
随机推荐
Use code binding DataGridView control to display tables in program interface
《低代码解决方案》——覆盖工单、维修和财务全流程的数字化售后服务低代码解决方案
Graduation summary
批阅2022春季学期课程小论文提交情况
Keil “st-link usb communication error“解决方法
技术人员如何成为技术领域专家
"Dadao Zhichuang" won a ten million prea+ round of financing and launched a technology consumption robot
【历史上的今天】6 月 17 日:术语“超文本”的创造者出生;Novell 首席科学家诞生;探索频道开播
【历史上的今天】6 月 13 日:分组交换网路的“亲子纠纷”;博弈论创始人出生;交互式电视初现雏形
Design e-commerce seckill system
File transfer protocol --ftp
Figure out the difference between MIT, BSD and Apache open source protocols
Embedded must learn, detailed explanation of hardware resource interface -- Based on arm am335x development board (Part 1)
I forgot my cell phone today
How to use data-driven "customer lifecycle management" to improve lead conversion rate and customer satisfaction?
There appears to be a failure with your network connection Retrying.
How to handle computer security certificate errors
How to use metauniverse technology to create a better real world
General timer and interrupt of stm32
【历史上的今天】6 月 20 日:MP3 之父出生;富士通成立;谷歌收购 Dropcam