Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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

V4.3.0Community Edition

  • What is obd
  • Quick Start
    • Install obd
    • Quick deployment of OceanBase Database
    • Quickly deploy OCP
  • obd Command
    • Quick deployment commands
    • Cluster commands
    • Command groups
    • Image and repository commands
    • Test command groups
    • Tool commands
    • obdiag commands
    • Binlog service commands
    • Hardware commands
    • License commands
    • Password commands
    • Telemetry commands
  • User Guide
    • Usage overview
    • Deploy through GUI
      • Overview
      • Pattern configuration rules
      • Deploy an OceanBase cluster
      • Deploy OCP
      • Deploy OMS
      • Change components
      • Upgrade OCP
      • Upgrade OMS
    • Deploy through CLI
      • Configuration file
      • Component deployment
        • Deploy an OceanBase cluster
        • Deploy seekdb
        • Deploy obconfigserver
        • Deploy OMS
        • Deploy OCP
        • Deploy Alertmanager
        • Deploy obbinlog
        • Deploy oblogproxy
      • Cluster management
        • Physical Standby Database
          • Create a standby tenant
          • Role switching and decoupling
          • Switch the synchronization mode between primary and standby tenants
        • seekdb primary/standby instance
          • Create a standby instance
          • Role switching and decoupling
        • Scale out and component changes
        • Performance test
        • Diagnose a cluster
        • Backup and restore
        • Add a GUI monitoring system to an existing cluster
      • Cluster management
        • Use OCP to take over an OceanBase cluster deployed by obd
        • Take over an OceanBase cluster
      • Component upgrade
        • Upgrade OceanBase Database
        • Upgrade ODP
        • Upgrade OMS
  • Upgrade obd
  • FAQ
  • Error codes
  • Release Notes
    • Version rules
    • V4.3
      • OceanBase Deploy V4.3.0
    • V4.2
      • OceanBase Deployment Tool V4.2.0
    • V4.1
      • OceanBase Deployer V4.1.0
    • V4.0
      • OceanBase Deployer V4.0.0
    • V3.6
      • OceanBase Deployer V3.6.0
    • V3.5
      • OceanBase Deployer V3.5.0
    • V3.4
      • OceanBase Deployer V3.4.0
    • V3.3
      • OceanBase Deployer V3.3.0
    • V3.2
      • OceanBase Deployer V3.2.2
      • OceanBase Deployer V3.2.1
      • OceanBase Deployer V3.2.0
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployment Tool V2.8.0
    • V2.7
      • OceanBase Deployment Tool V2.7.0
    • V2.6
      • OceanBase Deployment Tool V2.6.2
      • OceanBase Deployment Tool V2.6.1
      • OceanBase Deployment Tool V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployment Tool V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployment Tool V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployment Tool V2.1.0
    • V2.0
      • OceanBase Deployment Tool V2.0.1
      • OceanBase Deployment Tool 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
  • Interactive deployment of OceanBase Database Community Edition
  • Deploy a Community Edition cluster using the obd graphical interface
  • Deploy a Community Edition cluster by using an obd configuration file

Download PDF

What is obdInstall obdQuick deployment of OceanBase DatabaseQuickly deploy OCPQuick deployment commandsCluster commandsCommand groupsImage and repository commandsTest command groupsTool commandsobdiag commandsBinlog service commandsHardware commandsLicense commandsPassword commandsTelemetry commandsUsage overviewOverviewPattern configuration rulesDeploy an OceanBase clusterDeploy OCPDeploy OMSChange componentsUpgrade OCPUpgrade OMSConfiguration fileUpgrade obdFAQError codesVersion rulesOceanBase Deploy V4.3.0OceanBase Deployment Tool V4.2.0OceanBase Deployer V4.1.0OceanBase Deployer V4.0.0OceanBase Deployer V3.6.0OceanBase Deployer V3.5.0OceanBase Deployer V3.4.0OceanBase Deployer V3.3.0OceanBase Deployer V3.2.2OceanBase Deployer V3.2.1OceanBase Deployer V3.2.0OceanBase Deployer V3.1.2OceanBase Deployer V3.1.1OceanBase Deployer V3.1.0OceanBase Deployer V3.0.1OceanBase Deployer V3.0.0OceanBase Deployer V2.10.1OceanBase Deployer V2.10.0OceanBase Deployer V2.9.2OceanBase Deployer V2.9.1OceanBase Deployer V2.9.0OceanBase Deployment Tool V2.8.0OceanBase Deployment Tool V2.7.0OceanBase Deployment Tool V2.6.2OceanBase Deployment Tool V2.6.1OceanBase Deployment Tool V2.6.0OceanBase Deployer V2.5.0OceanBase Deployer V2.4.0OceanBase Deployment Tool V2.3.1OceanBase Deployer V2.3.0OceanBase Deployment Tool V2.2.0OceanBase Deployer V2.1.1OceanBase Deployment Tool V2.1.0OceanBase Deployment Tool V2.0.1OceanBase Deployment Tool V2.0.0OceanBase Deployer V1.6.2OceanBase Deployer V1.6.1OceanBase Deployer V1.6.0OceanBase Deployer V1.5.0OceanBase Deployer V1.4.0OceanBase Deployer V1.3.3OceanBase Deployer V1.3.2OceanBase Deployer V1.3.0OceanBase Deployer V1.2.1OceanBase Deployer V1.2.0Interactive deployment of OceanBase Database Community EditionDeploy a Community Edition cluster using the obd graphical interfaceDeploy a Community Edition cluster by using an obd configuration file
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogWhite PaperLive DemosTraining & CertificationTicket
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. V4.3.0
iconOceanBase Deployer
V 4.3.0Community Edition
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
Community Edition
  • V 4.3.0
  • 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

Interactive deployment of OceanBase Database Community Edition

Last Updated:2026-06-30 14:40:58  Updated
Share
What is on this page
Server configuration
Check the server's soft and hardware configurations
Hardware requirements
Software requirements
Preparations before deployment
Plan the directories
User and parameter configuration
Deploy Community Edition interactively by using obd
Related Documents

folded

Share

This topic describes how to deploy OceanBase Database Community Edition interactively by using obd. It also covers the resource preparation and configuration before deployment and how to quickly set up an OceanBase Database environment on a single server.

In this topic, OceanBase Database and obd are deployed on the same server, and the obagent, Prometheus, and Grafana components are not deployed.

Note

  • The interactive deployment method can only be used to deploy OceanBase Database on a single server. It is suitable for learning about OceanBase Database, but not recommended for production environments.

  • obd supports the deployment of OceanBase Database Community Edition and Enterprise Edition. This topic describes how to deploy OceanBase Database Community Edition interactively.

Server configuration

The server configuration used in this example is as follows:

Category
Configuration
Number of servers 1
CPU 8 x86_64 cores
Operating system CentOS Linux release 8.5.2111
Kernel 4.18.0-348.7.1
Available memory 32 GB
Disk SSD storage. The storage space is 196 GB for the installation directory, 2 TB for the log directory, and 2 TB for the data directory.

Note

  • For testing and experience scenarios, ensure that the server meets the minimum resource requirements when you deploy OceanBase Database. The minimum resource requirements are 2 CPU cores, 6 GB of memory, and 20 GB of disk space. Note that the memory limit refers to the value in the available column in the output of the free -g command.

  • In an environment with a small number of CPU cores, the default minimum CPU count set by obd is 8. A low CPU count will negatively impact the performance of OceanBase Database.

