This topic describes how to use OceanBase Deployer (obd) to deploy an OceanBase cluster in an x86-based CentOS Linux 7.9 system on the GUI.
Background information
obd V2.0.0 or later supports GUI-based deployment for OceanBase Database and related components such as OceanBase Agent (OBAgent), OceanBase Database Proxy (ODP), and OceanBase Cloud Platform (OCP) Express. You can easily deploy an OceanBase cluster by following the wizard.
Terms
OceanBase Database
OceanBase Database is an enterprise-level native distributed database independently developed by the OceanBase team. For more information, see OceanBase Database documentation.
ODP
ODP is a dedicated proxy service designed for OceanBase Database. For more information, see ODP documentation.
OCP Express
OCP Express is a web-based management tool for OceanBase Database V4.x. Integrated with an OceanBase cluster, OCP Express allows you to view key performance metrics of the cluster and perform basic database management operations on the cluster. For more information, see OCP Express documentation.
OBAgent
OBAgent is a framework for data monitoring and collection in OceanBase Database. The framework supports both pushing and pulling modes for data collection in different scenarios.
obconfigserver
obconfigserver allows you to register, store, and query metadata of OceanBase Database. For more information, see ob-configserver.
Prerequisites
Make sure that the following conditions are met:
Your server meets the software and hardware requirements. For more information, see Software and hardware requirements.
At least 2 vCPUs, 6 GB of memory, and 20 GB of disk space are available for deploying OceanBase Database only.
At least 4 vCPUs, 10 GB of memory, and 25 GB of disk space are available for deploying OceanBase Database and all its components. We recommend that more than 16 GB of memory be available.
The Java environment has been installed and configured if OCP Express is to be deployed. At present, only Java Development Kit (JDK) 1.8 is supported. For more information, see the How do I configure the Java environment before I deploy OCP Express? section in FAQ.
Notice
obd remotely performs installation and deployment by using the Secure Shell (SSH) protocol. Therefore, you must use SSH to verify whether the Java environment is available. For more information, see Verify the Java environment.
Prepare the software
You can use obd to deploy OceanBase Database on the GUI in online or offline mode.
Online deployment: Make sure that the server where obd resides can connect to the Internet. In this deployment mode, obd obtains the installation package from a remote image repository during deployment. Therefore, you do not need to deploy and configure the installation package in advance.
Offline deployment: The server where obd resides does not need to connect to the Internet during deployment. In this deployment mode, you must upload the installation package to the local image repository of obd in advance. If you choose offline deployment, we recommend that you download the all-in-one package of the desired version.
Prepare the software based on the deployment mode.
Online deployment
If you choose online deployment, run the following commands to install obd on the central control server:
[admin@test001 ~]$ sudo yum install -y yum-utils
[admin@test001 ~]$ sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
[admin@test001 ~]$ sudo yum install -y ob-deploy
[admin@test001 ~]$ source /etc/profile.d/obd.sh
Offline deployment
If you choose offline deployment, run the following commands to download and install the all-in-one package.
You can download the latest all-in-one package from OceanBase Download Center and copy it to the central control server. Run the following commands to decompress and install the package:
[admin@test001 ~]$ tar -xzf oceanbase-all-in-one-*.tar.gz
[admin@test001 ~]$ cd oceanbase-all-in-one/bin/
[admin@test001 bin]$ ./install.sh
[admin@test001 bin]$ source ~/.oceanbase-all-in-one/bin/env.sh
Procedure
Step 1: Go to the GUI
Go to the GUI.
Run the
obd webcommand on the CLI, and visit the generated URL to go to the GUI.[admin@test001 ~]$ obd web start OBD WEB in 0.0.0.0:8680 please open http://10.10.10.1:8680Note
The default port in the URL is
8680. You can use theobd web -p <PORT>command to specify a port.In Alibaba Cloud or other cloud environments, the program may fail to obtain a public IP address but return an intranet IP address. You must use a correct public IP address to access the GUI.
The
obd webcommand is bound to0.0.0.0. In a deployment where multiple network interface cards (NICs) are used, you can access the GUI through any accessible IP address.
(Optional) To change the display language, click the English icon in the upper-right corner of the page and select a language as needed.

On the GUI, click Try Now to go to the Welcome to the OceanBase Deployment Wizard page. On the page that appears, select OceanBase and supporting tools and click Installation to go to the OceanBase Database deployment page.
Step 2: Configure deployment information
On the Deployment Configuration page, specify the cluster name, load type, and components to deploy.

