This topic provides a detailed introduction to two deployment options for OceanBase Database, tailored to different usage scenarios: one for quickly getting started with OceanBase Database and the other for deploying it in a production environment.

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.

  • OCP Express

    OCP Express is a web-based management tool for OceanBase Database V4.x. It is integrated with OceanBase clusters and allows you to view key performance metrics of the clusters and perform basic database management operations on the clusters. For more information, see OCP Express.

  • 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 3.10.0 or later)
  • Alibaba Cloud Linux 2/3 (Linux kernel 3.10.0 or later)
  • Red Hat Enterprise Linux Server 7.X and 8.X (Linux kernel V3.10.0 or later)
  • CentOS Linux 7.X and 8.X (Linux kernel V3.10.0 or later)
  • Debian 9.X or later (Linux kernel V3.10.0 or later)
  • Ubuntu 20.X or later (Linux kernel 3.10.0 or later)
  • SUSE/OpenSUSE 15.X or later (Linux kernel 3.10.0 or later)
  • openEuler 22.03 and 24.03 (Linux kernel 5.10.0 or later)
  • KylinOS V10
  • Unity Operating System (UOS) 1020a/1021a/1021e/1001c
  • 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.
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.

Solution 1: Quickly get started with OceanBase Database

Note

This solution is not suitable for production environments. If you want to deploy OceanBase Database in a production environment, follow the steps in Solution 2: Deploy OceanBase Database in a production environment.

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. Here are four methods you can use to quickly get started with OceanBase Database.

Method 1: Use the all-in-one package

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 demo

The above commands will download the latest version of the OceanBase All-in-One package online and deploy OceanBase Database using the current account. You can later manage OceanBase Database using the obd command. For steps on offline installation of the OceanBase All-in-One package and more details about the obd demo command, please refer to the official documentation: Install and configure obd and Quick deployment commands.

Method 2: Use the RPM package

Note

The following operating systems are supported when installing OceanBase Database using this method:

  • Anolis OS 8.X (Linux kernel 3.10.0 or later)
  • CentOS Linux 7.X and 8.X (Linux kernel 3.10.0 or later)
  • Debian 10, 11, and 12 (Linux kernel 3.10.0 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 3.10.0 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.

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.

sudo docker run -p 2881:2881 --name obstandalone -e MODE=MINI -e OB_TENANT_PASSWORD=****** -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.

Method 4: Install the desktop version of OceanBase Database

OceanBase Desktop is a desktop application for managing and operating OceanBase Database. It provides a graphical interface that allows users to conveniently perform database management, query execution, and data import/export operations.

Note

  • OceanBase Desktop can only be installed on Windows (x86-64 architecture) and macOS operating systems.

  • Before installing OceanBase Desktop, you must install the required dependencies: WSL on Windows or OrbStack on macOS. You can search for installation methods on your own or refer to our documentation Install OceanBase Desktop for guidance.

  1. Obtain the installation package.

    Visit OceanBase Download Center, search for OceanBase Desktop, and download the required installation package based on the operating system of your machine.

  2. Install the application and start OceanBase Desktop.

    After installation, an OceanBase database in the stop state will be automatically deployed. You can click start on the graphical interface to start the OceanBase database.

  3. Connect to OceanBase Desktop.

    Execute the following command in the command line to connect to the started OceanBase Desktop.

    • Windows operating system

      wsl.exe -d oceanbase-desktop --exec obclient -h127.0.0.1 -P2881 -uroot@test -Doceanbase -A
      
    • macOS operating system

      mysql -h127.0.0.1 -P2881 -uroot@test -Doceanbase -A
      

Solution 2: Deploy OceanBase Database in a production environment

You can choose either of the following methods to deploy OceanBase Database in a production environment.

Method 1: Deploy OceanBase Database using OceanBase All-in-One

This solution is ideal for users who want to explore the distributed architecture and advanced features of OceanBase Database. The OceanBase cluster deployed using this method provides the full capabilities of OceanBase Database, including support for distributed high availability. To set up this deployment, you will need at least three servers, each with a minimum of four CPU cores, 16 GB of memory, and 100 GB of SSD storage or a higher-performance disk.

  • (Recommended) Manage the OceanBase cluster using a GUI

    If you plan to deploy multiple OceanBase clusters, we recommend that you deploy OceanBase Cloud Platform (OCP). OCP can help you effectively operate and manage OceanBase Database, significantly reducing the O&M workload.

    You must first deploy OCP and MetaDB on three servers. For more information, see Deploy OCP through the GUI. After OCP is deployed, you can create an OceanBase cluster to serve your business through OCP. For more information, see Cluster management.

    Notice

    MetaDB is used only as the metadata database for OCP. Do not use it for your business cluster.

  • Manage the OceanBase cluster using the CLI

    If you plan to deploy only one OceanBase cluster, you can use obd to deploy OceanBase Database and then use obd commands to manage the OceanBase cluster. For more information about how to deploy OceanBase Database using obd, see Deploy an OceanBase cluster by using the GUI of obd. For more information about obd commands, see Cluster commands.

Method 2: Deploy OceanBase Database in a Kubernetes environment

This method is suitable for users who have extensive experience in using Kubernetes in production environments and have a basic understanding of OceanBase Database. The OceanBase cluster deployed in this way has the complete capabilities of OceanBase Database and supports distributed high availability. Before you start, make sure that you have met the following requirements:

  • You have a Kubernetes cluster available with at least nine CPU cores, 33 GB of memory, and 360 GB of storage space.
  • ob-operator depends on cert-manager. You have installed cert-manager. For more information about how to install cert-manager, see Installation.

For more information, see Deploy an OceanBase cluster in a Kubernetes environment.

contact us