This topic describes how to deploy OceanBase Database on the GUI of OCP by using an x86-based CentOS Linux 7.9 image as the environment.
Prerequisites
You have deployed OCP. For detailed operations, see Deploy the OceanBase Cloud Platform Community Edition.
The current user logged in to OCP has the ADMIN or ORG_ADMIN role.
You have uploaded the required software packages, including oceanbase-ce, oceanbase-ce-libs, and oceanbase-ce-utils, to OCP. For detailed operations, see the Manage software packages/Upload a package topic in the official OceanBase Cloud documentation.
(Optional) If you are creating a multi-replica OceanBase cluster, ensure there is an available ODP cluster in the current OCP. To add an ODP cluster, refer to the Manage OBProxy clusters/Create an OBProxy cluster topic in the official OceanBase Cloud documentation.
Procedure
Note
This procedure uses OCP V4.3.4 Community Edition as an example. The operation interface may vary depending on the OCP version. Please refer to the actual interface for your version.
Step 1: Add a server to an OCP resource pool
Before deploying an OceanBase cluster, you must add the server to an OCP resource pool by following the instructions in this section.
Log in to OCP.
In the left navigation bar, click Host to go to the Host page.
On the Host page, click Add Host in the upper-right corner.
In the dialog box that appears, enter the server information.

The following table describes each field.
FieldDescriptionIP Address The IP address of the server to be added. Enter the IPv4 address of the new host. You can add multiple IP addresses (separated by commas). SSH port Default is 22.Host Type A tag assigned to hosts with the same configuration, helping OCP manage them better. If no model exists, click Add Host Type in the drop-down menu to add a new one. IDC Select the data center where the server is located. If no data center exists, click Add IDC in the drop-down menu to add a new data center in OCP. Data center information includes IDC and Region. - Data center is a host attribute required to be recorded for OceanBase clusters. This attribute serves as a reference for load balancing and SQL statement routing strategies in OceanBase clusters. Please fill it in according to the actual situation.
- Region indicates the geographical area where the host is located. It is one of the host attributes that need to be recorded for OceanBase clusters and has a certain impact on the load balancing and SQL statement routing strategies of OceanBase clusters. Please fill it in according to the actual situation.
Note
Starting from OCP V3.1.1, multi-zone mode is supported. When creating a new data center, it will be created in the zone where the current OCP is located.
Host Type There are three options: Physical Machine, Container, and ECS. When selecting the Container type, you need to fill in Port Mapping, which specifies two sets of mapping relationships: ocp-agent to the host and ocp-export to the host. The corresponding format is <host port>:<ocp-agent port in docker>,<host port>:<ocp-exporter port 1 in docker>.Credentials Select the credentials used for remote login to the physical server. You can click Add Credential in the drop-down menu to create new credentials.
When adding new credentials, note the following:- Credential Name: Must start with a letter and end with a letter or number. Can contain letters, numbers, and underscores, with a length of 2 to 64 characters.
- Authorization Type: Includes Password Authentication, Public Key Authentication, and Password-free has been configured.
- User Type: Supports SSH users with root privileges. Ordinary users with root privileges must first configure passwordless execution for sudo commands. OCP currently only supports configuring passwordless execution for all commands via sudo, which means adding
username ALL=(ALL) NOPASSWD:ALLto the/etc/sudoersfile.
Host Alias (Optional) Optional. Sets an alternative name for the host. Description (Optional) A comment for the host, aiding in its better management. After completing the form, click OK.
Step 2: Create an OceanBase cluster
You can refer to this section to learn how to create an OceanBase cluster in OCP.
On the OCP console, locate the entry for creating a new cluster based on your actual business scenario.
If you have no manageable clusters, the system will prompt you to create a new cluster on the Clusters page. You can directly click Create Cluster in the prompt.
If you already have manageable clusters, you can first click Cluster on the left, then on the Cluster page, click Create Cluster in the upper-right corner.
Note
OCP creates a distributed cluster by default. You can select the deployment cluster mode (Distributed Cluster or Standby Centralized) in the upper-right corner of the Create Cluster page. This example describes creating a Distributed Cluster.
On the Create Cluster page, configure the basic information for the cluster.