Check the server's soft and hardware configurations

Before you deploy OceanBase Database, make sure that the server's soft and hardware configurations meet the requirements.

Hardware requirements

Check whether the CPU supports AVX instructions

Note

This restriction applies only to servers with the x86 architecture. If you use a server with a different architecture, you can ignore this section.

OceanBase Database requires that the CPU supports AVX instructions. You can run the following command to check whether the CPU supports AVX instructions.

lscpu | grep Flags | grep avx

The following example shows the result. If the avx field exists in the output, the CPU supports AVX instructions. If the avx field does not exist in the output, the CPU does not support AVX instructions. In this case, you must use a server that supports AVX instructions.

Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs_enhanced fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves avx_vnni avx512_bf16 wbnoinvd ida arat hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk avx512_fp16 flush_l1d arch_capabilities

Check the memory

Run the following command to check whether the available memory meets the requirements specified in the Software and hardware requirements section of the OceanBase Database documentation.

[root@test001 ~]# free -g

The following example shows the result. The value of the Mem field in the available column is 32, which meets the memory requirement.

              total        used        free      shared  buff/cache   available
Mem:             36           4          32           0           0          32
Swap:             0           0           0

If the memory requirement is not met, you can run the following command to clear the Linux cache: PageCache, dentries, and inodes.

sudo sysctl -w vm.drop_caches=3
# or
sudo echo 3 > /proc/sys/vm/drop_caches

Software requirements

Check the operating system

Run the following command to check the operating system information. The operating system must meet the requirements specified in the Software and hardware requirements section of the OceanBase Database documentation.

[root@test001 ~]# cat /etc/os-release

The following example shows the result. The operating system is CentOS Linux (NAME field), and the version is 8 (VERSION field).

NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"

Check the kernel

OceanBase Database provides installation packages for the x86 architecture (el7 and el8) and the ARM architecture (el7 and el8). Before you deploy OceanBase Database, check the kernel of the server to obtain the correct installation package.

Run the following command to check the kernel information:

[root@test001 ~]# uname -a

The following example shows the result. The kernel is 4.18.0-348.7.1, the operating system version is el8, and the CPU architecture is x86_64. Therefore, you must use an installation package with the el8.x86_64 suffix, such as oceanbase-ce-4.3.5.2-102020032025070315.el8.x86_64.rpm.

Linux test001 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Preparations before deployment

To ensure the smooth installation and optimal use of OceanBase Database Community Edition, the following configurations need to be performed before deployment.

Plan the directories

To deploy OceanBase Database Community Edition, you need to plan the following three directories. The file system type must be XFS or EXT4.

  • Installation directory: the directory for storing the software of OceanBase Database and system logs during the running process. The space must be at least 25 GB.
  • Log directory: the directory for storing OceanBase Database logs. The space must be at least twice the size of the memory, and it is recommended that the space be at least three times the size of the memory.
  • Data directory: the directory for storing data. The space must be at least twice the size of the memory, and it depends on the size of the data to be stored.

Notice

If the capacity of the directory in a mount point exceeds 16 TB, only XFS is supported.

To ensure the stability of the system, we recommend that you use different physical disks for the three directories. If physical resources are limited, OceanBase Database supports using the same disk for the data directory and log directory. However, we do not recommend this for business scenarios with high write pressure.

The IOPS requirements for disks are as follows:

  • If the installation directory, log directory, and data directory are stored in different disks, the IOPS of each disk must be at least 1000.
  • If the installation directory, log directory, and data directory are stored in the same disk, the IOPS of the disk must be at least 3000.

Mount a disk

If your server does not have any disks to be mounted or all disks have been mounted, you can skip this step and proceed to Prepare the directory.

Run the following commands as the root user to mount a disk:

  1. View the disk information

    1. Use the fdisk -l command to identify the available disks and partitions.

      [root@test001 ~]# fdisk -l
      

      The command output is as follows:

      Disk /dev/nvme0n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      
      Disk /dev/nvme1n1: 3.5 TiB, 3840755982336 bytes, 7501476528 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 4096 bytes / 4096 bytes
      
      Disk /dev/sda: 60 GiB, 64424509440 bytes, 125829120 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: gpt
      Disk identifier: 3DC9B58D-90DC-4B90-869A-33592EA28B9E
      
      Device      Start       End   Sectors  Size Type
      /dev/sda1    2048      6143      4096    2M BIOS boot
      /dev/sda2    6144    415743    409600  200M EFI System
      /dev/sda3  415744 125829086 125413343 59.8G Linux filesystem
      
      
      Disk /dev/sdb: 200 GiB, 214748364800 bytes, 419430400 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      
    2. Use the lsblk command to view the disk information.

      [root@test001 ~]# lsblk
      

      The command output is as follows:

      NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
      sda       8:0    0   60G  0 disk
      ├─sda1    8:1    0    2M  0 part
      ├─sda2    8:2    0  200M  0 part /boot/efi
      └─sda3    8:3    0 59.8G  0 part /
      sdb       8:16   0  200G  0 disk /home
      sr0      11:0    1    4M  0 rom
      nvme0n1 259:0    0  3.5T  0 disk
      nvme1n1 259:0    0  3.5T  0 disk
      

    Based on the query results, you can see that the disks to be mounted are /dev/nvme0n1 and /dev/nvme1n1.

  2. Install the LVM tool

    [root@test001 ~]# yum install lvm2
    
  3. Create a physical volume (PV)

    1. Initialize the partition as a PV.

      Notice

      When you initialize a partition as a PV, the partition will be reformatted (data will be lost). Proceed with caution.

      [root@test001 ~]# pvcreate /dev/nvme0n1
      [root@test001 ~]# pvcreate /dev/nvme1n1
      

      The command output is as follows:

      Physical volume "/dev/nvme0n1" successfully created.
      Physical volume "/dev/nvme1n1" successfully created.
      
    2. Verify the PV creation result.

      [root@test001 ~]# pvs
      

      The command output is as follows:

      PV           VG Fmt  Attr PSize PFree
      /dev/nvme0n1    lvm2 ---  3.49t 3.49t
      /dev/nvme1n1    lvm2 ---  3.49t 3.49t
      
  4. Create a volume group (VG)

    1. Merge multiple PVs into one VG.

      [root@test001 ~]# vgcreate vgob1 /dev/nvme0n1
      [root@test001 ~]# vgcreate vgob2 /dev/nvme1n1
      

      The command output is as follows:

      Volume group "vgob1" successfully created
      Volume group "vgob2" successfully created
      
    2. View the VG information.

      [root@test001 ~]# vgs  
      

      The command output is as follows:

      VG   #PV #LV #SN Attr   VSize VFree
      vgob1  1   0   0 wz--n- 3.49t 3.49t
      vgob2  1   0   0 wz--n- 3.49t 3.49t
      
  5. Create a logical volume (LV)

    1. Divide the LV from the VG.

      • Create a data LV.

        [root@test001 ~]# lvcreate -L 2t -n data vgob1
        

        The command output is as follows:

        Logical volume "data" created.
        
      • Create a log LV.

        [root@test001 ~]# lvcreate -L 2t -n log vgob2
        

        The command output is as follows:

        Logical volume "log" created.
        
    2. View the LV information.

      [root@test001 ~]# lvs
      

      The command output is as follows:

      LV   VG    Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
      data vgob1 -wi-a----- 2.00t
      log  vgob2 -wi-a----- 2.00t
      
  6. Format and mount the disk

    1. Format the disk as an EXT4 file system.

      • Format the data LV as an EXT4 file.

        [root@test001 ~]# mkfs.ext4 /dev/vgob1/data
        

        The command output is as follows:

        mke2fs 1.46.0 (29-Jan-2020)
        Discarding device blocks: done
        Creating filesystem with 268435456 4k blocks and 67108864 inodes
        Filesystem UUID: eb4708c8-e3e3-49b4-9444-b9c81d4be84e
        Superblock backups stored on blocks:
              32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
              4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
              102400000, 214990848
        
        Allocating group tables: done
        Writing inode tables: done
        Creating journal (262144 blocks): done
        Writing superblocks and filesystem accounting information: done
        
      • Format the log LV as an EXT4 file.

        [root@test001 ~]# mkfs.ext4 /dev/vgob2/log
        

        The command output is as follows:

        mke2fs 1.46.0 (29-Jan-2020)
        Discarding device blocks: done
        Creating filesystem with 536870912 4k blocks and 134217728 inodes
        Filesystem UUID: c48c39cd-bdb9-4635-9304-721dcf013492
        Superblock backups stored on blocks:
              32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
              4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
              102400000, 214990848, 512000000
        
        Allocating group tables: done
        Writing inode tables: done
        Creating journal (262144 blocks): done
        Writing superblocks and filesystem accounting information: done
        
    2. Create a mount point.

      [root@test001 ~]# mkdir -p /data/log1
      [root@test001 ~]# mkdir -p /data/1
      
    3. Temporarily mount the disk.

      [root@test001 ~]# mount /dev/vgob2/log /data/log1
      [root@test001 ~]# mount /dev/vgob1/data /data/1
      
  7. Set the disk to be automatically mounted at boot.

    Edit the /etc/fstab file and add the mount configuration.

    [root@test001 ~]# vim /etc/fstab
    

    Add the following content to the configuration file:

    /dev/vgob2/log /data/log1  ext4  defaults,noatime,nodiratime,nodelalloc,barrier=0  0  0
    /dev/vgob1/data /data/1  ext4  defaults,noatime,nodiratime,nodelalloc,barrier=0  0  0
    
  8. View the disk mounting status.

    Run the following command to view the disk mounting status.

    [root@test001 ~]# df -h
    

    The command output is as follows. You can see that the disks are mounted to the /data/1 and /data/log1 directories.

    Filesystem             Size  Used Avail Use% Mounted on
    devtmpfs               4.8G     0  4.8G   0% /dev
    tmpfs                  4.8G     0  4.8G   0% /dev/shm
    tmpfs                  4.8G  500K  4.8G   1% /run
    tmpfs                  4.8G     0  4.8G   0% /sys/fs/cgroup
    /dev/sda3               59G  4.8G   52G   9% /
    /dev/sda2              200M  5.8M  195M   3% /boot/efi
    /dev/sdb               196G  3.2G  183G   2% /home
    tmpfs                  970M     0  970M   0% /run/user/1001
    /dev/mapper/vgob1-data 2.0T   28K  1.9T   1% /data/1
    /dev/mapper/vgob2-log  2.0T   28K  1.9T   1% /data/log1
    

