OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Deployer

V2.9.0Community Edition

  • What is obd
  • Quick Start
    • Install and configure obd
    • Quickly start OceanBase Database
    • Deploy an OceanBase cluster on the GUI
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Telemetry commands
  • User Guide
    • Configuration files
    • Deploy through GUI
      • GUI operation overview
      • Deploy OCP through the GUI
    • Deploy through CLI
      • Deploy OceanBase Database on a single OBServer node
      • Deploy OCP Express by using commands
      • Deploy and use obconfigserver
      • Deploy oblogproxy by using the CLI
      • Deploy OCP by using commands
      • Use OCP to take over a cluster deployed by obd
      • Use obd to take over a cluster
      • Add GUI-based monitoring for an existing cluster
      • Upgrade OCP Express
      • Upgrade OceanBase Database
      • Physical Standby Database
        • Deploy primary and standby tenants by using obd
        • Switch the roles of tenants and decouple a standby tenant from the primary tenant
      • Scale out a cluster and change cluster components
  • FAQ
    • FAQ
    • How do I upgrade an OBProxy to obproxy-ce 3.2.3?
  • Mode configuration rules
  • Error codes
  • Release Notes
    • Version rules
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployer V2.8.0
    • V2.7
      • OceanBase Deployer V2.7.0
    • V2.6
      • OceanBase Deployer V2.6.2
      • OceanBase Deployer V2.6.1
      • OceanBase Deployer V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployer V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployer V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployer V2.1.0
    • V2.0
      • OceanBase Deployer V2.0.1
      • OceanBase Deployer V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0

Download PDF

What is obd Install and configure obd Quickly start OceanBase Database Deploy an OceanBase cluster on the GUI Quick deployment command Cluster commands Mirror and repository commands Testing commands Tool commands obdiag commands Telemetry commands Configuration files GUI operation overview Deploy OCP through the GUI Deploy OceanBase Database on a single OBServer node Deploy OCP Express by using commands Deploy and use obconfigserver Deploy oblogproxy by using the CLI Deploy OCP by using commands Use OCP to take over a cluster deployed by obd Use obd to take over a cluster Add GUI-based monitoring for an existing cluster Upgrade OCP Express Upgrade OceanBase Database Scale out a cluster and change cluster components FAQ How do I upgrade an OBProxy to obproxy-ce 3.2.3? Mode configuration rules Error codes Version rules OceanBase Deployer V2.9.2 OceanBase Deployer V2.9.1 OceanBase Deployer V2.9.0 OceanBase Deployer V2.8.0 OceanBase Deployer V2.7.0 OceanBase Deployer V2.6.2 OceanBase Deployer V2.6.1 OceanBase Deployer V2.6.0 OceanBase Deployer V2.5.0 OceanBase Deployer V2.4.0 OceanBase Deployer V2.3.1 OceanBase Deployer V2.3.0 OceanBase Deployer V2.2.0 OceanBase Deployer V2.1.1 OceanBase Deployer V2.1.0 OceanBase Deployer V2.0.1 OceanBase Deployer V2.0.0 OceanBase Deployer V1.6.2 OceanBase Deployer V1.6.1 OceanBase Deployer V1.6.0 OceanBase Deployer V1.5.0 OceanBase Deployer V1.4.0 OceanBase Deployer V1.3.3 OceanBase Deployer V1.3.2 OceanBase Deployer V1.3.0 OceanBase Deployer V1.2.1 OceanBase Deployer V1.2.0
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V2.9.0
iconOceanBase Deployer
V 2.9.0Community Edition
Community Edition
  • V 3.2.1
  • V 3.2.0
  • V 3.1.0
  • V 3.0.0
  • V 2.10.1
  • V 2.10.0
  • V 2.9.0
  • V 2.8.0
  • V 2.7.0
  • V 2.6.0
  • V 2.5.0
  • V 2.4.0
  • V 2.3.1
  • V 2.3.0
  • V 2.2.0
  • V 2.1.0
  • V 2.0.0
  • V 1.6.1

Deploy OCP by using commands

Last Updated:2026-04-14 09:56:16  Updated
share
What is on this page
Prerequisites
Configuration files
Deploy OCP separately
Deploy OCP based on OceanBase Database
Step 1: Create a configuration file
Step 2: Modify the configuration file
Step 3: Deploy OCP
References

folded

share

