Oceanbase 单机版(V4.2.5 for ARM)安装体验
近期OceanBase发布了单机版 – 小规格/小规模部署安装包,对硬件资源进一步降低,之前我有安装分布式单节点版,Oceanbase V4.2 (企业版) OBD单机安装(CentOS 7.9 Linux VBOX虚拟机),这次单机版邀测, 记录一下安装过程,总体比较感觉比较流畅,安装介质700M左右,一键安装包,几分钟完成。
更多介绍和下载连接官方OceanBase 企业版(单机版)
本安装包适用于中小业务体量,硬件资源要求不高的部署环境(CPU资源最低 2C起),包含 OceanBase 数据库单机版、obd、OBClient、OBAgent、Grafana 和 Prometheus。不包含 OCP、ODC 等部署、监控和应用开发生态工具,备份恢复及主备租户均以黑屏命令方式运维。
环境
Oceanbase 单机版 V4.2.5 ARM
BcLinux 22 ARM (中移动的Linux发行版)
[root@anbob_com_207 bin]# uname -r 5.10.0-153.24.0.100.6.oe2203sp2.bclinux.aarch64 [root@anbob_com_207 bin]# free -h total used free shared buff/cache available Mem: 14Gi 4.9Gi 1.7Gi 116Mi 8.1Gi 9.5Gi Swap: 4.0Gi 0B 4.0Gi [root@anbob_com_207 bin]# cat /etc/*release BigCloud Enterprise Linux For Euler release 22.10U2 LTS BigCloud Enterprise Linux For Euler release 22.10U2 LTS NAME="BigCloud Enterprise Linux" VERSION="22.10U2 LTS" ID="bclinux" VERSION_ID="22.10U2" PRETTY_NAME="BigCloud Enterprise Linux For Euler 22.10U2 LTS" ANSI_COLOR="0;31" BigCloud Enterprise Linux For Euler release 22.10U2 LTS
解压单机版安装包
[root@anbob_com_207 data]# ll -rw-r--r-- 1 root root 690829146 Apr 9 12:17 oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz [root@anbob_com_207 data]# tar -zxvf oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz [root@anbob_com_207 data]# ls oceanbase-standalone-all-in-one oceanbase-standalone-all-in-one-4.2.5.3-103000152025033110.el7.aarch64.tar.gz [root@anbob_com_207 data]# cd oceanbase-standalone-all-in-one [root@anbob_com_207 oceanbase-standalone-all-in-one]# ls bin obclient obd README.md rpms VERSION [root@anbob_com_207 oceanbase-standalone-all-in-one]# bin/install_ob install_obd.sh install_ob.sh
Note:
注意这里没有README.MD或文档上提到的install.sh
安装 obd
[root@anbob_com_207 oceanbase-standalone-all-in-one]# bin/install_obd.sh install obd as root No previous obd installed, try install..., wait a moment name: grafana version: 7.5.17 release:1 arch: aarch64 md5: 5129b0134e31d273c970a7e3c7370990016bee16 size: 171613256 add /data/oceanbase-standalone-all-in-one/rpms/grafana-7.5.17-1.el7.aarch64.rpm to local mirror name: obagent version: 4.2.2 release:100000042024011120.el7 arch: aarch64 md5: 8a5c3b8c55defe409d1e72b7efd13c5e41549545 size: 71788628 add /data/oceanbase-standalone-all-in-one/rpms/obagent-4.2.2-100000042024011120.el7.aarch64.rpm to local mirror name: ob-deploy version: 3.2.0 release:2.el7 arch: aarch64 md5: 14e6991e46602e93b9649711624ae574a98cb4af size: 107194377 add /data/oceanbase-standalone-all-in-one/rpms/ob-deploy-3.2.0-2.el7.aarch64.rpm to local mirror name: oceanbase-diagnostic-tool version: 3.2.0 release:52025031411.el7 arch: aarch64 md5: e2443774f3f0b02ed686ae8b5793cc287d3fbb8f size: 63155246 add /data/oceanbase-standalone-all-in-one/rpms/oceanbase-diagnostic-tool-3.2.0-52025031411.el7.aarch64.rpm to local mirror name: oceanbase-standalone version: 4.2.5.3 release:103000152025033110.el7 arch: aarch64 md5: eb63676185e5a8a982ae23f7d94d312d2bb52e4b size: 2190687421 add /data/oceanbase-standalone-all-in-one/rpms/oceanbase-standalone-4.2.5.3-103000152025033110.el7.aarch64.rpm to local mirror name: oceanbase-standalone-libs version: 4.2.5.3 release:103000152025033110.el7 arch: aarch64 md5: b3a70d59e739692948ae8b41e3434a44b0001020 size: 70072 add /data/oceanbase-standalone-all-in-one/rpms/oceanbase-standalone-libs-4.2.5.3-103000152025033110.el7.aarch64.rpm to local mirror name: prometheus version: 2.37.1 release:10000102022110211.el7 arch: aarch64 md5: 2d856b4a90e7a35322bc3412231f714fde3fd794 size: 206787525 add /data/oceanbase-standalone-all-in-one/rpms/prometheus-2.37.1-10000102022110211.el7.aarch64.rpm to local mirror Trace ID: 9bf1bed8-14fc-11f0-9899-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 9bf1bed8-14fc-11f0-9899-52540033a742 Disable remote ok Trace ID: 9d570224-14fc-11f0-95b5-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 9d570224-14fc-11f0-95b5-52540033a742 add auto set env logic to profile: /root/.bash_profile Execute this command to apply the environment config:`source ~/.oceanbase-all-in-one/bin/env.sh ` [root@anbob_com_207 oceanbase-standalone-all-in-one]# source ~/.oceanbase-all-in-one/bin/env.sh [root@anbob_com_207 oceanbase-standalone-all-in-one]# odb demo -bash: odb: command not found
启动交互式安装OB
[root@anbob_com_207 oceanbase-standalone-all-in-one]# bin/install_ob.sh
Enter the IP (Default: 172.20.23.207) (only support local IP):
Valid local IP: 172.20.23.207
Enter the current user password :
Trace ID: c9d440c8-14fc-11f0-bf9f-52540033a742
If you want to view detailed obd logs, please run: obd display-trace c9d440c8-14fc-11f0-bf9f-52540033a742
get system config ok
+-----------------------------------------------------------------+
| System Parameter Change List |
+---------------+------------------+---------------+--------------+
| ip | need_change_var | current_value | target_value |
+---------------+------------------+---------------+--------------+
| 172.20.23.207 | fs.aio-max-nr | 65536 | 1048576 |
| 172.20.23.207 | vm.max_map_count | 65530 | 655360 |
| 172.20.23.207 | nofile | 1024 | 655350 |
+---------------+------------------+----------------+--------------+
...
Open ssh connection ok
[ERROR] OBD-1007: (172.20.23.207) The value of the ulimit parameter "open files" must not be less than 20000 (Current value: 1024), Please execute `echo -e "* soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf` as root in 172.20.23.207. if it dosen't work, please check whether UsePAM is yes in /etc/ssh/sshd_config.
[WARN] OBD-1007: (172.20.23.207) The recommended number of stack size is unlimited (Current value: 8192)
[WARN] OBD-2000: (172.20.23.207) not enough memory. (Free: 9G, Need: 12G)
[WARN] OBD-1012: (172.20.23.207) clog and data use the same disk (/data)
You can use the `obd cluster init4env standalone` command to automatically configure system parameters
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 2b0a7a7e-14fd-11f0-a7d3-52540033a742
If you want to view detailed obd logs, please run: obd display-trace 2b0a7a7e-14fd-11f0-a7d3-52540033a742
start cluster failed
Note:
因为unlimt参数,启动失败. 按提示修复一下试试
尝试修复参数,并重装
[root@anbob_com_207 oceanbase-standalone-all-in-one]# echo -e "* soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf [root@anbob_com_207 oceanbase-standalone-all-in-one]# obd cluster init4env standalone Get local repositories ok Open ssh connection ok get system config ok +------------------------------------------------+ | System Parameter Change List | +---------------+-----------------+--------------+ | ip | need_change_var | target_value | +---------------+-----------------+--------------+ | 172.20.23.207 | nofile | 655350 | +---------------+-----------------+--------------+ Are you sure to change the parameters listed above ? [y/n]: y 172.20.23.207: ( nofile ) have been successfully modified! Trace ID: 97318008-14fd-11f0-bf98-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 97318008-14fd-11f0-bf98-52540033a742 [root@anbob_com_207 oceanbase-standalone-all-in-one]# bin/install_ob.sh ... Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): The cluster name already exists and is in a deployed state. Please choose a different name. .. Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): ob_single Enter the OB SQL port (Default: 2881): [ERROR] OBD-1007: (172.20.23.207) The value of the ulimit parameter "open files" must not be less than 20000 (Current value: 1024), Please execute `echo -e "* soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf` as root in 172.20.23.207. if it dosen't work, please check whether UsePAM is yes in /etc/ssh/sshd_config. [root@anbob_com_207 oceanbase-standalone-all-in-one]# cat /etc/security/limits.d/nofile.conf root soft nofile 655350 root hard nofile 655350 * soft nofile 20000 * hard nofile 20000 root soft nofile 655350 root hard nofile 655350 root soft nofile 655350 root hard nofile 655350 [root@anbob_com_207 oceanbase-standalone-all-in-one]# grep PAM /etc/ssh/sshd_config # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via KbdInteractiveAuthentication may bypass # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # WARNING: 'UsePAM no' is not supported in openEuler and may cause several UsePAM yes
Note:
这里重新安装,提示集群名被占用,改了个新名,安装失败,还是ulimit open files限制。
手动修复
[root@anbob_com_207 oceanbase-standalone-all-in-one]# ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 58469
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 58469
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
[root@anbob_com_207 oceanbase-standalone-all-in-one]# ulimit -n 655350
[root@anbob_com_207 oceanbase-standalone-all-in-one]# ulimit -a
real-time non-blocking time (microseconds, -R) unlimited
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 58469
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 655350
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 58469
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
再次安装OB
[root@anbob_com_207 oceanbase-standalone-all-in-one]# bin/install_ob.sh Enter the IP (Default: 172.20.23.207) (only support local IP): Valid local IP: 172.20.23.207 Enter the current user password : Trace ID: a57f9cd4-14fe-11f0-986d-52540033a742 If you want to view detailed obd logs, please run: obd display-trace a57f9cd4-14fe-11f0-986d-52540033a742 get system config ok No need to change system parameters Trace ID: a66c7da6-14fe-11f0-b524-52540033a742 If you want to view detailed obd logs, please run: obd display-trace a66c7da6-14fe-11f0-b524-52540033a742 Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): The cluster name already exists and is in a deployed state. Please choose a different name. Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): ob_one Enter the OB SQL port (Default: 2881): Enter the OB RPC port (Default: 2882): Enter the obshell port (Default: 2886): Enter the OB root password (Default: r8MT58jvar3bVJsDcodw): Confirm the OB root password: Enter the OB cpu count (Default: 8): Enter the OB memory limit (Configurable Range[6, 12], Default: 12, Unit: G): Enter the OB installation directory (Default: /root/ob_one): /data/ob_one Enter the OB data directory (Default: /data/1/ob_one): Enter the OB log directory (Default: /data/log1/ob_one): The data_dir and redo_dir are using the same disk. Enter the OB datafile maxsize (Configurable Range[24, 54], Default: 54, Unit: G): Enter the OB log disk size (Configurable Range[24, 26], Default: 26, Unit: G): Do you want to create tenant for your business workload? (y/n)(Default: y): Tenant: sys conifguration: 2C/1G/3G(CPU/Memory/Log disk) system_memory configuration(Unit: G): 5 Enter the tenant name (Default: test; allowed characters: letters, numbers, and underscores): Please select the tenant mode (enter the corresponding number): 1) MySQL 2) Oracle Please enter your choice [1/2] (default 1):2 Enter the tenant cpu (Configurable Range[1, 6], Default: 6): Enter the tenant memory (Configurable Range[1, 6], Default: 6, Unit: G): Enter the tenant log disk size(Configurable Range[18, 22], Default: 22, Unit: G): Do you want to enable encryption for password security? (y/n) (Default: n): Do you need to install the monitoring components (OBAgent, Prometheus, Grafana)? (y/n) (Default: y): Enter the OBAgent monitoring service port (Default: 8088): Enter the OBAgent management service port (Default: 8089): Enter the Prometheus port (Default: 9090): Enter the Grafana port (Default: 3000): #Saved configurations: cluster name: ob_one mysql port: 2881 rpc port: 2882 obshell port: 2886 cpu count: 8 memory limit: 12G home path: /data/ob_one data dir: /data/1/ob_one log dir: /data/log1/ob_one datafile maxsize: 54G log disk size: 26G tenant name: test tenant cpu: 6 tenant memory: 6G tenant log disk size: 22G OBAgent monitoring service port: 8088 OBAgent management service port: 8089 Prometheus port: 9090 Grafana port: 3000 Are you sure these configurations are correct? (y/n) (Default: y): Configuration confirmed. start cluster... Cluster param config check ok Open ssh connection ok Generate obagent configuration ok Generate prometheus configuration ok Generate grafana configuration ok +----------------------------------------------------------------------------------------------------+ | Packages | +----------------------+---------+------------------------+------------------------------------------+ | Repository | Version | Release | Md5 | +----------------------+---------+------------------------+------------------------------------------+ | oceanbase-standalone | 4.2.5.3 | 103000152025033110.el7 | eb63676185e5a8a982ae23f7d94d312d2bb52e4b | | obagent | 4.2.2 | 100000042024011120.el7 | 8a5c3b8c55defe409d1e72b7efd13c5e41549545 | | prometheus | 2.37.1 | 10000102022110211.el7 | 2d856b4a90e7a35322bc3412231f714fde3fd794 | | grafana | 7.5.17 | 1 | 5129b0134e31d273c970a7e3c7370990016bee16 | +----------------------+---------+------------------------+------------------------------------------+ Repository integrity check ok Load param plugin ok Open ssh connection ok Initializes obagent work home ok Initializes observer work home ok Initializes prometheus work home ok Initializes grafana work home ok Parameter check ok Remote oceanbase-standalone-4.2.5.3-103000152025033110.el7-eb63676185e5a8a982ae23f7d94d312d2bb52e4b repository install ok Remote oceanbase-standalone-4.2.5.3-103000152025033110.el7-eb63676185e5a8a982ae23f7d94d312d2bb52e4b repository lib check ok Remote obagent-4.2.2-100000042024011120.el7-8a5c3b8c55defe409d1e72b7efd13c5e41549545 repository install ok Remote obagent-4.2.2-100000042024011120.el7-8a5c3b8c55defe409d1e72b7efd13c5e41549545 repository lib check ok Remote prometheus-2.37.1-10000102022110211.el7-2d856b4a90e7a35322bc3412231f714fde3fd794 repository install ok Remote prometheus-2.37.1-10000102022110211.el7-2d856b4a90e7a35322bc3412231f714fde3fd794 repository lib check ok Remote grafana-7.5.17-1-5129b0134e31d273c970a7e3c7370990016bee16 repository install ok Remote grafana-7.5.17-1-5129b0134e31d273c970a7e3c7370990016bee16 repository lib check ok ob_one deployed Get local repositories ok Load cluster param plugin ok Open ssh connection ok [WARN] OBD-1007: (172.20.23.207) The recommended number of stack size is unlimited (Current value: 8192) [WARN] OBD-2000: (172.20.23.207) not enough memory. (Free: 9G, Need: 12G) [WARN] OBD-1012: (172.20.23.207) clog and data use the same disk (/data) Check before start obagent ok Check before start prometheus ok Check before start grafana ok cluster scenario: None Start observer ok observer program health check ok Connect to observer 172.20.23.207:2881 ok oceanbase bootstrap ok obshell start ok obshell program health check ok obshell bootstrap ok Start obagent ok obagent program health check ok Start promethues ok prometheus program health check ok Start grafana ok grafana program health check ok Connect to grafana ok Grafana modify password ok Connect to observer 172.20.23.207:2881 ok Wait for observer init ok +-------------------------------------------------+ | oceanbase-standalone | +---------------+---------+------+-------+--------+ | ip | version | port | zone | status | +---------------+---------+------+-------+--------+ | 172.20.23.207 | 4.2.5.3 | 2881 | zone1 | ACTIVE | +---------------+---------+------+-------+--------+ obclient -h172.20.23.207 -P2881 -uroot@sys -p'root123' -Doceanbase -A cluster unique id: af056b16-8ddf-5b97-be1a-35d8393fd1ef-19618e7f4b2-03050204 Connect to Obagent ok +------------------------------------------------------------------+ | obagent | +---------------+--------------------+--------------------+--------+ | ip | mgragent_http_port | monagent_http_port | status | +---------------+--------------------+--------------------+--------+ | 172.20.23.207 | 8089 | 8088 | active | +---------------+--------------------+--------------------+--------+ Connect to Prometheus ok +---------------------------------------------------------+ | prometheus | +---------------------------+-------+------------+--------+ | url | user | password | status | +---------------------------+-------+------------+--------+ | http://172.20.23.207:9090 | admin | ToAr9FHZbD | active | +---------------------------+-------+------------+--------+ Connect to grafana ok +--------------------------------------------------------------------+ | grafana | +---------------------------------------+-------+-----------+--------+ | url | user | password | status | +---------------------------------------+-------+-----------+--------+ | http://172.20.23.207:3000/d/oceanbase | admin | oceanbase | active | +---------------------------------------+-------+-----------+--------+ ob_one running Trace ID: cb16a140-14fe-11f0-b935-52540033a742 If you want to view detailed obd logs, please run: obd display-trace cb16a140-14fe-11f0-b935-52540033a742 create tenant... Get local repositories ok Open ssh connection ok Connect to observer 172.20.23.207:2881 ok Create tenant test ok Create user in oracle tenant is not supported and --password is not supported Trace ID: 1ae4b7ca-14ff-11f0-ae1c-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 1ae4b7ca-14ff-11f0-ae1c-52540033a742 You can access the test tenant using the following command.: For security reasons, kindly reset the root password immeditely once the tenant has been successfully created. obclient -h172.20.23.207 -P2881 -uSYS@test If this cluster is for production use, please import a commercial license in time.
Note:
这里再次启用了新的集群名,安装成功,篇幅较大,为了显示完整的过程输出
查看License
[root@anbob_com_207 ~]# obd license show ob_one Get local repositories and plugins ok Open ssh connection ok Connect to observer 172.20.23.207:2881 ok +---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | license | +------------+------------+--------------+--------------+--------------+---------------------+---------------------+---------------------+-----------+----------+ | end_user | license_id | license_code | license_type | product_type | issuance_date | activation_time | expired_time | options | node_num | +------------+------------+--------------+--------------+--------------+---------------------+---------------------+---------------------+-----------+----------+ | Trial User | Trial ID | Trial Code | Trial | SE | 2025-04-09 12:56:23 | 2025-04-09 12:56:23 | 2025-10-06 12:56:23 | Unlimited | 1 | +------------+------------+--------------+--------------+--------------+---------------------+---------------------+---------------------+-----------+----------+ Trace ID: ee93b3fc-1516-11f0-a5f6-52540033a742 If you want to view detailed obd logs, please run: obd display-trace ee93b3fc-1516-11f0-a5f6-52540033a742
查看集群列表。
[root@anbob_com_207 bin]# obd cluster list +--------------------------------------------------------------+ | Cluster List | +------------+-------------------------------+-----------------+ | Name | Configuration Path | Status (Cached) | +------------+-------------------------------+-----------------+ | standalone | /root/.obd/cluster/standalone | deployed | | ob_single | /root/.obd/cluster/ob_single | deployed | | ob_one | /root/.obd/cluster/ob_one | running | +------------+-------------------------------+-----------------+ Trace ID: 8522194e-1517-11f0-ba5f-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 8522194e-1517-11f0-ba5f-52540033a742
查看集群具体状态。
[root@anbob_com_207 bin]# obd cluster display ob_one Get local repositories and plugins ok Open ssh connection ok Connect to observer 172.20.23.207:2881 ok Wait for observer init ok +-------------------------------------------------+ | oceanbase-standalone | +---------------+---------+------+-------+--------+ | ip | version | port | zone | status | +---------------+---------+------+-------+--------+ | 172.20.23.207 | 4.2.5.3 | 2881 | zone1 | ACTIVE | +---------------+---------+------+-------+--------+ obclient -h172.20.23.207 -P2881 -uroot@sys -p'root123' -Doceanbase -A cluster unique id: af056b16-8ddf-5b97-be1a-35d8393fd1ef-19618e7f4b2-03050204 Connect to Obagent ok +------------------------------------------------------------------+ | obagent | +---------------+--------------------+--------------------+--------+ | ip | mgragent_http_port | monagent_http_port | status | +---------------+--------------------+--------------------+--------+ | 172.20.23.207 | 8089 | 8088 | active | +---------------+--------------------+--------------------+--------+ Connect to Prometheus ok +---------------------------------------------------------+ | prometheus | +---------------------------+-------+------------+--------+ | url | user | password | status | +---------------------------+-------+------------+--------+ | http://172.20.23.207:9090 | admin | ToAr9FHZbD | active | +---------------------------+-------+------------+--------+ Connect to grafana ok +--------------------------------------------------------------------+ | grafana | +---------------------------------------+-------+-----------+--------+ | url | user | password | status | +---------------------------------------+-------+-----------+--------+ | http://172.20.23.207:3000/d/oceanbase | admin | oceanbase | active | +---------------------------------------+-------+-----------+--------+ Trace ID: a8c9faa6-1517-11f0-81cb-52540033a742 If you want to view detailed obd logs, please run: obd display-trace a8c9faa6-1517-11f0-81cb-52540033a742
查看集群租户。
[root@anbob_com_207 bin]# obd cluster tenant show ob_one Get local repositories ok Get deployment connections ok Connect to observer 172.20.23.207:2881 ok Select tenant ok +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | tenant basic info | +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+ | tenant_name | tenant_type | compatibility_mode | primary_zone | max_cpu | min_cpu | memory_size | max_iops | min_iops | log_disk_size | iops_weight | tenant_role | +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+ | sys | SYS | MYSQL | RANDOM | 2.0 | 2.0 | 1G | 9223372036854775807 | 9223372036854775807 | 3G | 2 | PRIMARY | | test | USER | ORACLE | zone1 | 6.0 | 6.0 | 6G | 9223372036854775807 | 9223372036854775807 | 22G | 6 | PRIMARY | +-------------+-------------+--------------------+--------------+---------+---------+-------------+---------------------+---------------------+---------------+-------------+-------------+ Trace ID: bbef068a-1517-11f0-b0b1-52540033a742 If you want to view detailed obd logs, please run: obd display-trace bbef068a-1517-11f0-b0b1-52540033a742
连接 OceanBase 集群。
-- oracle 兼容 [root@anbob_com_207 oceanbase-standalone-all-in-one]# obclient -h172.20.23.207 -P2881 -uSYS@test Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221511914 Server version: OceanBase 4.2.5.3 (r103000152025033110-f5b88cd987f23383677f2eb53cf76ed38a48979b) (Built Mar 31 2025 11:37:26) Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. obclient(SYS@test)[SYS]> select sysdate from dual; +-----------+ | SYSDATE | +-----------+ | 09-APR-25 | +-----------+ 1 row in set (0.002 sec) obclient(SYS@test)[SYS]> select * from v$version; +---------------------------------------------------------------------------------------------------------------+--------+ | BANNER | CON_ID | +---------------------------------------------------------------------------------------------------------------+--------+ | OceanBase 4.2.5.3 (r103000152025033110-f5b88cd987f23383677f2eb53cf76ed38a48979b) (Built Mar 31 2025 11:37:26) | 0 | +---------------------------------------------------------------------------------------------------------------+--------+ 1 row in set (0.005 sec) -- MySQL兼容 [root@anbob_com_207 bin]# obclient -h172.20.23.207 -P2881 -uroot@sys -p -c -A Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your OceanBase connection id is 3221504759 Server version: OceanBase 4.2.5.3 (r103000152025033110-f5b88cd987f23383677f2eb53cf76ed38a48979b) (Built Mar 31 2025 11:37:26) Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. obclient(root@sys)[(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | LBACSYS | | mysql | | oceanbase | | ocs | | ORAAUDITOR | | SYS | | sys_external_tbs | | test | +--------------------+ 9 rows in set (0.005 sec)
销毁已部署的集群
[root@anbob_com_207 bin]# obd cluster destroy ob_single Are you sure to destroy the "ob_single" cluster ? [y/n]: y Get local repositories ok Open ssh connection ok Get deployment connections ok Get standbys info ok Cluster status check ok oceanbase-standalone work dir cleaning ok obagent work dir cleaning ok prometheus work dir cleaning ok grafana work dir cleaning ok ob_single destroyed Trace ID: 5698119a-1518-11f0-a90d-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 5698119a-1518-11f0-a90d-52540033a742 [root@anbob_com_207 bin]# obd cluster list +--------------------------------------------------------------+ | Cluster List | +------------+-------------------------------+-----------------+ | Name | Configuration Path | Status (Cached) | +------------+-------------------------------+-----------------+ | standalone | /root/.obd/cluster/standalone | deployed | | ob_single | /root/.obd/cluster/ob_single | destroyed | | ob_one | /root/.obd/cluster/ob_one | running | +------------+-------------------------------+-----------------+ Trace ID: 5cb31e1c-1518-11f0-9764-52540033a742 If you want to view detailed obd logs, please run: obd display-trace 5cb31e1c-1518-11f0-9764-52540033a742 [root@dev-zcloud-207 data]# ls -l ob_single/ total 0
自带的ganfana监控
— done
目前这篇文章还没有评论(Rss)