当前位置:网站首页>[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


边栏推荐
- OSI 7层模型讲解(大白话 通俗易懂)
- File transfer protocol --ftp
- 数智学习|湖仓一体实践与探索
- MySQL optimization tips
- SQL injection Bypass (2)
- 【历史上的今天】6 月 7 日:Kubernetes 开源版本发布;《魔兽世界》登陆中国;分组交换网络发明者出生
- SQL 注入绕过(五)
- 【历史上的今天】6 月 18 日:京东诞生;网店平台 Etsy 成立;Facebook 发布 Libra 白皮书
- Dynamic Host Configuration Protocol
- Complex and inefficient logistics? Three steps to solve problems in enterprise administration
猜你喜欢

Jenkins - Pipeline syntax

Flask基础:模板渲染+模板过滤使用+控制语句

Ti am3352/54/59 industrial core board hardware specification

匿名挂载&具名挂载

迪赛智慧数——柱状图(折柱混合图):2021年毕业季租房价格和房租收入比

MySQL optimization tips

【历史上的今天】6 月 20 日:MP3 之父出生;富士通成立;谷歌收购 Dropcam

云原生(三十) | Kubernetes篇之应用商店-Helm

The system administrator has set the system policy to prohibit this installation. Solution

SQL 注入绕过(三)
随机推荐
SQL 注入繞過(二)
KVM相关
Is it safe for qiniu to open an account? How do I open an account online?
云原生(三十) | Kubernetes篇之应用商店-Helm
Ti am3352/54/59 industrial core board hardware specification
文件传输协议--FTP
Redis~geospatial (geospatial), hyperloglog (cardinality Statistics)
Keil "St link USB communication error" solution
Use code binding DataGridView control to display tables in program interface
CRF+BiLSTM代码分步骤解读
LeetCode - Easy - 197
云平台kvm迁移本地虚拟机记录
MySQL优化小技巧
Wangxinling, tanweiwei Shanhai (extended version of Chorus) online audition lossless FLAC Download
【历史上的今天】6 月 7 日:Kubernetes 开源版本发布;《魔兽世界》登陆中国;分组交换网络发明者出生
ShardingSphere-proxy-5.0.0建立mysql读写分离的连接(六)
【历史上的今天】6 月 10 日:Apple II 问世;微软收购 GECAD;发明“软件工程”一词的科技先驱出生
JS实现滑动拼图验证
LeetCode - Easy - 197
系统管理员设置了系统策略,禁止进行此安装。解决方案