| Section | Description |
|---|---|
| Deployment Configuration | Cluster Name indicates the name of the cluster to be deployed by using obd, which must be unique. The default value is myoceanbase. You can specify a custom cluster name. The cluster name can contain letters, digits, and underscores (_). It must start with a letter and end with a letter or digit, and must be 2 to 32 characters in length. You can run the obd cluster list command to view the clusters managed in obd. |
| Deploy a database | You can select an OceanBase Database version from the Version drop-down list and click Learn more to view its documentation. |
| Load Type | You can select a load type for the OceanBase cluster from the Type drop-down list and view its applicable scenarios in the Description column. |
| Optional components | By default, only ODP is selected. You can deselect the components that you do not want to deploy under Optional components. You can also click Learn more in the row of a component to view its documentation.
NoteOCP Express is automatically selected along with OBAgent. When you deselect OBAgent, OCP Express is also automatically deselected. |
Click Next Step to go to the Node Configuration page.
Step 3: Configure node information
On the Node Configuration page, configure the database and component nodes, and specify the user information and software installation path.

| Section | Parameter | Description |
|---|---|---|
| Database Node | Zone Name | The name of a zone in OceanBase Database. You can specify a custom zone name. The zone name can contain letters, digits, and underscores (_). It must start with a letter and end with a letter or digit, and must be 2 to 32 characters in length. In an OceanBase cluster that consists of multiple zones, the cluster must have a zone that shares the same region as that of the primary zone. You can click + Add Zone to add a zone or the Delete icon next to a zone to remove the zone. |
| OBServer Node | The IP address of an OBServer node in the OceanBase cluster. After you specify the IP address of an OBServer node, you can press Enter to specify the IP address of another OBServer node. | |
| RootService Node | You can select an IP address specified in the OBServer Node column from the RootService Node drop-down list to specify the OBServer node to be used as the RootService node of the OceanBase cluster. In an OceanBase cluster that has multiple replicas, you must specify a RootService node for each zone. | |
| Component Node | OCP Express Node | You can select the IP address of an OBServer node from the drop-down list or enter the IP address of a new node. You can select or enter only one IP address. |
| OBProxy Node | You can configure multiple nodes. You can select the IP address of an OBServer node from the drop-down list or enter the IP address of a new node. After you specify the IP address of a node, you can press Enter to specify the IP address of another node. | |
| obconfigserver nodes | You can configure multiple nodes. You can select the IP address of an OBServer node from the drop-down list or enter the IP address of a new node. After you specify the IP address of a node, you can press Enter to specify the IP address of another node. If you want to deploy obconfigserver on multiple nodes, configure load balancing in advance and specify the vip_address and vip_port parameters on the GUI. To specify the parameters, go to the Cluster Configuration page and enable More Configurations in the Component Configuration section. |
|
| User | User Name | The username used to deploy the OceanBase cluster. The default value is the name of the user who started the current process. You can specify a custom username. |
| Password | The login password of the user specified by User Name. If password-free access is not configured for the nodes, you must enter the password of the specified user. | |
| SSH Port | The SSH port number. The default value is 22. You can specify a custom port number. |
|
| Software Path | Software Path | The software path. The default value is the home directory of the deployment user. You can change the path as needed. After you specify this parameter, the myoceanbase folder is created in the specified directory. |
Click Next Step to go to the Cluster Configuration page.
Step 4: Configure cluster information
On the Cluster Configuration page, configure related cluster information, including the password of the administrator user in the sys tenant (root@sys), data directory, log directory, and ports and parameters of OceanBase Database and its components.
Cluster configuration

Parameter Description Mode Configuration Valid values: Maximum Utilization (recommended) and Minimum Availability. The Maximum Utilization mode maximizes resource utilization to ensure cluster performance and stability. In Minimum Availability mode, minimum resources required for the normal running of the cluster are configured. For more information about the two modes, see Mode configuration rules. root@sys Password You can click Randomly generated to generate a random password or enter a custom password. The password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain characters of at least three of the following types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Special characters are
~!@#%^&*_-+=|(){}[]:;,.?/.
Data Directory By default, the data directory is in the software path configured on the Node Configuration page. The data directory must be an absolute path starting with a forward slash ( /). You can change the data directory. Make sure that the specified directory is empty.Log Directory By default, the log directory is in the software path configured on the Node Configuration page. The log directory must be an absolute path starting with a forward slash ( /). You can change the log directory. Make sure that the specified directory is empty.SQL Port The SQL port number. The default value is 2881. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.RPC Port The port number used for the remote access protocol. The default value is 2882. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.More Configurations You can enable More Configurations to view more cluster parameters. You can retain the default settings or modify the settings. Note
After you enable More Configurations, you can configure the
scenarioparameter to specify a load type for the cluster. The default value of this parameter ishtap.Component configuration

