OceanBase V4.3.5_BP3(LTS) 社区版部署

图片.png

1:创建用户、组

创建用户组

groupadd admin

创建用户

useradd admin -g admin
passwd admin

2:修改linux配置

echo -e "* soft nproc 120000\n* hard nproc 120000" >> /etc/security/limits.d/nproc.conf
echo -e "* soft nofile 20000\n* hard nofile 20000" >> /etc/security/limits.d/nofile.conf
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo

3:下载软件

https://www.oceanbase.com/softwarecenter

image.png

[root@cjc-db-01 ob]# ls -lrth 
total 1.7G
-rw-r--r-- 1 root root 1.7G Aug 28 03:44 oceanbase-all-in-one-4.3.5_bp3_20250819.el7.x86_64.tar.gz

4:安装

cd oceanbase-all-in-one/bin/
./install.sh
......
#########################################################################################
 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 
=========================================================================================
source ~/.oceanbase-all-in-one/bin/env.sh

5:界面配置

[root@cjc-db-01 bin]# obd web
start OBD WEB in 0.0.0.0:8680
please open http://192.168.244.101:8680

image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png

6:安装后验证


[root@cjc-db-01 ~]# obd cluster list
+-------------------------------------------------+
|                   Cluster List                  |
+------+------------------------+-----------------+
| Name | Configuration Path     | Status (Cached) |
+------+------------------------+-----------------+
| cjc  | /root/.obd/cluster/cjc | running         |
+------+------------------------+-----------------+
Trace ID: 096901a2-8383-11f0-abc2-000c294205fa
If you want to view detailed obd logs, please run: obd display-trace 096901a2-8383-11f0-abc2-000c294205fa


[root@cjc-db-01 ~]# obclient -h127.0.0.1 -uroot -p -P2881
Enter password: 
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221498205
Server version: OceanBase_CE 4.3.5.3 (r103000092025080818-e8da5f0afb288ed0add0613740c6ccf2a3c6830b) (Built Aug  8 2025 18:44:31)

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

obclient(root@(none))[(none)]> create database cjc;
Query OK, 1 row affected (0.037 sec)


[root@cjc-db-01 ~]# obclient -h192.168.244.101 -P2881 -uroot@sys -p'******' -Doceanbase -A
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221499522
Server version: OceanBase_CE 4.3.5.3 (r103000092025080818-e8da5f0afb288ed0add0613740c6ccf2a3c6830b) (Built Aug  8 2025 18:44:31)

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

obclient(root@sys)[oceanbase]> 

查看集群状态

[root@cjc-db-01 ~]# obd cluster display cjc
Get local repositories and plugins ok
Open ssh connection ok
Connect to ob-configserver ok
+----------------------------------------------------------------------+
|                           ob-configserver                            |
+-----------------+------+-----------------+----------+--------+-------+
| server          | port | vip_address     | vip_port | status | pid   |
+-----------------+------+-----------------+----------+--------+-------+
| 192.168.244.101 | 8080 | 192.168.244.101 | 8080     | active | 17264 |
+-----------------+------+-----------------+----------+--------+-------+
curl -s 'http://192.168.244.101:8080/services?Action=GetObProxyConfig'
Connect to observer 192.168.244.101:2881 ok
Wait for observer init ok
+---------------------------------------------------+
|                    oceanbase-ce                   |
+-----------------+---------+------+-------+--------+
| ip              | version | port | zone  | status |
+-----------------+---------+------+-------+--------+
| 192.168.244.101 | 4.3.5.3 | 2881 | zone1 | ACTIVE |
+-----------------+---------+------+-------+--------+
obclient -h192.168.244.101 -P2881 -uroot@sys -p'Z2VzrK2*:oUP' -Doceanbase -A

cluster unique id: 9f6a48e8-e5a5-5076-9209-447531e984e6-198ed28d315-03050304

Connect to obproxy ok
+---------------------------------------------------------------------+
|                              obproxy-ce                             |
+-----------------+------+-----------------+-----------------+--------+
| ip              | port | prometheus_port | rpc_listen_port | status |
+-----------------+------+-----------------+-----------------+--------+
| 192.168.244.101 | 2883 | 2884            | 2885            | active |
+-----------------+------+-----------------+-----------------+--------+
obclient -h192.168.244.101 -P2883 -uroot@proxysys -p'*+SD{{JxsAH' -Doceanbase -A 

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

Trace ID: b7f07e9e-8383-11f0-a382-000c294205fa
If you want to view detailed obd logs, please run: obd display-trace b7f07e9e-8383-11f0-a382-000c294205fa

停止集群

[root@cjc-db-01 ~]# obd cluster stop cjc
Get local repositories ok
Get local repositories and plugins ok
Open ssh connection ok
Stop ob-configserver ok
Stop observer ok
Stop obshell ok
Stop obproxy-ce ok
Stop obagent ok
Stop prometheus ok
Stop grafana ok
cjc stopped
Trace ID: d323895e-8383-11f0-8a2d-000c294205fa
If you want to view detailed obd logs, please run: obd display-trace d323895e-8383-11f0-8a2d-000c294205fa

参考:

https://open.oceanbase.com/blog/13144212262

欢迎关注我的公众号《IT小Chen

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值