This topic describes how to deploy OceanBase Database by using the GUI of obd in an x86-based CentOS Linux 7.9 system.
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.
obd
OceanBase Deployer (obd) is an installation and deployment tool of OceanBase Database. For more information, see OceanBase Deployer 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
OceanBase Agent (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.
obconfigserver
OceanBase Configserver (obconfigserver) provides metadata registration, storage, and query services for OceanBase Database. For more information, see ob-configserver.
Grafana
Grafana is an open-source data visualization tool that displays various metric data from data sources in a visualized manner, so that you can understand the system running status and performance metrics more intuitively. For more information, see the Grafana website.
Prometheus
Prometheus is an open-source service monitoring system and time series database. It provides a universal data model and quick data collection, storage, and query interfaces. For more information, see the Prometheus website.
Alertmanager
Alertmanager is an open-source alert manager that handles alerts from monitoring systems such as Prometheus and provides alert deduplication, grouping, routing, and silencing. For more information, see the Prometheus website.
Prerequisites
Before you begin, make sure that the following conditions are met:
Your server meets the software and hardware requirements. For more information, see Software and hardware requirements.
In a production environment, you need to perform environment and configuration checks. For specific operations, see Pre-deployment configuration.
To deploy OceanBase Database only, make sure that at least 2 vCPUs, 6 GB of memory, and 20 GB of disk space are available. Note that the memory limit refers to the value in the
availablecolumn in the output of thefree -gcommand.To deploy OceanBase Database and all its components, make sure that at least 4 vCPUs, 10 GB of memory, and 25 GB of disk space are available. We recommend that more than 16 GB of memory be available. Note that the memory limit refers to the value in the
availablecolumn in the output of thefree -gcommand.
Note
In an environment with a small number of CPU cores, the minimum CPU_Count set by obd is 8 by default. A low CPU core count will negatively affect the performance of OceanBase Database.
Prepare the software
You can deploy OceanBase Database through the GUI of obd either online or offline.
Online deployment: Make sure that the server where obd resides can connect to the Internet. In this deployment mode, you do not need to prepare the installation package in advance. During deployment, obd obtains the installation package from a remote image repository.
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.
The method to prepare the software varies with the deployment mode. You can select an appropriate method based on your specific circumstances.
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 the 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
Note
This topic provides operational guidance using obd V3.6.0 as an example. The GUI may vary with the obd version. The actual GUI shall prevail. For more information about obd, see OceanBase Deployer documentation.
Step 1: Start the GUI
Start the GUI.
Run the
obd webcommand on the CLI to start the GUI, and click 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 of the GUI is 8680. You can use the
obd web -p <PORT>command to specify a port.On Alibaba Cloud or other cloud environments, the program may fail to obtain a public IP address but return an intranet IP address. The obtained IP address is not a public 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.You can run the
obd webcommand in the background by using the nohup or screen command.
(Optional) To change the display language, move the cursor over Chinese in the upper-right corner of the GUI and click a language as needed.

On the GUI, click Start a journey. On the Welcome to the OceanBase Deployment Wizard page that appears, select the OceanBase and supporting tools module and click Installation to go to the OceanBase Database deployment page.
Step 2: Configure the deployment information
On the Deployment Configuration page, you can configure the cluster name, load type, and components to deploy. The content of the Deployment Configuration page is as follows:
Cluster configuration
SectionDescriptionDeployment Configuration The cluster name is a unique identifier for a deployment product dedicated to obd. The default value is myoceanbase. You can customize the name, but it must not conflict with any existing deployment names. The cluster name must start with a letter, end with a letter or digit, and can contain only letters, digits, and underscores (_). It must be 2 to 32 characters in length. You can run theobd cluster listcommand 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 after a component to view its documentation. Load Type You can select a load type for the OceanBase cluster from the Type drop-down list. The description of the applicable scenarios of each load type is displayed. Note
This section is displayed only when the version of OceanBase Database to be deployed is not earlier than V4.2.5.
Component selection
By default, only the OBProxy component is selected. You can click the checkbox before a component under Optional components to select or deselect the component. The component version is fixed to the latest version. Click Learn more after a component to view its documentation.
Note
The deployment of the Grafana and AlertManager components depends on the OBAgent and Prometheus components, and the deployment of the Prometheus component depends on the OBAgent component. For example, when you select Grafana or AlertManager, OBAgent and Prometheus are automatically selected. When you deselect OBAgent, Grafana, AlertManager, and Prometheus are automatically deselected.
Click Next Step to go to the Node Configuration page.
Step 3: Configure the nodes
On the Node Configuration page, you can configure the database and component nodes, the deployment user, and the software installation path. The content of the Node Configuration page is as follows:
Section |
Parameter |
Description |
|---|---|---|
| Database Node Configuration | Zone Name | The name of a zone in OceanBase Database. You can specify a custom zone name. The zone name must start with a letter, end with a letter or digit, and can contain only letters, digits, and underscores (_). It 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 or the Delete icon next to a zone to add or remove the zone. |
| OBServer Node | The IP address of an OBServer node in the OceanBase cluster. After you enter an IP address, you can press Enter to specify the IP address of another OBServer node.
Notice
|
|
| RootServer Node | You can select an IP address specified in OBServer Node from the drop-down list to specify the OBServer node to be used as the RootServer node of the OceanBase cluster. In an OceanBase cluster that has multiple replicas, you must specify a RootServer node for each zone. | |
| Component Node Configuration | 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. We recommend that you use an IP address other than 127.0.0.1. After you enter an IP address, you can press Enter to specify the IP address of another node. |
| Load Balancing Management | Click the expand button to configure load balancing for business access to the OceanBase cluster. We recommend that you provide a VIP or DNS address when you deploy multiple OBProxy nodes to avoid changing the OBProxy access address later. If you do not configure load balancing, the first IP address configured in OBProxy Node is used to set the connection string by default. You can select VIP access or DNS (domain name) access from the Access Method drop-down list:
Noticeobd does not deploy load balancing. To configure load balancing, you must deploy and configure the load balancing service in advance. |
|
| Prometheus 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. We recommend that you use an IP address other than 127.0.0.1. After you enter an IP address, you can press Enter to specify the IP address of another node. |
|
| Grafana 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. We recommend that you use an IP address other than 127.0.0.1. After you enter an IP address, you can press Enter to specify the IP address of another node. |
|
| AlertManager Node | You can configure only a single node. We recommend that you use an IP address other than 127.0.0.1. |
|
| obconfigserver 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. We recommend that you use an IP address other than 127.0.0.1. After you enter an IP address, you can press Enter to specify the IP address of another node.
NoteTo configure multiple nodes for obconfigserver, you must configure load balancing in advance, enable More Configurations in the Component Configuration section on the Cluster Configuration page, and specify the |
|
| Deployment Connection Configuration | 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. The username can contain only letters, digits, and periods (.), and can be up to 20 characters in length. Make sure that the specified user exists on all hosts. |
| Password | The login password of the user specified by User Name. If password-free access is configured between nodes, you do not need to enter the password. | |
| SSH Port | The SSH port number. The default value is 22. You can specify a custom port number. | |
| Software Path Configuration | Software Path | The software path. The default value is the home directory of the deployment user. You can change the path as needed. The path must be an absolute path starting with a forward slash (/), and can contain only letters, digits, and special characters (-_:@/.). After you specify this parameter, a folder named after the cluster name is created in the specified directory. |
Click Next Step to go to the Cluster Configuration page.
Step 4: Configure the cluster
On the Cluster Configuration page, you can configure the cluster, including the password of the administrator user (root@sys) in the sys tenant, the data directory, the log directory, and the ports and parameters of OceanBase Database and its components. This section describes the configurations separately.
Cluster configuration
ParameterDescriptionMode Configuration You can select Maximum Utilization or Minimum Availability. The Maximum Utilization mode maximizes resource utilization to ensure the performance and stability of the cluster. This mode is recommended. The Minimum Availability mode configures the resource parameters that meet the minimum requirements for the normal running of the cluster. For more information about the two modes, see Mode configuration rules. root@sys Password You can click Randomly generated to have obd generate a random string or set a custom password. If you set a custom password, the password must meet the following complexity requirements: - The password must be 8 to 32 characters in length.
- The password must contain at least three of the following four types of characters: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), and special characters (
~!@#%^&*_-+=|(){}[]:;,.?/).
Data Directory By default, the data directory is /data/1. You can specify a custom directory. The directory must be an absolute path starting with a forward slash (/), can contain only letters, digits, and special characters (-_:@/.), and must be empty.Log Directory By default, the log directory is /data/log1. You can specify a custom directory. The directory must be an absolute path starting with a forward slash (/), can contain only letters, digits, and special characters (-_:@/.), and must be empty.SQL Port The port number for the SQL service protocol. 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 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.OBShell Port The O&M port of OceanBase Database. The default value is 2886. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.More Configurations You can click the expand button before More Configurations to view and configure the cluster parameters. You can use the automatically assigned values or customize each parameter. Note
You can use the
enable_auto_startparameter in More Configurations to control whether the observer process automatically starts upon boot. To enable this feature, make sure that the deployment user has sudo permissions and that the deployment environment is not a container environment.Component configuration
ParameterDescriptionGrafana Password The login password of the Grafana administrator account. You can click Randomly generated to have obd generate a random string or set a custom password. If you set a custom password, the password must meet the following complexity requirements: - The password must be 8 to 32 characters in length.
- The password must contain at least two characters of each of the following four types: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), and special characters (
~!@#%^&*_-+=|(){}[]:;,.?/`$"<>\).
Prometheus Password The login password of the Prometheus service. You can click Randomly generated to have obd generate a random string or set a custom password. If you set a custom password, the password must meet the following complexity requirements: - The password must be 8 to 32 characters in length.
- The password must contain at least two characters of each of the following four types: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), and special characters (
~!@#%^&*_-+=|(){}[]:;,.?/`$"<>\).
AlertManager Password The login password of the Alertmanager service. You can click Randomly generated to have obd generate a random string or set a custom password. If you set a custom password, the password must meet the following complexity requirements: - The password must be 8 to 32 characters in length.
- The password must contain at least two characters of each of the following four types: digits (0~9), uppercase letters (A~Z), lowercase letters (a~z), and special characters (
~!@#%^&*_-+=|(){}[]:;,.?/`$"<>\).
OBProxy SQL Port The listening port of ODP. The default value is 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 OBProxy. It is used for Prometheus to pull monitoring data from OBProxy. The default value is 2884. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.OBProxy RPC Port The RPC port of OBProxy. The default value is 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 OBAgent. The default value is 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 OBAgent. The default value is 8089. 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 the obconfigserver service. The default value is 8080. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.Prometheus Service Port The listening port of the Prometheus service. The default value is 9090. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.Grafana Service Port The HTTP port used to access the Grafana page. The default value is 3000. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.AlertManager Service Port The HTTP port used to access the Alertmanager page. The default value is 9093. You can specify a custom port number ranging from1025to65535. Make sure that the specified port is not occupied.More Configurations You can click the expand button before More Configurations to view and configure the component parameters. You can use the automatically assigned values or customize each parameter. Note
If you configure multiple nodes for obconfigserver Node on the Node Configuration page, you must specify the
vip_addressandvip_portparameters in More Configurations. Otherwise, an error occurs during the pre-check.
After you complete all configurations, click Next Step to go to the Pre-check page.
Step 5: Pre-check
On the Pre-check page, confirm all the configuration information. If any information is incorrect, click Previous Step to modify the information. After you confirm that all the information is correct, click Pre-check to perform the check.
If the pre-check reports an error, you can click Automatic Repair (for check items that can be automatically fixed) or click Learn More to go to the error code documentation and fix the error by referring to the documentation. 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 of OceanBase Database.
Step 6: Deployment
The following describes the page:
After the deployment succeeds, you can copy the displayed connection string and use it to connect to the corresponding component. On the CLI, the connection string after the OceanBase Database component connects to the OceanBase cluster as the
root@sysuser, and the connection string after the OBProxy component connects to ODP as theroot@proxysysuser.You can click the connection string of a component such as Prometheus, Grafana, AlertManager, or obshell Dashboard to go to the login page of the component. Log on with the account username and password provided on the deployment page.
Note
On Alibaba Cloud or other cloud environments, the program may fail to obtain a public IP address but return an intranet IP address. The obtained IP address is not a public 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. 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 Copy Information to copy and save all the account and password information of the OceanBase cluster. Then, you can click Exit to exit the deployment program or click Create Business Tenant to create a business tenant on the GUI.
Note
To deploy multiple clusters, click Exit on the GUI to end the current obd process and then run the
obd webcommand to start the deployment of another cluster.We recommend that you create a business tenant for the OceanBase cluster. The sys tenant is used only to manage the cluster. If you use the sys tenant as a business tenant, the system may run abnormally.
(Optional) Step 7: Create a business tenant
After the OceanBase cluster is successfully deployed, click Create Business Tenant in the lower-right corner of the successful deployment page to start the business tenant creation process. You can configure the tenant information by referring to the following table.
Parameter |
Description |
|---|---|
| Tenant Name | The name of the tenant to be created. The tenant name must meet the following requirements:
|
| Tenant Mode | You can select MySQL-compatible mode or Oracle-compatible mode from the drop-down list.
ApplicabilityOceanBase Database Community Edition does not support the creation of tenants in Oracle-compatible mode. |
| Tenant root Password | You can click Randomly generated to have obd generate a random string or set a custom password. If you set a custom password, the password must meet the following complexity requirements:
|
| Mode Configuration | You can select Maximum Utilization, Minimum Availability, or Custom.
|
| Business Load Type | You can select a business load type for the tenant from the drop-down list. When you select different load types, the description of the applicable scenarios of each load type is displayed below the drop-down list.
NoticeThis parameter is displayed only when the version of the deployed OceanBase Database is not earlier than V4.2.5. |
| Character Set | The default value is utf8mb4. You can select another character set from the drop-down list. |
| Collation | The default value is utf8mb4_general_ci. You can select another collation from the drop-down list. |
| Table Name Case Sensitivity | You can set this parameter to 0, 1, or 2 from the drop-down list.
|
| Time Zone | The default value is (GMT+08:00) China Standard Time. You can select another time zone from the drop-down list. |
| IP Address Whitelist | You can specify the accessible IP addresses or allow all IP addresses to access the tenant. If you choose to specify the accessible IP addresses, you can specify the client IP addresses allowed for login in the input box under Custom IP. After you enter an IP address, you can press Enter or enter a comma (,) to specify multiple node IP addresses. Move the cursor over View configuration instructions to view the instructions for configuring IP addresses.
NoteWhen you customize the whitelist, the value |
After you complete the configuration, click Next Step: Create Business Tenant to create the tenant. After the creation is complete, the page displays the information of the business tenant, including the tenant name, the password of the root user, and the connection string. Click Exit in the lower-left corner to exit the tenant creation process. Then, you can click Exit on the deployment result page to exit the deployment program, or click Create Business Tenant again to create another business tenant.
Related operations
Manage the 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
When you deploy OceanBase Database by using the all-in-one package, 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 the OceanBase Download Center and upload it to the local image repository of obd by referring to the following steps. 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 the package to the local image repository:
[admin@test001 rpm]$ obd mirror clone *.rpmView the list of installation packages in the local image repository.
[admin@test001 rpm]$ obd mirror list local