Parameter Description OCP Express Admin Password The login password of the administrator account of OCP Express. You can click Randomly generated to generate a random password or enter a custom password. The password must meet the following complexity requirements: - It must be 8 to 32 characters in length.
- It must contain two characters of each of the following four types: digits (0 to 9), uppercase letters (A to Z), lowercase letters (a to z), and special characters. Special characters are
~!@#%^&*_-+=`|(){}[]:;',.?/.
Port OBProxy SQL The listening port of ODP. Default value: 2883. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.OBProxy Exporter Port The exporter port of ODP. It is used for Prometheus to pull monitoring data from ODP. Default value: 2884. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.Port OBProxy RPC The RPC port of ODP. Default value: 2885. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.OBAgent Monitoring Service Port The monitoring service port of ODP. Default value: 8088. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.OBAgent Management Service Port The management service port of ODP. Default value: 8089. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.OCP Express Port The HTTP port for accessing OCP Express. Default value: 8180. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.obconfigserver service port The listening port of obconfigserver. Default value: 8080. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.More Configurations You can enable More Configurations to view more component parameters. You can retain the default settings or modify the settings. Note
If multiple nodes are configured for obconfigserver nodes on the Node Configuration page, you must enable More Configurations and specify the
vip_addressandvip_portparameters. Otherwise, an error occurs during the pre-check.Click Next Step to go to the Pre-check page.
Step 5: Perform a precheck
On the Pre-check page, confirm all the configuration information. If any information is incorrect, you can click Previous Step to modify the information. After you confirm that all the information is correct, click Pre-check.
If the precheck reports an error and the error can be automatically fixed, you can click Automatic Repair to fix the error. You can also click Learn More to fix the reported error by referring to the error code document. After all the errors are fixed, click Re-check to perform a pre-check again.
After the pre-check is passed, click Deploy to start the deployment.
Step 6: Deploy OceanBase Database
On the deployment page:
After the deployment succeeds, you can copy the displayed connection string and use it to connect to the corresponding component. On the CLI, you can copy the connection string corresponding to OceanBase Database and use it to connect to the OceanBase cluster as the
root@sysuser, or copy the connection string corresponding to ODP and use it to connect to ODP as theroot@proxysysuser.Click the connection string of OCP Express to go to the login page of OCP Express. Log in with the account username and password provided on the deployment page, and then change the password. Then, you can manage the cluster on the GUI.
Note
In Alibaba Cloud or other cloud environments, the program may fail to obtain a public IP address but return an intranet IP address. You must use a correct public IP address to access the GUI.
In the Deployment Report section, click the Expand icon before a component to view its deployment logs on the GUI. Find the component and click View Details. Then, you can click the Copy icon next to a command to copy the command and run the command on the central control server to view the log location of the component.
Click One-click Copy to save the access address and account information of the OceanBase cluster. Then, click Finish to exit.
Notice
To deploy multiple clusters, click Finish on the GUI to end the current obd process and then run the obd web command to start the deployment of another cluster.
Related operations
Verify the Java environment
obd remotely executes a script to deploy OCP Express. Therefore, you must use SSH to verify the Java environment. You cannot directly run the java -version command on the server where OCP Express is deployed to verify the Java environment.
Note
Interactions between the client and server initialize the environment variables, but the SSH access mode does not initialize environment variables. As a result, the system prompts that the Java command does not exist or the Java version is invalid when you use SSH.
You can run the following command on any server that has established a network connection with the node where OCP Express resides.
# ocp_express_node_username: the username of the node where OCP Express resides
# ocp_express_node_ip: the IP address of the node where OCP Express resides
[admin@test001 ~]$ ssh <ocp_express_node_username>@<ocp_express_node_ip> 'java -version'
# Command output
openjdk version "1.8.0_xxx"
OpenJDK Runtime Environment (build 1.8.0_362-b08)
OpenJDK 64-Bit Server VM (build 25.362-b08, mixed mode)
If the required Java environment has been installed but failed the verification, you can resolve the issue in the following ways:
Method 1: Specify the java_bin parameter in the More Configurations section.
As shown in the following figure, set
java_binto the real path of Java, such as/jdk8/bin/java.
Method 2: Create a soft link from the executable file of Java to
/usr/bin/java.[admin@test001 bin]$ pwd /jdk8/bin [admin@test001 bin]$ ln -s /jdk8/bin/java /usr/bin/java
Manage a cluster
You can run the following commands to manage a cluster deployed by using obd. For more information, see Cluster commands.
# View the cluster list.
[admin@test001 ~]$ obd cluster list
# View the status of a cluster. The following takes the myoceanbase cluster as an example.
[admin@test001 ~]$ obd cluster display myoceanbase
# Stop a running cluster. The following takes the myoceanbase cluster as an example.
[admin@test001 ~]$ obd cluster stop myoceanbase
# Destroy a deployed cluster. The following takes the myoceanbase cluster as an example.
[admin@test001 ~]$ obd cluster destroy myoceanbase
Deploy a component of the desired version
The all-in-one package is iterated based on OceanBase Database versions. If any component in the package has a later version, you can download the component of the latest version from OceanBase Download Center and then upload it to the local image repository of obd. obd automatically obtains the latest version from the local image repository during deployment.
Go to the directory where the component installation package is located, and run the following command to add it to the local image repository:
[admin@test001 rpm]$ obd mirror clone *.rpmQuery the list of installation packages in the local image repository.
[admin@test001 rpm]$ obd mirror list local