Prepare the directories

  • Check the file system type, which is EXT4 or XFS.

    [root@test001 ~]# df -Th
    

    The returned result is as follows:

    Filesystem             Type      Size  Used Avail Use% Mounted on
    devtmpfs               devtmpfs  4.8G     0  4.8G   0% /dev
    tmpfs                  tmpfs     4.8G     0  4.8G   0% /dev/shm
    tmpfs                  tmpfs     4.8G  512K  4.8G   1% /run
    tmpfs                  tmpfs     4.8G     0  4.8G   0% /sys/fs/cgroup
    /dev/sda3              ext4       59G  5.0G   52G   9% /
    /dev/sdb               ext4      196G  113G   74G  61% /home
    /dev/sda2              vfat      200M  5.8M  195M   3% /boot/efi
    /dev/mapper/vgob2-log  ext4     2.0T  2.1G  1.9T   1% /data/log1
    /dev/mapper/vgob1-data ext4      2.0T  2.1G  1.9T   1% /data/1
    tmpfs                  tmpfs     970M     0  970M   0% /run/user/1001
    

    Based on the directory check result, when you deploy the service, set the installation directory to /home, the log storage directory to /data/log1, and the data storage directory to /data/1.

  • Check whether the IOPS of the directory meets the requirements.

    Note

    • Since the installation directory, log storage directory, and data storage directory are on different disks, you need to query the IOPS of each directory. If the installation directory, log storage directory, and data storage directory are on the same disk, you only need to switch to the mount directory of the disk and query the IOPS.

    • If the fio tool is not installed on the server, run the yum install -y fio command to install it.

    • Query the IOPS of the installation directory.

      Switch to the installation directory and run the following command:

      [root@test001 /home]# fio -filename=./testfile -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=20G -numjobs=1 -runtime=180 -group_reporting -name=sqe_100write_4k --fsync=1 --fallocate=posix
      

      The returned result is as follows:

      sqe_100write_4k: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
      fio-3.34
      Starting 1 thread
      Jobs: 1 (f=1): [W(1)][100.0%][w=6648KiB/s][w=1662 IOPS][eta 00m:00s]
      sqe_100write_4k: (groupid=0, jobs=1): err= 0: pid=145805: Thu May  8 10:39:32 2025
      write: IOPS=2012, BW=8051KiB/s (8244kB/s)(1415MiB/180001msec); 0 zone resets
         clat (usec): min=84, max=3732, avg=174.51, stdev=71.93
         lat (usec): min=84, max=3732, avg=174.77, stdev=71.98
         clat percentiles (usec):
         |  1.00th=[   89],  5.00th=[   90], 10.00th=[   91], 20.00th=[   95],
         | 30.00th=[  100], 40.00th=[  141], 50.00th=[  184], 60.00th=[  210],
         | 70.00th=[  221], 80.00th=[  231], 90.00th=[  265], 95.00th=[  285],
         | 99.00th=[  351], 99.50th=[  371], 99.90th=[  441], 99.95th=[  515],
         | 99.99th=[  824]
         bw (  KiB/s): min= 3432, max=17608, per=100.00%, avg=8056.18, stdev=4234.76, samples=359
         iops        : min=  858, max= 4402, avg=2014.04, stdev=1058.69, samples=359
      lat (usec)   : 100=30.58%, 250=57.09%, 500=12.28%, 750=0.04%, 1000=0.02%
      lat (msec)   : 2=0.01%, 4=0.01%
      fsync/fdatasync/sync_file_range:
         sync (usec): min=64, max=5690, avg=319.43, stdev=230.86
         sync percentiles (usec):
         |  1.00th=[   68],  5.00th=[   69], 10.00th=[   70], 20.00th=[   72],
         | 30.00th=[   95], 40.00th=[  194], 50.00th=[  379], 60.00th=[  412],
         | 70.00th=[  457], 80.00th=[  474], 90.00th=[  578], 95.00th=[  685],
         | 99.00th=[  996], 99.50th=[ 1205], 99.90th=[ 1336], 99.95th=[ 1385],
         | 99.99th=[ 1713]
      cpu          : usr=0.86%, sys=11.80%, ctx=714705, majf=0, minf=0
      IO depths    : 1=200.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         issued rwts: total=0,362308,0,362308 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=1
      
      Run status group 0 (all jobs):
      WRITE: bw=8051KiB/s (8244kB/s), 8051KiB/s-8051KiB/s (8244kB/s-8244kB/s), io=1415MiB (1484MB), run=180001-180001msec
      
      Disk stats (read/write):
      sdb: ios=0/935811, merge=0/335611, ticks=0/164939, in_queue=217509, util=99.97%
      

      After you run the preceding command, delete the testfile file in the directory to prevent the disk space from being insufficient.

      [root@test001 /home]# rm -rf testfile
      
    • Query the IOPS of the log storage directory.

      Switch to the log storage directory and run the following command:

      [root@test001 /data/log1]# fio -filename=./testfile -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=20G -numjobs=1 -runtime=180 -group_reporting -name=sqe_100write_4k --fsync=1 --fallocate=posix
      

      The returned result is as follows:

      sqe_100write_4k: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
      fio-3.34
      Starting 1 thread
      Jobs: 1 (f=1): [W(1)][100.0%][w=6648KiB/s][w=1662 IOPS][eta 00m:00s]
      sqe_100write_4k: (groupid=0, jobs=1): err= 0: pid=145805: Thu May  8 10:39:32 2025
      write: IOPS=2012, BW=8051KiB/s (8244kB/s)(1415MiB/180001msec); 0 zone resets
         clat (usec): min=84, max=3732, avg=174.51, stdev=71.93
         lat (usec): min=84, max=3732, avg=174.77, stdev=71.98
         clat percentiles (usec):
         |  1.00th=[   89],  5.00th=[   90], 10.00th=[   91], 20.00th=[   95],
         | 30.00th=[  100], 40.00th=[  141], 50.00th=[  184], 60.00th=[  210],
         | 70.00th=[  221], 80.00th=[  231], 90.00th=[  265], 95.00th=[  285],
         | 99.00th=[  351], 99.50th=[  371], 99.90th=[  441], 99.95th=[  515],
         | 99.99th=[  824]
         bw (  KiB/s): min= 3432, max=17608, per=100.00%, avg=8056.18, stdev=4234.76, samples=359
         iops        : min=  858, max= 4402, avg=2014.04, stdev=1058.69, samples=359
      lat (usec)   : 100=30.58%, 250=57.09%, 500=12.28%, 750=0.04%, 1000=0.02%
      lat (msec)   : 2=0.01%, 4=0.01%
      fsync/fdatasync/sync_file_range:
         sync (usec): min=64, max=5690, avg=319.43, stdev=230.86
         sync percentiles (usec):
         |  1.00th=[   68],  5.00th=[   69], 10.00th=[   70], 20.00th=[   72],
         | 30.00th=[   95], 40.00th=[  194], 50.00th=[  379], 60.00th=[  412],
         | 70.00th=[  457], 80.00th=[  474], 90.00th=[  578], 95.00th=[  685],
         | 99.00th=[  996], 99.50th=[ 1205], 99.90th=[ 1336], 99.95th=[ 1385],
         | 99.99th=[ 1713]
      cpu          : usr=0.86%, sys=11.80%, ctx=714705, majf=0, minf=0
      IO depths    : 1=200.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         issued rwts: total=0,362308,0,362308 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=1
      
      Run status group 0 (all jobs):
      WRITE: bw=8051KiB/s (8244kB/s), 8051KiB/s-8051KiB/s (8244kB/s-8244kB/s), io=1415MiB (1484MB), run=180001-180001msec
      
      Disk stats (read/write):
      sdb: ios=0/935811, merge=0/335611, ticks=0/164939, in_queue=217509, util=99.97%
      

      After you run the preceding command, delete the testfile file in the directory to prevent the disk space from being insufficient.

      [root@test001 /data/log1]# rm -rf testfile
      
    • Query the IOPS of the data storage directory.

      Switch to the data storage directory and run the following command:

      [root@test001 /data/1]# fio -filename=./testfile -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=4k -size=20G -numjobs=1 -runtime=180 -group_reporting -name=sqe_100write_4k --fsync=1 --fallocate=posix
      

      The returned result is as follows:

      sqe_100write_4k: (g=0): rw=write, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=psync, iodepth=1
      fio-3.34
      Starting 1 thread
      Jobs: 1 (f=1): [W(1)][100.0%][w=6648KiB/s][w=1662 IOPS][eta 00m:00s]
      sqe_100write_4k: (groupid=0, jobs=1): err= 0: pid=145805: Thu May  8 10:39:32 2025
      write: IOPS=2012, BW=8051KiB/s (8244kB/s)(1415MiB/180001msec); 0 zone resets
         clat (usec): min=84, max=3732, avg=174.51, stdev=71.93
         lat (usec): min=84, max=3732, avg=174.77, stdev=71.98
         clat percentiles (usec):
         |  1.00th=[   89],  5.00th=[   90], 10.00th=[   91], 20.00th=[   95],
         | 30.00th=[  100], 40.00th=[  141], 50.00th=[  184], 60.00th=[  210],
         | 70.00th=[  221], 80.00th=[  231], 90.00th=[  265], 95.00th=[  285],
         | 99.00th=[  351], 99.50th=[  371], 99.90th=[  441], 99.95th=[  515],
         | 99.99th=[  824]
         bw (  KiB/s): min= 3432, max=17608, per=100.00%, avg=8056.18, stdev=4234.76, samples=359
         iops        : min=  858, max= 4402, avg=2014.04, stdev=1058.69, samples=359
      lat (usec)   : 100=30.58%, 250=57.09%, 500=12.28%, 750=0.04%, 1000=0.02%
      lat (msec)   : 2=0.01%, 4=0.01%
      fsync/fdatasync/sync_file_range:
         sync (usec): min=64, max=5690, avg=319.43, stdev=230.86
         sync percentiles (usec):
         |  1.00th=[   68],  5.00th=[   69], 10.00th=[   70], 20.00th=[   72],
         | 30.00th=[   95], 40.00th=[  194], 50.00th=[  379], 60.00th=[  412],
         | 70.00th=[  457], 80.00th=[  474], 90.00th=[  578], 95.00th=[  685],
         | 99.00th=[  996], 99.50th=[ 1205], 99.90th=[ 1336], 99.95th=[ 1385],
         | 99.99th=[ 1713]
      cpu          : usr=0.86%, sys=11.80%, ctx=714705, majf=0, minf=0
      IO depths    : 1=200.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
         submit    : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         complete  : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
         issued rwts: total=0,362308,0,362308 short=0,0,0,0 dropped=0,0,0,0
         latency   : target=0, window=0, percentile=100.00%, depth=1
      
      Run status group 0 (all jobs):
      WRITE: bw=8051KiB/s (8244kB/s), 8051KiB/s-8051KiB/s (8244kB/s-8244kB/s), io=1415MiB (1484MB), run=180001-180001msec
      
      Disk stats (read/write):
      sdb: ios=0/935811, merge=0/335611, ticks=0/164939, in_queue=217509, util=99.97%
      

      After you run the preceding command, delete the testfile file in the directory to prevent the disk space from being insufficient.

      [root@test001 /data/1]# rm -rf testfile
      

    Based on the query result, the IOPS of each disk meets the requirements.

