OceanBase Database is a native distributed relational database. It is developed entirely by Ant Group. OceanBase Database is built on a common server cluster. Based on the Paxos protocol and its distributed structure, OceanBase Database provides high availability and linear scalability. OceanBase Database is not dependent on specific hardware architectures.
How to use this package
Installation
run bin/install.sh to install obd, obclient and prepare rpm packages
Deploy Oceanbase
run obd demo to quickly start a local oceanbase cluster
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_obd.sh install obd as root Found previous obd installed, try upgrade... Disable remote ok Trace ID: 5559efb6-179c-11f0-8f27-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 5559efb6-179c-11f0-8f27-02001701a72d name: ob-deploy version: 3.2.0 release:2.el7 arch: aarch64 md5: 14e6991e46602e93b9649711624ae574a98cb4af size: 107194377 add /home/opc/oceanbase-standalone-all-in-one/rpms/ob-deploy-3.2.0-2.el7.aarch64.rpm to local mirror Trace ID: 55fbe53c-179c-11f0-86fa-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 55fbe53c-179c-11f0-86fa-02001701a72d Found a higher version package for OBD name: ob-deploy version: 3.2.0 release:2.el7 arch: aarch64 md5: 14e6991e46602e93b9649711624ae574a98cb4af size: 107194377 Upgrade successful. Current version : 3.2.0 Trace ID: 569801b0-179c-11f0-8b29-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 569801b0-179c-11f0-8b29-02001701a72d upgrade finished name: grafana version: 7.5.17 release:1 arch: aarch64 md5: 5129b0134e31d273c970a7e3c7370990016bee16 size: 171613256 add /home/opc/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 /home/opc/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 /home/opc/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 /home/opc/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 /home/opc/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 /home/opc/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 /home/opc/oceanbase-standalone-all-in-one/rpms/prometheus-2.37.1-10000102022110211.el7.aarch64.rpm to local mirror Trace ID: 877008fa-179c-11f0-8aa2-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 877008fa-179c-11f0-8aa2-02001701a72d Disable remote ok Trace ID: 89c04048-179c-11f0-a733-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 89c04048-179c-11f0-a733-02001701a72d
add auto setenv logic to profile: /root/.bash_profile
Execute this command to apply the environment config:`source ~/.oceanbase-all-in-one/bin/env.sh ` [opc@ydora01 oceanbase-standalone-all-in-one]$ source ~/.oceanbase-all-in-one/bin/env.sh -bash: /home/opc/.oceanbase-all-in-one/bin/env.sh: No such file or directory
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh Enter the IP (Default: 10.0.0.241) (only support local IP): Valid local IP: 10.0.0.241 Enter the current user password : Trace ID: b1136796-1856-11f0-b88c-02001701a72d If you want to view detailed obd logs, please run: obd display-trace b1136796-1856-11f0-b88c-02001701a72d get system config ok +----------------------------------------------------------------+ | System Parameter Change List | +------------+--------------------+---------------+--------------+ | ip | need_change_var | current_value | target_value | +------------+--------------------+---------------+--------------+ | 10.0.0.241 | vm.max_map_count | 65530 | 655360 | | 10.0.0.241 | vm.min_free_kbytes | 13320 | 2097152 | | 10.0.0.241 | nofile | 1024 | 655350 | +------------+--------------------+---------------+--------------+ Trace ID: b1ed316a-1856-11f0-95b0-02001701a72d If you want to view detailed obd logs, please run: obd display-trace b1ed316a-1856-11f0-95b0-02001701a72d Do you want to modify the parameters above? (y/n) (Default: y)y get system config ok 10.0.0.241: ( vm.max_map_count,vm.min_free_kbytes,nofile ) have been successfully modified! Trace ID: b585221a-1856-11f0-a307-02001701a72d If you want to view detailed obd logs, please run: obd display-trace b585221a-1856-11f0-a307-02001701a72d Do you want to quit the script and manually restart the machine to apply the optimizations? (y/n) (Default: n)
Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob 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: A4ZcO0MSYkodAwLwOTrm): Enter the OB cpu count (Default: 2): The cpu_count cannot be less than 8. It will be set to 8 automatically. Enter the OB memory limit (Configurable Range[6, 0], Default: 0, Unit: G): 6 The machine's minimum memory cannot be less than min_value (6G). Please try again. [opc@ydora01 oceanbase-standalone-all-in-one]$
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh Enter the IP (Default: 10.0.0.241) (only support local IP): Valid local IP: 10.0.0.241 Enter the current user password : Trace ID: d485f71e-1858-11f0-a715-02001701a72d If you want to view detailed obd logs, please run: obd display-trace d485f71e-1858-11f0-a715-02001701a72d get system config ok No need to change system parameters Trace ID: d555a2f2-1858-11f0-8b25-02001701a72d If you want to view detailed obd logs, please run: obd display-trace d555a2f2-1858-11f0-8b25-02001701a72d
Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob 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: ovMW5y6s1R3YQavcnjlj): Enter the OB cpu count (Default: 2): The cpu_count cannot be less than 8. It will be set to 8 automatically. Enter the OB memory limit (Configurable Range[6, 3], Default: 3, Unit: G): 7 The machine's minimum memory cannot be less than min_value (6G). Please try again. [opc@ydora01 oceanbase-standalone-all-in-one]$
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh Enter the IP (Default: 10.0.0.241) (only support local IP): Valid local IP: 10.0.0.241 Enter the current user password : Trace ID: e3b3aaee-185b-11f0-9e91-02001701a72d If you want to view detailed obd logs, please run: obd display-trace e3b3aaee-185b-11f0-9e91-02001701a72d get system config ok No need to change system parameters Trace ID: e46e0df8-185b-11f0-921b-02001701a72d If you want to view detailed obd logs, please run: obd display-trace e46e0df8-185b-11f0-921b-02001701a72d
Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob 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: olW7ZqLwtkQr6C83FnSl): Enter the OB cpu count (Default: 2): 8 Enter the OB memory limit (Configurable Range[6, 6], Default: 6, Unit: G): Enter the OB installation directory (Default: /root/liups_ob): Enter the OB data directory (Default: /data/1/liups_ob): Enter the OB log directory (Default: /data/log1/liups_ob): The data_dir and redo_dir are using the same disk. The available disk space is not enough. Please try again. [opc@ydora01 ~]$ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 5.3G 0 5.3G 0% /dev tmpfs 5.4G 0 5.4G 0% /dev/shm tmpfs 5.4G 9.4M 5.4G 1% /run tmpfs 5.4G 0 5.4G 0% /sys/fs/cgroup /dev/mapper/ocivolume-root 87G 47G 41G 54% / /dev/sda2 924M 699M 226M 76% /boot /dev/mapper/ocivolume-oled 10G 4.9G 5.1G 50% /var/oled /dev/sda1 100M 7.2M 93M 8% /boot/efi tmpfs 1.1G 4.0K 1.1G 1% /run/user/987 tmpfs 1.1G 4.0K 1.1G 1% /run/user/1000
[opc@ydora01 ~]$ free -h total used free shared buff/cache available Mem: 10Gi 504Mi 9.7Gi 12Mi 465Mi 6.9Gi Swap: 4.0Gi 0B 4.0Gi [opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh Enter the IP (Default: 10.0.0.241) (only support local IP): Valid local IP: 10.0.0.241 Enter the current user password : Trace ID: 9e7ab1a0-185d-11f0-89fd-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 9e7ab1a0-185d-11f0-89fd-02001701a72d get system config ok No need to change system parameters Trace ID: 9f3577a6-185d-11f0-8ba4-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 9f3577a6-185d-11f0-8ba4-02001701a72d
Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_ob 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: DKkOiudzFfcXDd3f41N4): Enter the OB cpu count (Default: 2): The cpu_count cannot be less than 8. It will be set to 8 automatically. Enter the OB memory limit (Configurable Range[6, 6], Default: 6, Unit: G): Enter the OB installation directory (Default: /root/liups_ob): Enter the OB data directory (Default: /data/1/liups_ob): Enter the OB log directory (Default: /data/log1/liups_ob): The data_dir and redo_dir are using the same disk. Enter the OB datafile maxsize (Configurable Range[12, 13], Default: 13, Unit: G): Enter the OB log disk size (Configurable Range[12, 16], Default: 16, Unit: G): Do you want to create tenant for your business workload? (y/n)(Default: y): Tenant: sys conifguration: 2C/1G/2G(CPU/Memory/Log disk) system_memory configuration(Unit: G): 1 Enter the tenant name (Default: test; allowed characters: letters, numbers, and underscores): ob_ten 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, 4], Default: 4, Unit: G): Enter the tenant log disk size(Configurable Range[12, 13], Default: 13, 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: liups_ob mysql port: 2881 rpc port: 2882 obshell port: 2886 cpu count: 8 memory limit: 6G home path: /root/liups_ob data dir: /data/1/liups_ob logdir: /data/log1/liups_ob datafile maxsize: 13G log disk size: 16G tenant name: ob_ten tenant cpu: 6 tenant memory: 4G tenant log disk size: 13G 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... Package oceanbase-standalone-4.2.5.3-103000152025033110.el7 is available. Package obagent-4.2.2-100000042024011120.el7 is available. Package prometheus-2.37.1-10000102022110211.el7 is available. Package grafana-7.5.17-1 is available. install oceanbase-standalone-4.2.5.3 forlocal ok install obagent-4.2.2 forlocal ok install prometheus-2.37.1 forlocal ok install grafana-7.5.17 forlocal ok 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 liups_ob deployed Get local repositories ok Load cluster param plugin ok Open ssh connection ok [WARN] OBD-1007: (10.0.0.241) The recommended number of core file size is unlimited (Current value: 0) [WARN] OBD-1007: (10.0.0.241) The recommended number of stack size is unlimited (Current value: 8192) [WARN] OBD-1012: (10.0.0.241) clog and data use the same disk (/) 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 observer program health check ok Connect to observer 10.0.0.241:2881 ok Cluster bootstrap ok obshell taking over ok obshell start ok obshell program health check ok obshell bootstrap ok Start obagent ok obagent program health check ok obagent program health check x [ERROR] obagent-py_script_health_check-1.3.0 RuntimeError: 'NoneType' object is not subscriptable [WARN] obagent-py_script_health_check-1.3.0 has animation not been closed
See https://www.oceanbase.com/product/ob-deployer/error-codes . Trace ID: ff826042-185d-11f0-a288-02001701a72d If you want to view detailed obd logs, please run: obd display-trace ff826042-185d-11f0-a288-02001701a72d start cluster failed
这里报 :[ERROR] obagent-py_script_health_check-1.3.0 RuntimeError: ‘NoneType’ object is not subscriptable
[opc@ydora01 oceanbase-standalone-all-in-one]$ sudo bash bin/install_ob.sh Enter the IP (Default: 10.0.0.241) (only support local IP): Valid local IP: 10.0.0.241 Enter the current user password : Trace ID: b68ba656-1861-11f0-8cd7-02001701a72d If you want to view detailed obd logs, please run: obd display-trace b68ba656-1861-11f0-8cd7-02001701a72d get system config ok No need to change system parameters Trace ID: b747c534-1861-11f0-a131-02001701a72d If you want to view detailed obd logs, please run: obd display-trace b747c534-1861-11f0-a131-02001701a72d
Enter the cluster name (Default: standalone; allowed characters: letters, numbers, and underscores): liups_obc 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: whij1v6CMJdMEkpcxVPU): Enter the OB cpu count (Default: 2): The cpu_count cannot be less than 8. It will be set to 8 automatically. Enter the OB memory limit (Configurable Range[6, 6], Default: 6, Unit: G): Enter the OB installation directory (Default: /root/liups_obc): Enter the OB data directory (Default: /data/1/liups_obc): Enter the OB log directory (Default: /data/log1/liups_obc): The data_dir and redo_dir are using the same disk. Enter the OB datafile maxsize (Configurable Range[12, 12], Default: 12, Unit: G): Enter the OB log disk size (Configurable Range[12, 16], Default: 16, Unit: G): Do you want to create tenant for your business workload? (y/n)(Default: y): Tenant: sys conifguration: 2C/1G/2G(CPU/Memory/Log disk) system_memory configuration(Unit: G): 1 Enter the tenant name (Default: test; allowed characters: letters, numbers, and underscores): liups_tent 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): 2 Enter the tenant memory (Configurable Range[1, 4], Default: 4, Unit: G): 2 Enter the tenant log disk size(Configurable Range[6, 13], Default: 6, 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): n Monitoring Component will not be installed.
#Saved configurations: cluster name: liups_obc mysql port: 2881 rpc port: 2882 obshell port: 2886 cpu count: 8 memory limit: 6G home path: /root/liups_obc data dir: /data/1/liups_obc log dir: /data/log1/liups_obc datafile maxsize: 12G log disk size: 16G tenant name: liups_tent tenant cpu: 2 tenant memory: 2G tenant log disk size: 6G
Are you sure these configurations are correct? (y/n) (Default: y): Configuration confirmed.
start cluster... Cluster param config check ok Open ssh connection ok +----------------------------------------------------------------------------------------------------+ | Packages | +----------------------+---------+------------------------+------------------------------------------+ | Repository | Version | Release | Md5 | +----------------------+---------+------------------------+------------------------------------------+ | oceanbase-standalone | 4.2.5.3 | 103000152025033110.el7 | eb63676185e5a8a982ae23f7d94d312d2bb52e4b | +----------------------+---------+------------------------+------------------------------------------+ Repository integrity check ok Load param plugin ok Open ssh connection ok Initializes observer 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 liups_obc deployed Get local repositories ok Load cluster param plugin ok Open ssh connection ok [WARN] OBD-1007: (10.0.0.241) The recommended number of core file size is unlimited (Current value: 0) [WARN] OBD-1007: (10.0.0.241) The recommended number of stack size is unlimited (Current value: 8192) [WARN] OBD-1012: (10.0.0.241) clog and data use the same disk (/) cluster scenario: None Start observer ok observer program health check ok observer program health check ok Connect to observer 10.0.0.241:2881 ok Cluster bootstrap ok obshell taking over ok obshell start ok obshell program health check ok obshell bootstrap ok Connect to observer 10.0.0.241:2881 ok Wait for observer init ok +----------------------------------------------+ | oceanbase-standalone | +------------+---------+------+-------+--------+ | ip | version | port | zone | status | +------------+---------+------+-------+--------+ | 10.0.0.241 | 4.2.5.3 | 2881 | zone1 | ACTIVE | +------------+---------+------+-------+--------+ obclient -h10.0.0.241 -P2881 -uroot@sys -p'whij1v6CMJdMEkpcxVPU' -Doceanbase -A
liups_obc running Trace ID: e631ade2-1861-11f0-9465-02001701a72d If you want to view detailed obd logs, please run: obd display-trace e631ade2-1861-11f0-9465-02001701a72d
create tenant... Get local repositories ok Open ssh connection ok Connect to observer 10.0.0.241:2881 ok Create tenant liups_tent ok [ERROR] oceanbase-standalone-py_script_create_tenant-4.2.0.0 RuntimeError: 'NoneType' object has no attribute 'ip' See https://www.oceanbase.com/product/ob-deployer/error-codes . Trace ID: 27318f24-1862-11f0-a3aa-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 27318f24-1862-11f0-a3aa-02001701a72d create tenant failed [opc@ydora01 oceanbase-standalone-all-in-one]$ obd cluster list Local deploy is empty Trace ID: 6c6e90dc-1862-11f0-b1e6-02001701a72d If you want to view detailed obd logs, please run: obd display-trace 6c6e90dc-1862-11f0-b1e6-02001701a72d [opc@ydora01 oceanbase-standalone-all-in-one]$ lsof -i:2882 [opc@ydora01 oceanbase-standalone-all-in-one]$ lsof -i:2881 [opc@ydora01 oceanbase-standalone-all-in-one]$