https://www.oceanbase.com/softwarecenter
- [admin@test001 ~]$ tar -xzf oceanbase-all-in-one-*.tar.gz
- [admin@test001 ~]$ cd oceanbase-all-in-one/bin/ [admin@test001 bin]$ ./install.sh [admin@test001 bin]$ source ~/.oceanbase-all-in-one/bin/env.sh
1. 编写配置config.yaml
- user:
- username: root
- password: xxxxxx
- port: 22
- oceanbase-ce:
- version: 4.1.0.0
- release: 100000202023040520.e17
- package_hash: d598937b1cfb1df85e2c2231acf024e4994db533
- 1.1.1.1:
- zone: zone_1
- servers:
- - 10.40.3.64
- global:
- appname: test
- root_password: xxxxx
- mysq1_port: 2881
- rpc_port: 2882
- home_path: /root/test/oceanbase
- datafile_size: 1G
- ocp_meta_tenant_max_cpu: '1'
- ocp_meta_tenant_memory_size: 1G
- enable_syslog_recycle: true
- enable_syslog_ wf: false
- max_sys1og_file_count: 4
- memory_limit: 6G
- system_memory: 1G
- log_disk_size: 15G
- cpu_count: 16
- production_mode: false
- __min_full_resource_pool_memory: 1073741824
2. 执行安装
[admin@test001 ~]$ obd cluster deploy obtest -c all-components.yaml
[admin@test001 ~]$ obd cluster start obtest
即可 使用 ip 端口: 2881 密码: xxxxx 用户:root 登录。
用 root/xxxxxx 登录, 执行如下SQL
- # 创建资源池 租户 默认密码为空
- CREATE RESOURCE POOL test_pool UNIT='sys_unit_config', UNIT_NUM=1, ZONE_LIST=('zone1');
- CREATE TENANT IF NOT EXISTS test PRIMARY_ZONE='zone1', RESOURCE_POOL_LIST=('test_pool') set OB_TCP_INVITED_NODES='%';
- # 查看资源池
- SELECT * FROM DBA_OB_UNIT_CONFIGS;
- SELECT * FROM DBA_OB_RESOURCE_POOLS;
- # 查看租户
- SELECT * FROM DBA_OB_TENANTS;
用 root@test 密码为空登录, 执行如下SQL修改密码
ALTER USER root IDENTIFIED BY "xxxxxx"
即可使用 root@test / xxxxxx 进行登录。
obd cluster start obtest