Prerequisites

  • You have installed and configured a Java environment later than version 1.8.0_161 in the /usr/bin directory. For more information, see the How do I configure the Java environment before I deploy OCP Express? section in the FAQ topic.

  • You have installed the clockdiff command.

  • Your account has the privilege to run the sudo command without a password.

Note

This topic assumes that the server mentioned in this topic can connect to the Internet or the required software programs such as OceanBase Database, OceanBase Database Proxy (ODP), and OceanBase Cloud Platform (OCP) are installed on the server. For more information about how to configure the required software, see the Configure obd section in the Install and configure obd topic.

Configuration files

OceanBase Deployer (obd) provides sample configuration files for deploying OCP. You can modify the files based on your server resources.

  • If obd is directly downloaded and installed on your server, you can view the sample configuration files in the /usr/obd/example directory.

  • If you have installed obd by using the all-in-one installation package, you can view the sample configuration files in the ~/.oceanbase-all-in-one/obd/usr/obd/example directory.

  • You can also view the sample configuration files provided by obd on GitHub.

obd provides the following sample configuration files for deploying OCP:

  • Sample configuration file for deploying OCP separately: ocp-only-example.yaml

  • Sample configuration file for distributed deployment of ODP and OCP: distributed-with-obproxy-and-ocp-example.yaml

Deploy OCP separately

Note

When you deploy OCP separately, you must create MetaDB and corresponding tenants (ocp_meta and ocp_monitor) for OCP.

  • For more information, see Deploy OceanBase Database on a single OBServer node or Deploy an OceanBase cluster on the GUI of obd.
  • You can create a tenant manually or by using an obd command as needed. For more information about how to manually create a tenant, see Create a tenant. For more information about how to create a tenant by using an obd command, see obd cluster tenant create in Cluster commands.
  1. Create a configuration file.

    Run the following command to create a configuration file named ocp-only-example.yaml. You can also specify a custom file name.

    vim ocp-only-example.yaml
    
  2. Modify user information.

    Copy and paste the following content to the file and modify the parameters as needed.

    ## Only need to configure when remote login is required
    user:
      username: admin
    #   password: your password if need
      key_file: /home/admin/.ssh/id_rsa
    #   port: your ssh port, default 22
    #   timeout: ssh connection timeout (second), default 30
    

    username specifies the username of the account used to log on to the target server. Make sure that this account has the write privilege on the home directory. password and key_file are used for user verification. Generally, you need to specify only one of them.

    Notice

    After you specify the path of the key, comment out or delete the password field if your key does not require a password. Otherwise, the value of the password parameter will be taken as the password of the key and used for logon, leading to a logon verification failure.

  3. Modify OCP configurations.

    Copy and paste the following content to the file and modify the parameters as needed. For more information about the parameters, see the Parameters section in the Description of the configuration file topic.

    ocp-server-ce:
      version: 4.2.2
      # package_hash: 84a65bf0ec004e73b772938696b2b896a0ef2b2f
      # release: 20240315150922.el7
      servers:
        - 10.10.10.1
      global:
        home_path: /home/admin/ocp
        soft_dir: /home/admin/software
        log_dir: /home/admin/logs
        ocp_site_url: http://10.10.10.1:8080
        port: 8080
        admin_password: ********
        memory_size: 4G
        manage_info:
          machine: 10
        jdbc_url: jdbc:oceanbase://10.10.10.2:2881/test
        jdbc_username: root@sys
        jdbc_password: ********
        ocp_meta_tenant:
          tenant_name: ocp_meta
          max_cpu: 2.0
          memory_size: 4G
        ocp_meta_username: root
        ocp_meta_password: ********
        ocp_meta_db: meta_database
        ocp_monitor_tenant:
          tenant_name: ocp_monitor
          max_cpu: 2.0
          memory_size: 4G
        ocp_monitor_username: root
        ocp_monitor_password: ********
        ocp_monitor_db: monitor_database
    
  4. Deploy OCP.

    obd cluster deploy ocp -c ocp-only-example.yaml
    

    ocp specifies the cluster name. You can use a custom name as needed. After OCP is deployed, the command returns a start command:

    ocp deployed
    Please execute ` obd cluster start ocp ` to start
    Trace ID: 4e444844-0211-11ef-8e69-00163e0808cc
    If you want to view detailed obd logs, please run: obd display-trace 4e444844-0211-11ef-8e69-00163e0808cc
    
  5. Start OCP.

    obd cluster start ocp
    

    After OCP is started, the command returns the logon information of OCP:

    +----------------------------------------------------------+
    |                      ocp-server-ce                       |
    +---------------------------+----------+----------+--------+
    | url                       | username | password | status |
    +---------------------------+----------+----------+--------+
    | http://10.10.10.1:8080    | admin    | ******** | active |
    +---------------------------+----------+----------+--------+
    ocp running
    Trace ID: ed5a1f4c-0218-11ef-bda1-00163e0808cc
    If you want to view detailed obd logs, please run: obd display-trace ed5a1f4c-0218-11ef-bda1-00163e0808cc
    

