This topic explains how to quickly deploy OceanBase Database according to different usage scenarios, helping you get started and successfully use OceanBase Database.

Note

This document is not intended for production environments. If you need to deploy OceanBase Database in a production environment, refer to the Deployment overview of OceanBase Database Community Edition for recommended deployment methods.

Components

  • obd

    OceanBase Deployer (obd) is a tool for installing and deploying OceanBase Database. For more information, see obd Documentation.

  • ODP

    OceanBase Database Proxy (ODP), also known as OBProxy, is a dedicated proxy server for OceanBase Database. For more information, see ODP Documentation.

  • OBAgent

    OBAgent is a framework for data monitoring and collection in OceanBase Database. It supports both pushing and pulling modes for data collection in different scenarios.

  • Grafana

    Grafana is an open-source data visualization tool that visualizes various metrics in data sources to help you understand the system running status and performance. For more information, visit the official website of Grafana.

  • Prometheus

    Prometheus is an open-source service monitoring system and time series database. It provides common data models and APIs for fast data collection, storage, and query. For more information, visit the official website of Prometheus.

Prerequisites

Before you install OceanBase Database, make sure that your software and hardware environments meet the following requirements:

Item Description
Operating system
  • Anolis OS 8.X (Linux kernel 4.19 or later)
  • Alibaba Cloud Linux 2/3 (Linux kernel 4.19 or later)
  • Red Hat Enterprise Linux Server 7.X and 8.X (Linux kernel 4.19 or later)
  • CentOS Linux 7.X and 8.X (Linux kernel 4.19 or later)
  • Rocky Linux 9 (Linux kernel 5.14)
  • Debian 9.X or later (Linux kernel 4.19 or later)
  • Ubuntu 16.X or later (Linux kernel 4.19 or later)
  • SUSE/OpenSUSE 15.X or later (Linux kernel 4.19 or later)
  • openEuler 22.03 and 24.03 (Linux kernel 5.10.0 or later)
  • KylinOS V10
  • Unity Operating System (UOS) V20
  • NFSChina V4.0 or later
  • Inspur KOS V5.8
CPU At least two cores or preferably four cores or more
Memory At least 6 GB or preferably 16 GB to 1024 GB
Disk type SSD
Disk space At least 20 GB
File system EXT4 or XFS. Choose XFS when the data volume exceeds 16 TB.
Ports Ensure that the default ports of components are not in use:
  • OceanBase Database uses ports 2881, 2882, and 2886 by default.
  • ODP uses ports 2883, 2884, and 2885 by default.
  • OBAgent uses ports 8088 and 8089 by default.
  • Prometheus uses port 9090 by default.
  • Grafana uses port 3000 by default.
All-in-one package V4.1.0 or later
Docker To deploy OceanBase Database in a Docker container, install and start Docker in advance. For more information, see Get Docker.

Note

On an x86-based Mac, you can deploy OceanBase Database only in a Docker container running Docker V4.9.0 or earlier. You can click here to download Docker.

Quickly experience OceanBase Database

This solution is ideal for situations where only a single server is available, allowing you to quickly set up a demo environment for OceanBase Database. The deployed environment offers basic database functionality, making it a great way to get familiar with OceanBase Database. However, it lacks distributed capabilities and high availability features, so it is not suitable for long-term use.

You can use the following methods to quickly experience OceanBase Database.

Method 1: Use the all-in-one package

Execute the following commands to download and install OceanBase All-in-One. The commands will download and install the latest version of the OceanBase All-in-One package online.

bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/oceanbase-all-in-one/installer.sh)"
source ~/.oceanbase-all-in-one/bin/env.sh

obd provides the following two quick deployment commands:

  • Minimum specification deployment

    Deploys and starts a single-node OceanBase Database and related components with minimum specifications.

    obd demo
    
  • Maximum specification deployment

    Deploys and starts a single-node OceanBase Database and related components with maximum specifications.

    obd perf
    

    Note

    Since V3.4.0, obd provides the maximum specification deployment command (obd pref). The command was updated to obd perf starting from V4.0.0.

The above commands will deploy OceanBase Database, ODP, and monitoring components (OBAgent, Grafana, Prometheus) using the current account. You can later manage OceanBase Database and components using the obd command. For steps on offline installation of the OceanBase All-in-One package and more details about the obd demo/obd perf commands, see the official obd documentation: Quick start/Install obd and obd commands/Quick deployment commands.

After the obd demo/obd perf commands succeed, the connection information of the deployed components will be displayed. You can copy and execute the connection string under the oceanbase-ce component to log in to the sys tenant of the cluster as the root user. After logging in, you can execute SQL statements for basic operations. For more information, see Basic SQL operations (MySQL-compatible mode).

Method 2: Use the RPM package

Note

  • This method depends on the systemctl command. Perform the operations in a non-container environment.
  • The following operating systems are supported when installing OceanBase Database using this method:

    • Anolis OS 8.X (Linux kernel 4.19 or later)
    • CentOS Linux 8.X (Linux kernel 4.19 or later)
    • Debian 10, 11, and 12 (Linux kernel 4.19 or later)
    • openEuler 22.03 and 24.03 (Linux kernel 5.10.0 or later)
    • Ubuntu 18.04, 20.04, and 22.04 (Linux kernel 4.19 or later)
sudo bash -c "$(curl -s https://obbusiness-private.oss-cn-shanghai.aliyuncs.com/download-center/opensource/service/installer.sh)"

The preceding command will download the latest version of RPM package online and install it using the root account. You can use the systemctl command to manage OceanBase Database after the installation. For more information about the configuration and the procedure for installing OceanBase Database offline, see Deploy OceanBase Database by using systemd.

After the command succeeds, the connection information of OceanBase Database will be displayed. You can copy and execute the connection string to log in to the sys tenant of the cluster as the root user. After logging in, you can execute SQL statements for basic operations. For more information, see Basic SQL operations (MySQL-compatible mode).

Method 3: Use Docker to get started with OceanBase Database

This solution is intended for users on non-Linux operating systems (such as Windows or macOS) who want to deploy and manage OceanBase Database using containers. However, as this approach has not been thoroughly tested at scale, it is recommended to proceed with caution.

Note

On an x86-based Mac machine, you can deploy OceanBase Database only in a Docker container running Docker V4.9.0 or earlier. You can click here to download Docker.

sudo docker run -p 2881:2881 --name obstandalone -e MODE=MINI -d quay.io/oceanbase/oceanbase-ce

The preceding command will download the latest image online and start OceanBase Database with minimum specifications. You can use docker commands to manage OceanBase Database after it starts. For more information about the configuration, see Deploy OceanBase Database in a container environment.

After deployment succeeds, execute the following commands to log in to the sys tenant of the cluster as the root user. After logging in, you can execute SQL statements for basic operations. For more information, see Basic SQL operations (MySQL-compatible mode).

# Enter the Docker container
sudo docker exec -it obstandalone bash
# Connect to the cluster. The default password is empty.
obclient -uroot@sys -h127.0.0.1 -Doceanbase -P2881 -p

References

Contact Us