others linux服务器运维 django3 监控 k8s golang 数据库 大数据 前端 devops 理论基础 java oracle 运维日志

oceanbase 社区版 demo安装

访问量:6 创建时间:2025-11-13

下载oceanbase

下载地址 https://www.oceanbase.com/softwarecenter

解压

[root@oceanbase1 data]# tar xf oceanbase-all-in-one-4.3.5_bp4_20250910.el7.x86_64.tar.gz 
[root@oceanbase1 data]# ll
total 1716272
drwxr-xr-x 6 root root         88 Sep 10 17:43 oceanbase-all-in-one
-rw-r--r-- 1 root root 1757462247 Nov 12 14:00 oceanbase-all-in-one-4.3.5_bp4_20250910.el7.x86_64.tar.gz

安装

[root@oceanbase1 data]# cd oceanbase-all-in-one/
[root@oceanbase1 oceanbase-all-in-one]# ./bin/install.sh 
install obd as root
No previous obd installed, try install..., wait a moment
...省略部分输出...
add auto set env logic to profile: /root/.bash_profile

#########################################################################################
 Install Finished 

=========================================================================================
Setup Environment:              source ~/.oceanbase-all-in-one/bin/env.sh 
Quick Start:                    obd demo 
Use Web Service to install:     obd web 
Use Web Service to upgrade:     obd web upgrade 
More Details:                   obd -h 
=========================================================================================

demo模式安装

demo是最小规格。 odb pref 是最大规格部署

[root@oceanbase1 oceanbase-all-in-one]# obd demo
Package oceanbase-ce-4.3.5.4-104000042025090916.el7 is available.
Package obproxy-ce-4.3.5.0-3.el7 is available.
Package grafana-7.5.17-1 is available.
Package obagent-4.2.2-100000042024011120.el7 is available.
Package prometheus-2.37.1-10000102022110211.el7 is available.
install oceanbase-ce-4.3.5.4 for local ok
install obproxy-ce-4.3.5.0 for local ok
install grafana-7.5.17 for local ok
install obagent-4.2.2 for local ok
install prometheus-2.37.1 for local ok
Cluster param config check ok
Open ssh connection ok
Generate obproxy configuration ok
Generate grafana configuration ok
Generate obagent configuration ok
Generate prometheus configuration ok
+--------------------------------------------------------------------------------------------+
|                                          Packages                                          |
+--------------+---------+------------------------+------------------------------------------+
| Repository   | Version | Release                | Md5                                      |
+--------------+---------+------------------------+------------------------------------------+
| oceanbase-ce | 4.3.5.4 | 104000042025090916.el7 | a30a15dd7a80f6acd0f113993bb70b2e56d40f80 |
| obproxy-ce   | 4.3.5.0 | 3.el7                  | f17b277b681adb1c86bfc3cfda369ad88896da9d |
| grafana      | 7.5.17  | 1                      | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obagent      | 4.2.2   | 100000042024011120.el7 | 19739a07a12eab736aff86ecf357b1ae660b554e |
| prometheus   | 2.37.1  | 10000102022110211.el7  | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
+--------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Load param plugin ok
Open ssh connection ok
Initializes obagent work home ok
Initializes observer work home ok
Initializes obproxy work home ok
Initializes prometheus work home ok
Initializes grafana work home ok
Parameter check ok
Remote oceanbase-ce-4.3.5.4-104000042025090916.el7-a30a15dd7a80f6acd0f113993bb70b2e56d40f80 repository install ok
Remote oceanbase-ce-4.3.5.4-104000042025090916.el7-a30a15dd7a80f6acd0f113993bb70b2e56d40f80 repository lib check ok
Remote obproxy-ce-4.3.5.0-3.el7-f17b277b681adb1c86bfc3cfda369ad88896da9d repository install ok
Remote obproxy-ce-4.3.5.0-3.el7-f17b277b681adb1c86bfc3cfda369ad88896da9d repository lib check ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository install ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository lib check ok
Remote obagent-4.2.2-100000042024011120.el7-19739a07a12eab736aff86ecf357b1ae660b554e repository install ok
Remote obagent-4.2.2-100000042024011120.el7-19739a07a12eab736aff86ecf357b1ae660b554e repository lib check ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository install ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository lib check ok
demo deployed
Get local repositories ok
Load cluster param plugin ok
Open ssh connection ok
[WARN] OBD-1011: (127.0.0.1) The recommended value of fs.aio-max-nr is 1048576 (Current value: 65536)
[WARN] OBD-1007: (127.0.0.1) The recommended number of core file size is unlimited (Current value: 0)
[WARN] OBD-1017: (127.0.0.1) The value of the "vm.max_map_count" must be within [327600, 1310720] (Current value: 65530, Recommended value: 655360)
[WARN] OBD-1017: (127.0.0.1) The value of the "fs.file-max" must be greater than 6573688 (Current value: 1597403, Recommended value: 6573688)
[WARN] OBD-1012: (127.0.0.1) clog and data use the same disk (/)
Check before start obagent ok
Check before start prometheus ok
Check before start grafana ok
cluster scenario: express_oltp
Start observer ok
observer program health check ok
Connect to observer 127.0.0.1:2881 ok
oceanbase bootstrap ok
obshell start ok
obshell program health check ok
obshell bootstrap ok
start obproxy ok
obproxy program health check ok
Connect to obproxy 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 127.0.0.1:2881 ok
Wait for observer init ok
+---------------------------------------------+
|                 oceanbase-ce                |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 4.3.5.4 | 2881 | zone1 | ACTIVE |
+-----------+---------+------+-------+--------+
obclient -h127.0.0.1 -P2881 -uroot@sys -p'ja8Zmm7huzCXpYxMpVTo' -Doceanbase -A

