Oceanbase database management-cluster deployment

This article is taken from (OBCA) training materials

(1) Experimental environment

  • The Oceanbase cluster is deployed based on 3 pc servers.
  • Create a tenant, the resource pool is 4C 10G, and each zone has such a resource.
  • Check the cluster status.
  • View system parameters and variables.
  • Create and manage users
  • View system log

## (2) Installation steps

  • To install OAT, install the template program, you need to install the rpm package of OAT on all servers.

rpm -ivh t-oceanbase-antman-1.3.3-1896174.alios.x86-64。。。。.rpm

Log in to each server and add the admin user. Set up the operating system kernel, install dependent packages, and configure ntp.
Check before deployment, run the following command

cd /root/t-oceanbase-antman
sh pro_check.sh -m ocp
sh pro_check.sh -m ob

1 When creating a cluster, you only need to specify 3 or more machines where RootService is located. You do not need to specify all machines when creating a cluster. After the cluster is created, you can add new machines. (Is rs a SYS tenant?)
2 Obproxy will not be automatically installed when creating a cluster . Users need to install obproxy separately. (Does every observer need to be installed? Automatic load balancing.)
3 After the cluster is created, every observer can be connected. The default connection port is 2881.
4 After the cluster is created, there will be a SYS tenant by default, and there will be a root user by default .
5 The way to directly connect to the observer is: username@tanant_name, such as root@SYS

Script:
1 Create a unit to
create resource specifications. It is only a specification definition and does not actually allocate resources.

create resource unit unit1
max_cpu =4,
max_memory=1024000,
min_memory= 1024000
,
max_iops =1000, min_iops=128,
max_session_num=2000
max_disk_size=10000000
2 Create resource pool
create resource pool pool1
unit='unit1',
unit_num=3 (a zone The amount of observer data contained in x>=3),
zone_list=('zone1','zone2','zone3','zone4')
Insert picture description here
1 Each resource pool has only one resource unit on each db server. If unit_num<=zone_OBSERVER.
2 zone_list is generally consistent with the number of zones.
3 If there are not enough remaining resources to create a resource unit in a certain zone, the creation fails.

3 Create tenant

create tenant mysql_tenant
resource_pool_list=(‘POOL1’),
primary_ZONE=‘ZONE1,ZONE2,ZONE3’
SET ob_tcp_invited_nodes=’%’,ob_compatibility_mode=‘mysql’,recyclebin=off,ob_timestamp_service=‘GTS’

** 3 Connect sys tenant

$mysql -c -h 127.0.0.1 -P 2881 -u root@sys -p -Doceanbase

Cluster maintenance

1 Check the cluster status
using usec

select * from __all_server\G

Guess you like

Origin blog.csdn.net/oradbm/article/details/109220638