The basic information is described in the following table.
ConfigurationDescriptionCluster Type Select Primary Cluster. Applicability
OCP Community Edition only supports creating primary clusters.
Cluster Name Customize the name of the cluster to be managed. The cluster name must start with a letter and end with a letter or number, can contain letters, numbers, and underscores, and be 2 to 32 characters long. Root@sys Password Supports customization or random generation. The password must meet the following complexity requirements:
- Length: 8 to 32 characters
- Contains at least three of the following four types of characters: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), special symbols
~!@#%^&*_-+=|(){}[]:;,.?/
OceanBase version You can select an existing OceanBase database version from the list, or click Upload Software Package in the drop-down menu to upload an OceanBase database RPM package. Associate OBProxy Cluster This option is used to associate an existing ODP cluster. If you are creating a multi-replica OceanBase cluster, it is recommended that you enable the Associate OBProxy Cluster switch to associate an ODP cluster with this OceanBase cluster. After association, SQL requests related to your business will be accurately forwarded to the corresponding replicas, providing access to OceanBase Database with performance comparable to accessing a standalone database. - The
proxyro@sysuser is used by default for association; you do not need to enter a username and password. - Select the ODP cluster to associate from the drop-down list. If no ODP cluster is available in the drop-down list, please add an ODP cluster by referring to the link in the Prerequisites section of this article.
Notice
- You can only select an OBProxy cluster that has the same network as the OceanBase cluster and is not empty.
When the selected cluster in OceanBase Version is V4.0 or later, only OBProxy clusters of version V4.0.0 or later are supported for association.
Load Type Select the corresponding load type from the drop-down list. OCP will configure different settings for the OceanBase cluster based on the load type. The specific descriptions for the load types are as follows: - Express OLTP: Suitable for workloads such as trading, core payment systems, and high-throughput internet applications. No foreign keys or other restrictions, no stored procedures, no long or large transactions, no complex joins, no complex subqueries.
Version requirement: OceanBase Database V4.2.5 or later. - HTAP: Suitable for mixed OLAP and OLTP workloads. Typically used to gain instant insights from active operational data, fraud detection, and personalized recommendations.
Version requirement: OceanBase Database V4.2.5 or later. - OLAP: Used for real-time data warehouse analytics scenarios.
Version requirement: OceanBase Database V4.3.0 or later. - Complex OLTP: Suitable for workloads such as banking and insurance systems. These typically involve complex joins, complex correlated subqueries, batch processing jobs written in PL, and long and large transactions. Sometimes uses parallel execution for short-running queries.
Version requirement: OceanBase Database V4.2.5 or later. - OBKV: Used for key-value workloads and HBase-like wide-column workloads. These workloads usually have very high throughput and are latency-sensitive.
Version requirement: OceanBase Database V4.2.5 or later.
Configure the deployment mode information for the cluster.
By default, information for 3 zones is added. If you want to deploy more than 3 zones for the cluster, you can click the + Add Zone button below to add zone information. If you want to deploy fewer than 3 zones for the cluster, you can click the delete icon next to a zone.

The information required for each zone and its description are shown in the following table.
ConfigurationDescriptionZone Name Typically has a default name, which you can customize as needed. The zone name must start with a letter and end with a letter or number, can contain letters, numbers, and underscores, and be 2 to 32 characters long. In an OceanBase cluster with multiple zones, one zone must have the same region as the primary zone. IDC The data center where the zone is located. A zone can exist only in one data center. Host Type (Optional) If you select a host type, the host list will be filtered accordingly. CPU Architecture When multiple installation packages of different architectures are available for the selected OceanBase version, you need to choose a hardware architecture for the host that matches this software package. Notice
The default architecture type is that of the first installation package, which can be switched. After switching to a specified architecture, hosts of that architecture will be displayed in the Hosts list.
When setting different architectures for different zones, a mixed-architecture deployment mode may result in stability and performance issues. Proceed with caution.
Host You can select multiple hosts or add new hosts. Root Service Location You need to select an IP address for the server hosting the Root Service. In an OceanBase cluster with multiple replicas, each zone must have a designated Root Service. Zone Priority Rankings Specifies the priority for distributing the primary replicas of the cluster's sys tenant. The zone with the highest priority is considered the Primary Zone and can have only one. If not specified, the first zone is defaultly set as the first priority. The sorting method is as follows: - Select one or more zones from the left-side list box. This list shows all available zones in the current cluster.
- Click the > button in the middle. The selected zones will then be moved to the Priority Sort list. Multiple selected zones have the same priority.
- Repeat steps 1 and 2 to add zones with lower priorities.
- To adjust priorities, drag zones within the Priority Sort list. The priority decreases sequentially from top to bottom in the list.
Choose whether to enable Cgroup for the cluster.
Cgroup is primarily used for CPU resource isolation between tenants and within tenants in an OceanBase cluster. When you create an OceanBase cluster of version V4.0 or later, Cgroup is enabled by default to achieve stronger CPU/IOPS isolation. Enabling Cgroup results in a performance drop of about 7%. If your business scenario involves single-tenant, small-specification (<14C) environments and requires higher database performance, it is recommended to disable Cgroup. Additionally, if the host's operating system kernel version is lower than 4.1.9, the cluster cannot create a tenant. In this case, Cgroup is disabled by default and the Cgroup switch is not displayed.
Configure CPU overprovisioning.
You can turn on the CPU Overallocation Settings switch to configure the CPU overprovisioning ratio. The default value is 120%. You can configure the overprovisioning percentage using the slider or the input field, with a valid range of 101% to 200%.
The workloads of different tenants in the system can be controlled to run in an interleaved manner. Configuring CPU overprovisioning when allocating CPU resources can improve resource utilization. If workloads from different business scenarios overlap, the OceanBase cluster may experience overload during runtime, leading to thread competition for CPU among different tenants and consequently slowing down the actual business scenarios.
Open the Parameter Settings module and configure cluster parameters.