cluster unique id: 0c56d0ce-20cc-5e73-b173-a95c64396a71-19a7afc691c-04050304

Connect to obproxy ok
+---------------------------------------------------------------+
|                           obproxy-ce                          |
+-----------+------+-----------------+-----------------+--------+
| ip        | port | prometheus_port | rpc_listen_port | status |
+-----------+------+-----------------+-----------------+--------+
| 127.0.0.1 | 2883 | 2884            | 2885            | active |
+-----------+------+-----------------+-----------------+--------+
obclient -h127.0.0.1 -P2883 -uroot -p'ja8Zmm7huzCXpYxMpVTo' -Doceanbase -A 

Connect to Obagent ok
+-------------------------------------------------------------------+
|                              obagent                              |
+----------------+--------------------+--------------------+--------+
| ip             | mgragent_http_port | monagent_http_port | status |
+----------------+--------------------+--------------------+--------+
| 192.168.72.107 | 8089               | 8088               | active |
+----------------+--------------------+--------------------+--------+
Connect to Prometheus ok
+-------------------------------------------------------+
|                       prometheus                      |
+----------------------------+------+----------+--------+
| url                        | user | password | status |
+----------------------------+------+----------+--------+
| http://192.168.72.107:9090 |      |          | active |
+----------------------------+------+----------+--------+
Connect to grafana ok
+------------------------------------------------------------------------+
|                                grafana                                 |
+----------------------------------------+-------+--------------+--------+
| url                                    | user  | password     | status |
+----------------------------------------+-------+--------------+--------+
| http://192.168.72.107:3000/d/oceanbase | admin | '8vJdI6eFJZ' | active |
+----------------------------------------+-------+--------------+--------+
obshell program health check ok
display ob-dashboard ok
+---------------------------------------------------------------------+
|                             ob-dashboard                            |
+----------------------------+------+------------------------+--------+
| url                        | user | password               | status |
+----------------------------+------+------------------------+--------+
| http://192.168.72.107:2886 | root | 'ja8Zmm7huzCXpYxMpVTo' | active |
+----------------------------+------+------------------------+--------+

demo running
This is a basic setup with minimal resources, good for testing and learning. For full OceanBase performance, please destroy this cluster and redeploy by using `obd pref` command.
Trace ID: f5245256-c035-11f0-bc8b-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace f5245256-c035-11f0-bc8b-000c29eac1e9

obd命令

命令帮助

obd -h

查看集群

[root@oceanbase1 ~]# obd cluster list
+--------------------------------------------------+
|                   Cluster List                   |
+------+-------------------------+-----------------+
| Name | Configuration Path      | Status (Cached) |
+------+-------------------------+-----------------+
| demo | /root/.obd/cluster/demo | running         |
+------+-------------------------+-----------------+
Trace ID: 070338a2-c03b-11f0-be38-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace 070338a2-c03b-11f0-be38-000c29eac1e9

配置文件存放在

/root/.obd/cluster/demo

简单登陆测试

[root@oceanbase1 ~]# obclient -h127.0.0.1 -P2881 -uroot -p'ja8Zmm7huzCXpYxMpVTo' -Doceanbase -A 
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221531170
Server version: OceanBase_CE 4.3.5.4 (r104000042025090916-5cf5b925a25bf888aebaa288e251b85b1924e98a) (Built Sep  9 2025 17:07:42)

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@(none))[oceanbase]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| LBACSYS            |
| mysql              |
| oceanbase          |
| ocs                |
| ORAAUDITOR         |
| SYS                |
| sys_external_tbs   |
| test               |
+--------------------+
9 rows in set (0.003 sec)