User and parameter configuration

Before deployment, you must perform the following configurations on the host:

  • Create a user

    Note

    It is not recommended to deploy OceanBase Database as the root user. We recommend that you create a user for deployment. We recommend that you use the admin user. The user must be the owner of the directories related to the database.

  • Configure limits.conf

  • Configure sysctl.conf

  • Disable the firewall and SELinux

obd supports using the host commands to initialize a host and its corresponding user. You can choose to configure the preceding items by using the obd commands or manually configure them. We recommend that you configure them by using the obd commands.

Use obd commands
Manually configure
  1. Install obd

    Run the following command to install obd online. You can also visit OceanBase Download Center to download the obd package and install it by using the package. For more information about how to install obd, see Install obd.

    Note

    The interactive deployment command is a new feature in obd V3.4.0. You must install obd V3.4.0 or later.

    Install yum-utils:

    [root@test001 ~]$ yum install -y yum-utils
    

    Add the OceanBase image source:

    [root@test001 ~]$ yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
    

    Install obd by default. The latest version is installed:

    [root@test001 ~]$ yum install -y ob-deploy
    

    Configure the application environment:

    [root@test001 ~]$ source /etc/profile.d/obd.sh
    

    Note

    If you want to deploy OceanBase Database Enterprise Edition, contact Technical Support to obtain the installation package, and run the obd mirror clone command to upload the installation package to the local image library of obd. After the installation package is uploaded, run the obd mirror list local command to view the installation package in the local image library.

  2. Create and initialize a user

    Note

    The initialization user command is a new feature in obd V3.5.0. For more information, see the obd host user init section in Host commands.

    [root@test001 ~]$ obd host user init -u admin --host=10.10.10.1 -p ********
    

    The following example creates and initializes the admin user on the 10.10.10.1 server. You need to configure the user to be created and initialized (-u), the IP address of the host where the user is to be created (--host), and the user password (-p) based on your actual situation.

    When the command is executed, it will first attempt to log in to the target server (10.10.10.1) using the specified user (in this example, admin). If the connection fails, you need to provide a user with sudo privileges and their password. obd will use the provided user to log in to the target server and perform the following initialization operations on the specified user:

    • Set the ulimit parameter: Modify the system resource limit parameters. After the user is created, you can log in to the target server as the created user and run the ulimit -a command to check whether the configuration is effective.

    • Configure passwordless sudo permissions: Grant the specified user the permission to execute sudo commands without a password.

      Note

      Configuring passwordless sudo permissions facilitates operations. You can manually disable sudo passwordless permissions after the cluster is deployed.

    • Enable password login: Ensure that the user can log in to the system using a password.

    • Change the directory owner: If the /data/1 and /data/log1 directories exist on the target server, change the owner of these directories to the specified user.

  3. Initialize the host

    [root@test001 ~]$ obd host init admin 10.10.10.1 -p ********
    

    The following example uses the admin user to log in to the 10.10.10.1 server and perform initialization operations. You need to configure the login user, the IP address of the host to be initialized, and the login user password (-p) based on your actual situation. For more information about the command, see the obd host init section in Host commands.

    This command automatically modifies the recommended kernel parameters for deploying OceanBase Database, disables the firewall and SELinux, changes the owner of the /data/1 and /data/log1 directories (if they exist), and installs the network component. For more information about the kernel parameters that are modified, see Configure sysctl.conf in the OceanBase Database documentation.

    The output is as follows:

    get system config ok
    +-------------------------------------------------------------------------------------------------+
    |                                   System Parameter Change List                                  |
    +---------------+-------------------------------------------+---------------+---------------------+
    | ip            | name                                      | current_value | expected_value      |
    +---------------+-------------------------------------------+---------------+---------------------+
    | 10.10.10.1    | fs.aio-max-nr                             | 65536         | 1048576             |
    | 10.10.10.1    | net.core.somaxconn                        | 128           | 2048                |
    | 10.10.10.1    | net.core.netdev_max_backlog               | 1000          | 10000               |
    | 10.10.10.1    | net.core.rmem_default                     | 212992        | 16777216            |
    | 10.10.10.1    | net.core.wmem_default                     | 212992        | 16777216            |
    | 10.10.10.1    | net.core.rmem_max                         | 212992        | 16777216            |
    | 10.10.10.1    | net.core.wmem_max                         | 212992        | 16777216            |
    | 10.10.10.1    | net.ipv4.conf.default.rp_filter           | 0             | 1                   |
    | 10.10.10.1    | net.ipv4.conf.default.accept_source_route | 1             | 0                   |
    | 10.10.10.1    | net.ipv4.tcp_rmem                         | 6291456       | 4096 87380 16777216 |
    | 10.10.10.1    | net.ipv4.tcp_wmem                         | 16384         | 4096 65536 16777216 |
    | 10.10.10.1    | net.ipv4.tcp_max_syn_backlog              | 1024          | 16384               |
    | 10.10.10.1    | net.ipv4.tcp_fin_timeout                  | 60            | 15                  |
    | 10.10.10.1    | vm.min_free_kbytes                        | 67584         | 2097152             |
    | 10.10.10.1    | fs.file-max                               | 3205772       | 6573688             |
    | 10.10.10.1    | fs.pipe-user-pages-soft                   | 16384         | 0                   |
    | 10.10.10.1    | vm.max_map_count                          | 65530         | 655360              |
    | 10.10.10.1    | nofile                                    | 65535         | 655350              |
    +---------------+-------------------------------------------+---------------+---------------------+
    chown dir ok
    modify system parameters
    10.10.10.1: ( fs.aio-max-nr,net.core.somaxconn,net.core.netdev_max_backlog,net.core.rmem_default,net.core.wmem_default... ) have been successfully modified!
    You must reboot the following servers to ensure the ulimit parameters take effect: (10.10.10.1).
    Trace ID: f9491158-71db-11f0-81f0-00163e513302
    If you want to view detailed obd logs, please run: obd display-trace f9491158-71db-11f0-81f0-00163e513302
    
  4. View the admin user information

    [root@test001 ~]$ sudo -l -U admin
    

    The following result indicates that the admin user has passwordless sudo permissions.

    Matching Defaults entries for admin on test001:
        !visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE
        KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION
        LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE
        LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin
    
    User admin may run the following commands on test001:
        (ALL) NOPASSWD: ALL
    
    
  5. Verify whether the ulimit configuration takes effect

    Run the following command as the admin user to check whether the configuration takes effect.

    [admin@test001 ~]# ulimit -a
    

    The output is as follows:

    core file size          (blocks, -c) unlimited
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 252876
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 655350
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) unlimited
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 655360
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    

    In the preceding query result, check the following fields:

    • core file size indicates the maximum threshold for core files in blocks, corresponding to the core parameter in the limits.conf configuration file. Check if the value is unlimited.

    • open files indicates the maximum number of open file descriptors, corresponding to the nofile parameter in the limits.conf configuration file. Check if the value is 655350.

    • stack size indicates the stack size in kilobytes, corresponding to the stack parameter in the limits.conf configuration file. Check if the value is unlimited.

    • max user processes indicates the maximum number of user processes, corresponding to the nproc parameter in the limits.conf configuration file. Check if the value is 655360.

  6. Verify other configurations

    You can execute the obd host precheck command to check whether the host meets the requirements. This command checks for kernel parameters that differ from the recommended values in the sysctl.conf file, whether the firewall and SELinux features are disabled, and whether the owners of the /data/1 and /data/log1 directories are the specified users. For more information, see the obd host precheck section in Host commands.

    obd host precheck admin 10.10.10.1 -p ********
    

    If all checks pass, the output is as follows:

    get system config ok
    No need to change system parameters
    Please run `obd host user init -u admin --host=10.10.10.1` to init user.
    Please run `obd host init admin 10.10.10.1 -p *******` to init host.
    Trace ID: 22baecfe-71d8-11f0-9467-00163e513302
    If you want to view detailed obd logs, please run: obd display-trace 22baecfe-71d8-11f0-9467-00163e513302
    

    If any checks fail, the output will display the corresponding information. In this case, you can execute the obd host user init or obd host init command to initialize the host. An example of a failed check is as follows:

    get system config ok
    [WARN] The owner of the ['/data/1', '/data/log1'] directory is not admin.
    No need to change system parameters
    Please run `obd host user init -u admin --host=10.10.10.1` to init user.
    Please run `obd host init admin 10.10.10.1 -p *******` to init host.
    Trace ID: 4dcae674-7be2-11f0-a2bc-00163e53f118
    If you want to view detailed obd logs, please run: obd display-trace 4dcae674-7be2-11f0-a2bc-00163e53f118
    

