This topic describes how to quickly deploy OceanBase Database based on your use case, helping you get started with OceanBase Database.
Note
This topic is not suitable for production environments.
Currently, OceanBase Database Community Edition has not released the V4.6.0 version. If you need to deploy a trial or test environment, you can use the V4.5.0 series of OceanBase Database Community Edition.
Components
obd
OceanBase Deployer is a tool for installing and deploying OceanBase Database. It is abbreviated as obd.
ODP
OceanBase Database Proxy is a proxy server for OceanBase Database. It is abbreviated as ODP (also known as OBProxy).
OBAgent
OBAgent is a monitoring and data collection framework for OceanBase Database. It supports both push and pull data collection modes to meet different application scenarios.
Grafana
Grafana is an open-source data visualization tool that can visualize various metrics from data sources to provide a more intuitive understanding of system operation status and performance metrics. For more information, see Grafana.
Prometheus
Prometheus is an open-source service monitoring system and time-series database. It provides a general data model and quick data collection, storage, and query interfaces. For more information, see Prometheus.
Prerequisites
Before you install OceanBase Database, ensure that your software and hardware environment meet the following requirements:
| Item | Description |
|---|---|
| System |
|
| CPU | Minimum 2 cores, recommended 4 cores or more. |
| Memory | Minimum 6 GB, recommended 16 GB to 1024 GB. |
| Disk type | Use SSD storage. |
| Disk space | Minimum 20 GB. |
| File system | EXT4 or XFS. Use XFS when the data exceeds 16 TB. |
| Ports | Ensure that the default ports of the components are not occupied:
|
| All-in-one installation package | The all-in-one installation package must be V4.1.0 or later. |
| Docker | If you use Docker to deploy OceanBase Database, install and start the Docker service. For more information, see Docker documentation.
NoteWhen you use a x86 architecture Mac, you can deploy OceanBase Database only by using Docker V4.9.0 or earlier. Click here to download Docker. |
Quick start with OceanBase Database
This method is suitable for users who want to quickly set up a working OceanBase Database environment on a single machine. The deployed OceanBase Database environment supports basic database features, which can help you understand OceanBase Database. However, this environment does not support distributed capabilities or high availability, so it is not recommended for long-term use.
You can use the following methods to quickly experience OceanBase Database.
Method 1: Use the All in One installation package
Run the following command to download and install the latest version of OceanBase All in One 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 OceanBase Database with the minimum specifications and related components.
obd demoMaximum specification deployment
Deploys and starts OceanBase Database with the maximum specifications and related components.
obd perfNote
obd provides the
obd prefcommand for maximum specification deployment since V3.4.0, and updates it toobd perfsince V4.0.0.
The above commands are for quick experience. They will directly deploy OceanBase Database, ODP, and monitoring components (OBAgent, Grafana, and Prometheus) using the current account. You can manage OceanBase Database and components using obd commands.
After the obd demo/obd perf command is executed successfully, the connection method of the deployed components is output. You can copy and execute the connection string of the oceanbase-ce component to log in to the sys tenant of the cluster as the root user. After logging in to the cluster, you can execute SQL statements to experience basic features.
Method 2: Use the RPM package
Note
- This method relies on the systemctl command. Therefore, you must perform the operations in a non-container environment.
When you install OceanBase Database by using this method, only the following operating systems are supported:
- 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 above commands are for quick experience. They will download the latest RPM package online and directly install it using the root account. You can manage OceanBase Database using the systemctl command.
After the command is executed successfully, the connection method of OceanBase Database is output. 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 to the cluster, you can execute SQL statements to experience basic features.
Method 3: Use Docker
This method is suitable for users who want to deploy and manage OceanBase Database in containers on non-Linux operating systems, such as Windows and macOS. This method has not been validated at scale, so it is recommended to use it with caution.
Note
On x86-based Mac machines, only Docker V4.9.0 and earlier are supported for deploying OceanBase Database. 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 above commands are for quick experience. They will download the latest image online and start OceanBase Database with the minimum specifications. You can manage OceanBase Database using docker commands.
After the deployment is successful, execute the following commands to log in to the sys tenant of the cluster as the root user. After logging in to the cluster, you can execute SQL statements to experience basic features.
# Enter the Docker container
sudo docker exec -it obstandalone bash
# Connect to the cluster. The password is empty by default.
obclient -uroot@sys -h127.0.0.1 -Doceanbase -P2881 -p