obclient(root@(none))[oceanbase]> create database  test11;

obclient(root@(none))[oceanbase]> use test11;
Database changed
obclient(root@(none))[test11]> drop table if exists stu;
create table stu(
Query OK, 0 rows affected, 1 warning (0.029 sec)

obclient(root@(none))[test11]> create table stu(
    ->      id bigint,
    ->      name varchar(50),
    ->      age bigint
    -> );
Query OK, 0 rows affected (0.136 sec)

查看集群安装信息

[root@oceanbase1 ~]# obd cluster display demo
Get local repositories and plugins ok
Open ssh connection ok
Connect to observer 127.0.0.1:2881 ok
Wait for observer init ok
+---------------------------------------------+
|                 oceanbase-ce                |
+-----------+---------+------+-------+--------+
| ip        | version | port | zone  | status |
+-----------+---------+------+-------+--------+
| 127.0.0.1 | 4.3.5.4 | 2881 | zone1 | ACTIVE |
+-----------+---------+------+-------+--------+
obclient -h127.0.0.1 -P2881 -uroot@sys -p'ja8Zmm7huzCXpYxMpVTo' -Doceanbase -A

cluster unique id: 0c56d0ce-20cc-5e73-b173-a95c64396a71-19a7afc691c-04050304

Connect to obproxy ok
+---------------------------------------------------------------+
|                           obproxy-ce                          |
+-----------+------+-----------------+-----------------+--------+
| ip        | port | prometheus_port | rpc_listen_port | status |
+-----------+------+-----------------+-----------------+--------+
| 127.0.0.1 | 2883 | 2884            | 2885            | active |
+-----------+------+-----------------+-----------------+--------+
obclient -h127.0.0.1 -P2883 -uroot -p'ja8Zmm7huzCXpYxMpVTo' -Doceanbase -A 

Connect to Obagent ok
+-------------------------------------------------------------------+
|                              obagent                              |
+----------------+--------------------+--------------------+--------+
| ip             | mgragent_http_port | monagent_http_port | status |
+----------------+--------------------+--------------------+--------+
| 192.168.72.107 | 8089               | 8088               | active |
+----------------+--------------------+--------------------+--------+
Connect to Prometheus ok
+-------------------------------------------------------+
|                       prometheus                      |
+----------------------------+------+----------+--------+
| url                        | user | password | status |
+----------------------------+------+----------+--------+
| http://192.168.72.107:9090 |      |          | active |
+----------------------------+------+----------+--------+
Connect to grafana ok
+------------------------------------------------------------------------+
|                                grafana                                 |
+----------------------------------------+-------+--------------+--------+
| url                                    | user  | password     | status |
+----------------------------------------+-------+--------------+--------+
| http://192.168.72.107:3000/d/oceanbase | admin | '8vJdI6eFJZ' | active |
+----------------------------------------+-------+--------------+--------+
obshell program health check ok
display ob-dashboard ok
+---------------------------------------------------------------------+
|                             ob-dashboard                            |
+----------------------------+------+------------------------+--------+
| url                        | user | password               | status |
+----------------------------+------+------------------------+--------+
| http://192.168.72.107:2886 | root | 'ja8Zmm7huzCXpYxMpVTo' | active |
+----------------------------+------+------------------------+--------+

Trace ID: ab8dfa36-c03d-11f0-b66d-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace ab8dfa36-c03d-11f0-b66d-000c29eac1e9

关停服务

[root@oceanbase1 ~]# obd cluster stop demo
Get local repositories ok
Get local repositories and plugins ok
Open ssh connection ok
Stop observer ok
Stop obshell ok
Stop obproxy-ce ok
Stop obagent ok
Stop prometheus ok
Stop grafana ok
demo stopped
Trace ID: 0def9012-c03f-11f0-b0f2-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace 0def9012-c03f-11f0-b0f2-000c29eac1e9

查看集群状态

[root@oceanbase1 ~]# obd cluster list
+--------------------------------------------------+
|                   Cluster List                   |
+------+-------------------------+-----------------+
| Name | Configuration Path      | Status (Cached) |
+------+-------------------------+-----------------+
| demo | /root/.obd/cluster/demo | stopped         |
+------+-------------------------+-----------------+
Trace ID: 2ed39882-c03f-11f0-99f1-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace 2ed39882-c03f-11f0-99f1-000c29eac1e9
##########

[root@oceanbase1 ~]# vim  /root/.obd/cluster/demo/config.yaml 
oceanbase-ce:
  servers:
  - 127.0.0.1
  global:
    home_path: /root/oceanbase-ce
    data_dir: /obdata/store

[root@oceanbase1 ~]# mv /root/oceanbase-ce/store /obdata/
###启动数据库组件
[root@oceanbase1 ~]# obd cluster start demo
#####删除配置重新部署
[root@oceanbase1 ~]# obd cluster destroy demo
Are you sure to destroy the "demo" cluster ? [y/n]: y
Get local repositories ok
Open ssh connection ok
Get deployment connections ok
Get standbys info ok
Get local repositories and plugins ok
Stop observer ok
Stop obshell ok
Stop obproxy-ce ok
Stop obagent ok
Stop prometheus ok
Stop grafana ok
demo stopped
Cluster status check ok
oceanbase-ce work dir cleaning ok
obproxy-ce work dir cleaning ok
obagent work dir cleaning ok
prometheus work dir cleaning ok
grafana work dir cleaning ok
demo destroyed
Trace ID: 63828486-c048-11f0-9fb4-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace 63828486-c048-11f0-9fb4-000c29eac1e9

重新部署##########obd cluster deploy obtest -c mini-single-example.yaml
[root@oceanbase1 ~]# obd cluster deploy  demo
Are you sure you want to deploy the database as the root user? [y/n] [Default: n]: y
+--------------------------------------------------------------------------------------------+
|                                          Packages                                          |
+--------------+---------+------------------------+------------------------------------------+
| Repository   | Version | Release                | Md5                                      |
+--------------+---------+------------------------+------------------------------------------+
| oceanbase-ce | 4.3.5.4 | 104000042025090916.el7 | a30a15dd7a80f6acd0f113993bb70b2e56d40f80 |
| obproxy-ce   | 4.3.5.0 | 3.el7                  | f17b277b681adb1c86bfc3cfda369ad88896da9d |
| grafana      | 7.5.17  | 1                      | 1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 |
| obagent      | 4.2.2   | 100000042024011120.el7 | 19739a07a12eab736aff86ecf357b1ae660b554e |
| prometheus   | 2.37.1  | 10000102022110211.el7  | 58913c7606f05feb01bc1c6410346e5fc31cf263 |
+--------------+---------+------------------------+------------------------------------------+
Repository integrity check ok
Load param plugin ok
Open ssh connection ok
Initializes obagent work home ok
Initializes observer work home ok
Initializes obproxy work home ok
Initializes prometheus work home ok
Initializes grafana work home ok
Parameter check ok
Remote oceanbase-ce-4.3.5.4-104000042025090916.el7-a30a15dd7a80f6acd0f113993bb70b2e56d40f80 repository install ok
Remote oceanbase-ce-4.3.5.4-104000042025090916.el7-a30a15dd7a80f6acd0f113993bb70b2e56d40f80 repository lib check ok
Remote obproxy-ce-4.3.5.0-3.el7-f17b277b681adb1c86bfc3cfda369ad88896da9d repository install ok
Remote obproxy-ce-4.3.5.0-3.el7-f17b277b681adb1c86bfc3cfda369ad88896da9d repository lib check ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository install ok
Remote grafana-7.5.17-1-1bf1f338d3a3445d8599dc6902e7aeed4de4e0d6 repository lib check ok
Remote obagent-4.2.2-100000042024011120.el7-19739a07a12eab736aff86ecf357b1ae660b554e repository install ok
Remote obagent-4.2.2-100000042024011120.el7-19739a07a12eab736aff86ecf357b1ae660b554e repository lib check ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository install ok
Remote prometheus-2.37.1-10000102022110211.el7-58913c7606f05feb01bc1c6410346e5fc31cf263 repository lib check ok
demo deployed
Please execute ` obd cluster start demo ` to start
Trace ID: a61b0e4e-c048-11f0-b448-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace a61b0e4e-c048-11f0-b448-000c29eac1e9
######################查看集群状态
[root@oceanbase1 ~]# obd cluster list
+--------------------------------------------------+
|                   Cluster List                   |
+------+-------------------------+-----------------+
| Name | Configuration Path      | Status (Cached) |
+------+-------------------------+-----------------+
| demo | /root/.obd/cluster/demo | deployed        |
+------+-------------------------+-----------------+
Trace ID: da3ff75c-c048-11f0-98d8-000c29eac1e9
If you want to view detailed obd logs, please run: obd display-trace da3ff75c-c048-11f0-98d8-000c29eac1e9

查看部署故障信息

obd display-trace <trace_id>
登陆评论: 使用GITHUB登陆