Create a user

It is not recommended to deploy OceanBase Database as the root user. Instead, it is recommended to create a separate user for deployment, such as the admin user. The user must be the owner of the directories related to the database.

  1. Execute the following commands to create the admin user group and the admin user.

    [root@test001 ~]# useradd -U admin -d /home/admin -s /bin/bash
    
  2. Execute the following command to set a password for the admin user.

    [root@test001 ~]# passwd admin
    
  3. Grant sudo privileges to the admin user.

    Note

    Granting sudo privileges to the admin user is not mandatory. It is optional and can be done based on your enterprise's security policies.

    Add write permissions to the /etc/sudoers file:

    [root@test001 ~]# chmod u+w /etc/sudoers
    

    Execute the following command to open the /etc/sudoers file:

    [root@test001 ~]# vim /etc/sudoers
    

    Add the following content at the end of the /etc/sudoers file:

    ## Same thing without a password
    # %wheel        ALL=(ALL)       NOPASSWD: ALL
    admin       ALL=(ALL)       NOPASSWD: ALL
    
  4. View the details of the admin user.

    sudo -l -U admin
    

    The output is as follows, indicating that the admin user has sudo privileges without a password.

    Matching Defaults entries for admin on test001:
        !visiblepw, always_set_home, match_group_by_gid, always_query_group_plugin, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE
        KDEDIR LS_COLORS", env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE LC_IDENTIFICATION
        LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE
        LINGUAS _XKB_CHARSET XAUTHORITY", secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin
    
    User admin may run the following commands on test001:
        (ALL) NOPASSWD: ALL
    
  5. Set directory permissions.

    The user deploying OceanBase Database must be the owner of the directories related to the database. Execute the following command to change the owner of the directory corresponding to the disk mount to admin.

    [root@test001 ~]# chown -R admin:admin /data/log1
    [root@test001 ~]# chown -R admin:admin /data/1
    
  6. Verify the directory permissions.

    Switch to the /data directory to check the directory permissions.

    [root@test001 /data]# ls -al
    

    The output is as follows, indicating that the owners of the /data/1 and /data/log1 directories are the admin user.

    total 20
    drwxr-xr-x   5 root  root  4096 Apr 29 15:39 .
    dr-xr-xr-x. 20 root  root  4096 Apr 29 15:39 ..
    drwxr-xr-x   2 root  root  4096 Apr 28 15:28 0
    drwxr-xr-x   3 admin admin 4096 Apr 29 15:25 1
    drwxr-xr-x   3 admin admin 4096 Apr 29 15:25 log1
    