Deploy OCP based on OceanBase Database

Step 1: Create a configuration file

Run the following command to create a configuration file named distributed-ocp.yaml. You can also specify a custom file name.

vim distributed-ocp.yaml

Step 2: Modify the configuration file

  1. Modify user information.

    Copy and paste the following content to the file and modify the parameters as needed.

    ## Only need to configure when remote login is required
    user:
      username: admin
    #   password: your password if need
      key_file: /home/admin/.ssh/id_rsa
    #   port: your ssh port, default 22
    #   timeout: ssh connection timeout (second), default 30
    

    username specifies the username of the account used to log on to the target server. Make sure that this account has the write privilege on the home directory. password and key_file are used for user verification. Generally, you need to specify only one of them.

    Notice

    After you specify the path of the key, comment out or delete the password field if your key does not require a password. Otherwise, the value of the password parameter will be taken as the password of the key and used for logon, leading to a logon verification failure.

  2. Modify OceanBase Database configurations.

    Copy and paste the following content to the file and modify the parameters as needed.

    oceanbase-ce:
      version: 4.3.0.1
      # release: 100000242024032211.el7
      # package_hash: c4a03c83614f50c99ddb1c37dda858fa5d9b14b7
      servers:
        - name: server1
          ip: 10.10.10.1
        - name: server2
          ip: 10.10.10.2
        - name: server3
          ip: 10.10.10.3
      global:
        appname: obcluster
        cluster_id: 1711955629
        mysql_port: 2881
        rpc_port: 2882
        home_path: /home/admin/oceanbase
        data_dir: /home/admin/oceanbase/data
        redo_dir: /home/admin/oceanbase/redo
        obshell_port: 2886
        scenario: htap
        memory_limit: 64G
        system_memory: 30G
        log_disk_size: 192G
        datafile_size: 192GB
        ocp_meta_tenant:
          tenant_name: ocp_meta
          max_cpu: 2.0
          memory_size: 4G
        ocp_meta_username: root
        ocp_meta_password: ********
        ocp_meta_db: meta_database
        ocp_monitor_tenant:
          tenant_name: ocp_monitor
          max_cpu: 2.0
          memory_size: 8G
        ocp_monitor_username: root
        ocp_monitor_password: ********
        ocp_monitor_db: monitor_database
        proxyro_password: ********
        root_password: ********
        ocp_meta_tenant_log_disk_size: 6656M
        enable_syslog_recycle: true
        enable_syslog_wf: false
        max_syslog_file_count: 4 
        cpu_count: 20
      server1:
        zone: zone1
      server2:
         zone: zone2
      server3:
         zone: zone3
    

    For information about the parameters of OceanBase Database, see the Parameters section in the Description of the configuration file topic. The following table describes the parameters related to OCP.

    Parameter Required? Default value Effective mode of modification Description
    ocp_meta_tenant Yes tenant_name: meta_tenantmax_cpu: 1memory_size: 2147483648 Redeployment The information about the OCP meta tenant.
    • tenant_name: the name of the tenant.
    • max_cpu: the maximum number of CPU cores for OCP MetaDB.
    • memory_size: the size of memory for OCP MetaDB.
    ocp_meta_username No meta Process restart The username for connecting to the OCP meta tenant.
    ocp_meta_password Yes oceanbase Process restart The password corresponding to the username specified by ocp_meta_username.
    ocp_meta_db No meta_database Redeployment The database name of OCP MetaDB.
    ocp_monitor_tenant Yes tenant_name: monitor_tenantmax_cpu: 1memory_size: 2147483648 Redeployment The information about the OCP monitor tenant.
    • tenant_name: the name of the tenant. When OCP is deployed separately, you must confirm that the specified tenant has been created.
    • max_cpu: the maximum number of CPU cores for OCP MonitorDB.
    • memory_size: the size of memory for OCP MonitorDB.
    ocp_monitor_username No monitor_user Process restart The username for connecting to the OCP monitor tenant.
    ocp_monitor_password Yes oceanbase Process restart The password corresponding to the username specified by ocp_monitor_username.
    ocp_monitor_db No monitor_database Redeployment The database name of OCP MonitorDB.
    ocp_meta_tenant_log_disk_size No 2048M Redeployment The size of the log disk for tenants in OCP MetaDB.
  3. Modify ODP configurations.

    Copy and paste the following content to the file and modify the parameters as needed. For more information about the parameters, see the Parameters section in the Description of the configuration file topic.

    obproxy-ce:
      version: 4.2.3.0
      # package_hash: 7ca6c000887b90db111093180e6984bf4cf8f7380a948870f3eb2ac30be38f37
      # release: 3.el7
      depends:
        - oceanbase-ce
      servers:
        - 10.10.10.1
      global:
        home_path: /home/admin/obproxy
        prometheus_listen_port: 2884
        listen_port: 2883
        obproxy_sys_password: ********
        skip_proxy_sys_private_check: true
        enable_strict_kernel_release: false
        enable_cluster_checkout: false
        proxy_id: 5150
        client_session_id_version: 2
    
  4. Modify OCP configurations.

    Copy and paste the following content to the file and modify the parameters as needed. For more information about the parameters, see the Parameters section in the Description of the configuration file topic.

    ocp-server-ce:
      version: 4.2.2
      # package_hash: 84a65bf0ec004e73b772938696b2b896a0ef2b2f
      # release: 20240315150922.el7
      depends:
        - oceanbase-ce
        - obproxy-ce
      servers:
        - 10.10.10.1
      global:
        home_path: /home/admin/ocp
        soft_dir: /home/admin/software
        log_dir: /home/admin/logs
        ocp_site_url: http://10.10.10.1:8080
        port: 8080
        admin_password: ********
        memory_size: 8G
        manage_info:
          machine: 10 
    