If you have configured a workload type in Basic Settings, the system will default to selecting the parameter template corresponding to that workload type.
You can add startup parameter items one by one and configure values for them as shown in position ① in the figure. For more information about OceanBase Database parameters, see Parameter overview.
You can also click Select Parameter Template as shown in position ② in the figure to choose a parameter template. The system will automatically fill in the parameters and configurations from the template here. You can also click Create Cluster Parameter Template to create a parameter template for the cluster. For details, see the Manage cluster parameter templates topic in the official OceanBase Cloud documentation.
The OCP system provides the following six built-in templates, which contain common parameter settings. You can directly apply these templates for initial cluster configuration. The specific descriptions are as follows:
TemplateDescriptionCOMPLEX_OLTP Default Parameter Template Corresponds to the Complex OLTP workload type. This template is applicable only to OceanBase Database V4.2.5 and later. HTAP Default Parameter Template Corresponds to the HTAP workload type. This template is applicable only to OceanBase Database V4.2.5 and later. KV Default Parameter Template Corresponds to the OBKV workload type. This template is applicable only to OceanBase Database V4.2.5 and later. EXPRESS_OLAP Default Parameter Template Corresponds to the Express OLAP workload type. This template is applicable only to OceanBase Database V4.2.5 and later. OLAP Default Parameter Template Corresponds to the OLAP workload type. This template is applicable only to OceanBase Database V4.3.0 and later. 2.2.77 Default Parameter Template Recommended parameter settings for OceanBase cluster V2.2.77, intended for production environments. Open Custom Configuration to perform cluster-level user configurations (such as the operating system owner user), path settings (such as software installation paths, data disk paths, log disk paths), and port settings (such as SQL ports, RPC ports).
Configure the operating system owner user:
This user is configured for installing and running OBServer and cannot be edited. You can modify this user by adjusting the default configuration of the
ocp.operation.default.os.userparameter. This parameter modification only takes effect when creating distributed clusters, OBProxy clusters, and arbitration services, and does not affect other configurations of existing clusters.Configure paths:
ConfigurationDescriptionSoftware Installation Path - When the primary user of the operating system is admin, the default software installation path is
/home/admin/oceanbase. A custom path is supported. - When the primary user of the operating system is not admin, the default software installation path is
/opt/oceanbase/oceanbase. A custom path is supported.
Data Disk Path Default is /data/1. A custom path is supported. Log Disk Path Default is /data/log1. A custom path is supported. In a production environment, it is recommended that the log disk space be at least three times the host's memory size. Additionally, to avoid performance issues, it is not recommended to mount the data directory and log directory on the same disk. Note
Starting from OCP V4.3.0 BP1, when creating an OceanBase cluster of the following versions, the slog directory will be placed on the log disk and will no longer be bound to the data disk. If
log_disk_size=0is configured in this case, it will be interpreted as exclusive for clogs, meaning the defaultlog_disk_percentageis 90%. If the disk size for slog and clogs is less than 40 GiB, the reserved space for slog will be insufficient, which may affect slog writing.- V4.2.4.0 ≤ OceanBase Database version < V4.3.0.0
- OceanBase Database version ≥ V4.3.1.0
After configuration, click Test to verify if the path is available. If not, you can troubleshoot based on the test results or modify the path to another available one.
- When the primary user of the operating system is admin, the default software installation path is
Configure ports:
ParameterDescriptionSQL Port The default is 2881. Custom ports are supported. RPC Port The default is 2882. Custom ports are supported. After configuration, click Test to check if the port is occupied. If it is occupied, you need to configure an available port.

After completing the test, click Submit.
In the Confirm Information dialog box, verify the information and click OK.
Note
You can click Task Center in the upper-right corner of the page to view the execution progress of this task.
References
After the cluster is deployed, you need to create a business tenant. For more information, see Manage tenants/Create primary tenant in the OceanBase Cloud documentation.