Configure limits.conf

Configure the limits.conf file as the admin user. The specific steps are as follows:

  1. Open the /etc/security/limits.conf file for configuration.

    [admin@test001 ~]# sudo vim /etc/security/limits.conf
    

    Add the following content to the /etc/security/limits.conf file:

    * soft nofile 655350
    * hard nofile 655350
    * soft stack unlimited
    * hard stack unlimited
    * soft nproc 655360
    * hard nproc 655360
    * soft core unlimited
    * hard core unlimited
    
  2. Restart the machine.

    [admin@test001 ~]# sudo reboot
    
  3. Connect to the machine again and execute the following command to check if the configuration is effective.

    [admin@test001 ~]# ulimit -a
    

    The output is as follows:

    core file size          (blocks, -c) unlimited
    data seg size           (kbytes, -d) unlimited
    scheduling priority             (-e) 0
    file size               (blocks, -f) unlimited
    pending signals                 (-i) 252876
    max locked memory       (kbytes, -l) 64
    max memory size         (kbytes, -m) unlimited
    open files                      (-n) 655350
    pipe size            (512 bytes, -p) 8
    POSIX message queues     (bytes, -q) 819200
    real-time priority              (-r) 0
    stack size              (kbytes, -s) unlimited
    cpu time               (seconds, -t) unlimited
    max user processes              (-u) 655360
    virtual memory          (kbytes, -v) unlimited
    file locks                      (-x) unlimited
    

    In the query result above, check the following fields:

    • core file size indicates the maximum threshold for core files in blocks, corresponding to the core parameter in the limits.conf configuration file. Check if the value is unlimited.

    • open files indicates the maximum number of open file descriptors, corresponding to the nofile parameter in the limits.conf configuration file. Check if the value is 655350.

    • stack size indicates the stack size in kilobytes, corresponding to the stack parameter in the limits.conf configuration file. Check if the value is unlimited.

    • max user processes indicates the maximum number of user processes, corresponding to the nproc parameter in the limits.conf configuration file. Check if the value is 655360.

Configure sysctl.conf

Execute the following command as the admin user to open the /etc/sysctl.conf file:

[admin@test001 ~]# sudo vim /etc/sysctl.conf

Add the following content to the /etc/sysctl.conf file:


# for oceanbase

## Modify the kernel's asynchronous I/O limit

fs.aio-max-nr = 1048576

## Optimize the network

net.core.somaxconn = 2048
net.core.netdev_max_backlog = 10000
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216

net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.ipv4.tcp_max_syn_backlog = 16384
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_slow_start_after_idle=0

vm.swappiness = 0
vm.min_free_kbytes = 2097152
vm.overcommit_memory = 0

fs.file-max = 6573688
fs.pipe-user-pages-soft = 0

# Modify the number of virtual memory regions that can be owned by a process

vm.max_map_count = 655360

# Configure the filename format and directory for core files

kernel.core_pattern = /data/core-%e-%p-%t

After you change the configuration, run the following commands to load the configuration and make it effective:

[admin@test001 ~]# sudo sysctl -p

Descriptions