Step 3: Deploy OCP

  1. Deploy OCP.

    obd cluster deploy ocp -c ocp-only-example.yaml
    

    ocp specifies the cluster name. You can use a custom name as needed. After OCP is deployed, the command returns a start command:

    ocp deployed
    Please execute ` obd cluster start ocp ` to start
    Trace ID: 990e7dba-0223-11ef-ab25-00163e0808cc
    If you want to view detailed obd logs, please run: obd display-trace 990e7dba-0223-11ef-ab25-00163e0808cc
    
  2. Start OCP.

    obd cluster start ocp
    

    After OCP is started, the command returns cluster information:

    +-------------------------------------------------+
    |                     observer                    |
    +---------------+---------+------+-------+--------+
    | ip            | version | port | zone  | status |
    +---------------+---------+------+-------+--------+
    | 10.10.10.1    | 4.3.0.1 | 2881 | zone1 | ACTIVE |
    | 10.10.10.2    | 4.3.0.1 | 2881 | zone2 | ACTIVE |
    | 10.10.10.3    | 4.3.0.1 | 2881 | zone3 | ACTIVE |
    +---------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot -p'********' -Doceanbase -A
    
    +-------------------------------------------------+
    |                     obproxy                     |
    +---------------+------+-----------------+--------+
    | ip            | port | prometheus_port | status |
    +---------------+------+-----------------+--------+
    | 10.10.10.1    | 2883 | 2884            | active |
    +---------------+------+-----------------+--------+
    obclient -h10.10.10.1 -P2883 -uroot@proxysys -p'********' -Doceanbase -A
    
    +----------------------------------------------------------+
    |                      ocp-server-ce                       |
    +---------------------------+----------+----------+--------+
    | url                       | username | password | status |
    +---------------------------+----------+----------+--------+
    | http://10.10.10.1:8080    | admin    | ******** | active |
    +---------------------------+----------+----------+--------+
    ocp running
    

References

  • After you deploy a cluster by using obd, you can restart/reload, stop, or destroy the cluster by using obd. For more information, see Cluster commands.

  • For more information about how to use OCP after OCP is deployed, see OCP documentation.

Previous topic

Deploy oblogproxy by using the CLI
Last

Next topic

Use OCP to take over a cluster deployed by obd
Next
What is on this page
Prerequisites
Configuration files
Deploy OCP separately
Deploy OCP based on OceanBase Database
Step 1: Create a configuration file
Step 2: Modify the configuration file
Step 3: Deploy OCP
References