When the kernel parameter net.ipv4.ip_forward is set to 0, IP forwarding is disabled. If OceanBase Database is deployed on the same host as another Docker container, the IP forwarding feature is required for network communication between the container and the external network. Therefore, to enable network communication, we recommend that you run the following command to enable IP forwarding:

  • Temporary effective: sysctl -w net.ipv4.ip_forward=1
  • Permanently effective: configure net.ipv4.ip_forward=1 in the /etc/sysctl.conf file and execute the sysctl -p command to apply the changes.

Disable firewalls and SELinux

Continue with the following steps under the admin user, to disable firewall and SELinux.

  • Disable the firewall

    Run the following commands in sequence to shut down the firewall:

    [admin@test001 ~]# sudo systemctl disable firewalld 
    [admin@test001 ~]# sudo systemctl stop firewalld
    

    You can run the systemctl status firewalld command after the service is stopped to view the firewall status, which is shown as follows:

    firewalld.service - firewalld - dynamic firewall daemon
    Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
    Active: inactive (dead)
      Docs: man:firewalld(1)
    
  • Disable SELinux

    Run the following command to open the /etc/selinux/config configuration file:

    [admin@test001 ~]# sudo vim /etc/selinux/config
    

    In the /etc/selinux/config configuration file, modify the corresponding configuration item as follows:

    SELINUX=disabled
    

    Execute the following command or restart the server to make the changes take effect:

    [admin@test001 ~]# setenforce 0
    

    Run the following command to verify that the changes take effect:

    sestatus
    

    The following information is returned, indicating that SELinux has been disabled.

    SELinux status:                 disabled
    

Deploy Community Edition interactively by using obd

  1. (Optional) Install Obd.

    Details

    If manual configuration is adopted in the User and Parameter Configuration section, install obd by following the instructions in this section.

    Run the following command to install obd in online mode. You can also visit OceanBase Download Center to download an obd package, and then install the obd package. For more information about installing obd, see Install obd.

    Note

    The interactive deployment command is a new feature in obd V3.4.0. You need to install obd V3.4.0 or later.

    Install yum-utils:

    [admin@test001 ~]$ sudo yum install -y yum-utils
    

    Add the OceanBase image repository:

    [admin@test001 ~]$ sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
    

    Install obd and install the latest version by default:

    [admin@test001 ~]$ sudo yum install -y ob-deploy
    

    Configure application environment:

    [admin@test001 ~]$ source /etc/profile.d/obd.sh
    

    Note

    If you want to deploy OceanBase Database Enterprise Edition, contact Technical Support to obtain the installation package. You can execute the obd mirror clone command to upload it to the local image library of obd. After the upload is complete, you can execute the obd mirror list local command to view the installed package in the local image library.

  2. Start an interactive deployment installation

    Run the following command to launch the interactive installation process.

    [admin@test001 ~]$ obd cluster deploy -i
    
  3. Fill in deployment information

    After you enter the interactive installation mode, you can input the information about the OceanBase cluster to be installed in the corresponding positions or click the Enter key on your keyboard to use the default values. For information about how to configure these parameters, see the Interactive deployment of an OceanBase cluster section in the Deploy an OceanBase cluster topic.

    Enter the IP (Default: 10.10.10.1):
    Enter the current user password:
    get system config ok
    No need to change system parameters
    Enter the cluster name (Default: myoceanbase; allowed characters: letters, numbers, and underscores):
    Update OceanBase-community-stable-el8 ok
    Update OceanBase-development-kit-el8 ok
    +-----------------------------------------------------------------------------------------------------------------------------+
    |                                                     Available Oceanbase                                                     |
    +--------------+---------+------------------------+--------+------------------------------------------------------------------+
    | name         | version | release                | arch   | md5                                                              |
    +--------------+---------+------------------------+--------+------------------------------------------------------------------+
    | oceanbase-ce | 4.3.5.2 | 102020032025070315.el8 | x86_64 | 0778757f3625ec77948e28c741829d60ea89e29b3292986dd087350955306669 |
    | oceanbase-ce | 4.3.5.1 | 101020012025061620.el8 | x86_64 | a067be5c5813be78992f813d9fa1d0d48f1e319181aaa45076fdaee6f618e20d |
    | oceanbase-ce | 4.3.5.0 | 100000202024123117.el8 | x86_64 | b7e92480ae40bc64d4c74de94a5f9a834faf8d06d4ace968cebcb0927e81ff65 |
    | oceanbase-ce | 4.3.4.1 | 101000032024121814.el8 | x86_64 | 23103fca1bb9217aad84fe1a0f5cdbca06e70d64d45ec89cb1a937d11f8e27ee |
    | oceanbase-ce | 4.3.4.0 | 100000162024110717.el8 | x86_64 | 47023304cdd9721bb90bf3f0bb996e78fff87c984068628139b5b8e9eb465e9b |
    +--------------+---------+------------------------+--------+------------------------------------------------------------------+
    ......
    Are you sure to deploy using this latest version(4.3.5.2) of Oceanbase.:  [y/n] [Default: y]:
    Enter the OB SQL port (Default: 2881):
    Enter the OB RPC port (Default: 2882):
    Enter the obshell port (Default: 2886):
    Enter the OB root password (Default: **********):
    Enter the OB cpu count (Default: 8):
    Enter the OB memory limit (Configurable Range[6, 25], Default: 25, Unit: G): 8
    Enter the OB installation directory (Default: /home/admin/myoceanbase):
    Enter the OB data directory (Default: /data/1/myoceanbase):
    Enter the OB log directory (Default: /data/log1/myoceanbase):
    Cluster optimization scenario not specified, please specify the scenario you want to optimize.
    1. express_oltp
    2. complex_oltp
    3. olap
    4. htap (default)
    5. kv
    Please input the scenario you want to optimize [default: 4]:
    Enter the log disk size (Configurable Range[16, 108], Default: 108 , unit: G): 50
    Enter the datafile maxsize (Configurable Range[16, 146], Default: 146 , unit: G): 50
    Do you want to enable the OceanBase service to start automatically when the system boots up? [y/n] [Default: n]: y
    Do you want to create tenant for your business workload? [y/n] [Default: y]:
    Tenant: sys conifguration: 2C/2G/3G(CPU/Memory/Log disk)
    system_memory configuration(Unit: G): 1G
    Enter the tenant name (Default: test; allowed characters: letters, numbers, and underscores):
    Enter the tenant password:
    Confirm the tenant password:
    Enter the tenant cpu (Configurable Range[1, 6], Default: 6 ): 2
    Enter the tenant memory (Configurable Range[2, 5], Default: 5 , unit: G): 3
    Enter the tenant log disk size (Configurable Range[8, 19], Default: 8 , unit: G):
        Please select the character (enter the corresponding number):
        1) utf8mb4
        2) utf16
        3) gbk
        4) gb18030
        5) binary
    Enter the tenant charset (Default: 1):
        Please select the tenant collation (enter the corresponding number):
        1) utf8mb4_general_ci
        2) utf8mb4_bin
        3) utf8mb4_unicode_ci
        4) utf8mb4_unicode_520_ci
        5) utf8mb4_croatian_ci
        6) utf8mb4_czech_ci
        7) utf8mb4_0900_ai_ci
    Enter the tenant collation (Default: 1):
        Please select the tenant time zone (enter the corresponding number):
        1) -12:00(International Date Line West)
        2) -11:00(Samoa Standard Time)
        3) -10:00(Hawaii-Aleutian Standard Time)
        4) -09:00(Alaska Standard Time)
        5) -08:00(Pacific Standard Time)
        6) -07:00(Mountain Standard Time)
        7) -06:00(Central Standard Time)
        8) -05:00(Eastern Standard Time)
        9) -04:00(Atlantic Standard Time)
        10) -03:00(Brasilia Standard Time)
        11) -02:00(Mid-Atlantic Standard Time)
        12) -01:00(Azores Standard Time)
        13) +00:00(Greenwich Mean Time)
        14) +01:00(Central European Time)
        15) +02:00(Eastern European Time)
        16) +03:00(Moscow Standard Time)
        17) +04:00(Gulf Standard Time)
        18) +05:00(Pakistan Standard Time)
        19) +06:00(Bangladesh Standard Time)
        20) +07:00(Indochina Time)
        21) +08:00(China Standard Time)
        22) +09:00(Japan Standard Time)
        23) +10:00(Australian Eastern Standard Time)
        24) +11:00(Solomon Islands Time)
        25) +12:00(New Zealand Standard Time)
        26) +13:00(Tonga Standard Time)
        27) +14:00(Line Islands Time)
    Enter the tenant time zone (Default: 21):
       Please select case sensitivity for table names:
        0) Table names are stored as specified and compared case-sensitively
        1) Table names are stored in lowercase and compared case-insensitively
        2) Table names are stored as specified but compared case-insensitively
    Please enter your choice [0/1/2] [default 1]:
    Do you need to install the monitoring components (OBAgent, Prometheus, Grafana)? [y/n] [Default: n]:
    
    #Saved configurations:
    cluster name: myoceanbase
    mysql port: 2881
    rpc port: 2882
    obshell port: 2886
    cpu count: 8
    memory limit: 8G
    home path: /home/admin/myoceanbase/oceanbase_name
    data dir: /data/1/myoceanbase
    log dir: /data/log1/myoceanbase
    datafile maxsize: 50G
    log disk size: 50G
    tenant name: test
    tenant cpu: 2
    tenant memory: 3G
    tenant log disk size: 8G
    Are you sure these configurations are correct? [y/n] [Default: y]:
    Configuration confirmed.
    Do you want to enable encryption for password security (default_encryption_passkey: 123456)? [y/n] [Default: n]:
    

    After you enter the information above, the database is automatically installed. The following is the returned message:

    Download oceanbase-ce-4.3.5.2-102020032025070315.el8.x86_64.rpm (176.15 M): 100% [######################################] Time: 0:00:13  13.54 MB/s
    Package oceanbase-ce-4.3.5.2-102020032025070315.el8 is available.
    install oceanbase-ce-4.3.5.2 for local ok
    Cluster param config check ok
    Open ssh connection ok
    +--------------------------------------------------------------------------------------------+
    |                                          Packages                                          |
    +--------------+---------+------------------------+------------------------------------------+
    | Repository   | Version | Release                | Md5                                      |
    +--------------+---------+------------------------+------------------------------------------+
    | oceanbase-ce | 4.3.5.2 | 102020032025070315.el8 | aa96be2d5ca3af734e18538215d27bc4cdbc7103 |
    +--------------+---------+------------------------+------------------------------------------+
    Repository integrity check ok
    Load param plugin ok
    Open ssh connection ok
    Initializes observer work home ok
    Parameter check ok
    Remote oceanbase-ce-4.3.5.2-102020032025070315.el8-aa96be2d5ca3af734e18538215d27bc4cdbc7103 repository install ok
    Remote oceanbase-ce-4.3.5.2-102020032025070315.el8-aa96be2d5ca3af734e18538215d27bc4cdbc7103 repository lib check ok
    myoceanbase deployed
    Get local repositories ok
    Load cluster param plugin ok
    Open ssh connection ok
    cluster scenario: htap
    Start observer ok
    observer program health check ok
    Connect to observer 10.10.10.1:2881 ok
    oceanbase bootstrap ok
    obshell start ok
    obshell program health check ok
    obshell bootstrap ok
    Connect to observer 10.10.10.1:2881 ok
    Wait for observer init ok
    +------------------------------------------------+
    |                  oceanbase-ce                  |
    +--------------+---------+------+-------+--------+
    | ip           | version | port | zone  | status |
    +--------------+---------+------+-------+--------+
    | 10.10.10.1   | 4.3.5.2 | 2881 | zone1 | ACTIVE |
    +--------------+---------+------+-------+--------+
    obclient -h10.10.10.1 -P2881 -uroot@sys -p'********' -Doceanbase -A
    
    cluster unique id: 581b3664-aafe-53ec-a2fb-97b3877f6213-19812bdde29-02050304
    
    myoceanbase running
    Get local repositories ok
    Open ssh connection ok
    Connect to observer 10.10.10.1:2881 ok
    Create tenant test ok
    obclient -h10.10.10.1 -P'2881' -p'********' -uroot@test -Doceanbase -A
    
    optimize tenant with scenario: htap ok
    See **OceanBase Deployer error codes** .
    Trace ID: a90ff494-622d-11f0-aa9c-00163e1c7562
    If you want to view detailed obd logs, please run: obd display-trace a90ff494-622d-11f0-aa9c-00163e1c7562
    
  4. Verify the deployment result

    • Log in to the sys tenant.

      Use the connection string returned in the preceding deployment result to connect to the sys tenant of OceanBase Database.

      obclient -h10.10.10.1 -P2881 -uroot@sys -p'******' -Doceanbase -A
      

      Response: The response will be in the following format: {"access_token": "string", "expires_in": "integer"} The fields are described as follows: access_token A string that contains the token to be used for API calls. For example: "x579829a427a3c22d8b822c2e93445a1b". expires_in An integer that specifies the number of seconds until the token expires. For example: 3600.

      Welcome to the OceanBase.  Commands end with ; or \g.
      Your OceanBase connection id is 3221540622
      Server version: OceanBase_CE 4.3.5.2 (r102020032025070315-563ee271f78ff8521c8e0e09ae682065b065a046) (Built Jul  3 2025 15:53:52)
      
      Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      obclient(root@sys)[oceanbase]>
      
    • Log in as an enterprise user.

      Use the connection string obtained from the deployment result to connect to the tenant you created.

      obclient -h10.10.10.1 -P'2881' -p'********' -uroot@test -Doceanbase -A
      

      The output is as follows:

      Welcome to the OceanBase.  Commands end with ; or \g.
      Your OceanBase connection id is 3221547518
      Server version: OceanBase_CE 4.3.5.2 (r102020032025070315-563ee271f78ff8521c8e0e09ae682065b065a046) (Built Jul  3 2025 15:53:52)
      
      Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      obclient(root@test)[oceanbase]>
      

    The database is accessible, indicating that the deployment is successful.

Related Documents

  • For more information about the interactive deployment of OceanBase Database, see Deploy OceanBase Database cluster.

Previous topic

OceanBase Deployer V1.2.0
Last

Next topic

Deploy a Community Edition cluster using the obd graphical interface
Next
What is on this page
Server configuration
Check the server's soft and hardware configurations
Hardware requirements
Software requirements
Preparations before deployment
Plan the directories
User and parameter configuration
Deploy Community Edition interactively by using obd
Related Documents