Skip to main content
Version: V1.1.0

Deploy seekdb with package managers

This topic describes how to deploy seekdb using your system's package manager.

Prerequisites

Before you begin, ensure that:

  • Your system is RPM-based. The following distributions are currently supported:

    • Anolis OS 8.x (Linux kernel 4.19 or later)

    • Anolis OS 23.x (Linux kernel 6.6 or later)

    • CentOS Linux 7.x and 9.x (Linux kernel 4.19 or later)

    • openEuler 22.03 and 24.03 (Linux kernel 5.10.0 or later)

  • You have at least 1 CPU core and 2 GB of available memory.

  • The jq command-line tool is installed, and systemd is configured as the system and service manager.

  • A MySQL client is installed for database connections.

  • Your user account has permission to run sudo.

Deploy seekdb

Step 1: Install seekdb

Choose online or offline installation depending on whether the machine can reach the internet.

Online installation

curl -fsSL https://obportal.s3.ap-southeast-1.amazonaws.com/download-center/opensource/seekdb/seekdb_install.sh | sudo bash
tip

Online installation always installs the latest version of seekdb. If you need to install a specific version, use offline installation.

Offline installation

  1. Download the seekdb package for your desired version from the seekdb Download Center. Copy the package to the target machine. Use the latest version when possible.

    tip

    As CentOS has ended maintenance for EL8, seekdb does not offer RPM packages for this platform. If you are running an EL8-based system, use the EL7 RPM package instead.

  2. In the directory containing the package, install seekdb with rpm:

    sudo rpm -ivh seekdb-*.rpm

Step 2: Start seekdb

After installation, start seekdb as follows.

  1. (Optional) Edit the configuration file.

    You can adjust settings here. If you skip this step, deployment uses the defaults in the configuration file.

    sudo vim /etc/seekdb/seekdb.cnf

    Example contents:

    port=2881
    data-dir=/var/lib/oceanbase/store
    redo-dir=/var/lib/oceanbase/store/redo
    cpu_count=4
    memory_limit=2G

    Configuration options are described in the following table:

    OptionRequiredDefaultDescription
    portNo2881SQL service port for seekdb.
    redo_dirNo/var/lib/oceanbase/store/redoDirectory for clog, ilog, and slog. Prefer a dedicated disk.

    Note

    Ensure at least 15 GB free on the data disk (default: /var/lib/oceanbase/).

    data_dirNo/var/lib/oceanbase/storeDirectory for SSTable and other data. Prefer a dedicated disk.

    Note

    Ensure at least 15 GB free on the data disk (default: /var/lib/oceanbase/).

    cpu_countNo4Number of CPUs seekdb can use. Set to 0 for auto-detection.
    memory_limitNo2GMaximum memory seekdb can use.
  2. Start seekdb:

    sudo systemctl start seekdb
  3. Verify that seekdb is running:

    sudo systemctl status seekdb

    When the status shows Service is ready, seekdb has started successfully.

Step 3: Connect to seekdb

Example connection using the MySQL client:

mysql -h<IP> -uroot -P<Port> -p<Passwd> -A -Dtest

Parameters:

  • -h: Host IP. For seekdb started via systemd on this machine, the default is 127.0.0.1.
  • -u: Username. The default seekdb user is root.
  • -P: Port. Must match the port value in /etc/oceanbase/seekdb.cnf (default 2881).
  • -p: Password. Default is empty.
  • -A: Disable automatic loading of statistics in the MySQL client.
  • -D: Database name. Replace test with your target database if needed.

Example:

mysql -h127.0.0.1 -uroot -P2881 -p****** -A -Dtest

Manage seekdb

seekdb is managed through systemd. Supported operations are start, stop, and status.

Check seekdb status

Run:

sudo systemctl status seekdb

Interpret the output as follows:

  • Active: active (running) and Status: seekdb is ready and running — seekdb is running correctly.
  • Active: inactive (dead) — The service is stopped.
  • Active: failed — An error occurred. Check the service logs to troubleshoot.

Remove seekdb

To fully remove seekdb that was started with systemd:

  1. Stop seekdb:

    sudo systemctl stop seekdb
  2. Uninstall the package and data:

    1. Remove the seekdb package.

      For an online installation:

      sudo yum erase seekdb

      Replace seekdb with the actual package name if different. List packages with yum list | grep seekdb.

      For an offline installation:

      sudo rpm -e seekdb

      Replace seekdb with the actual package name if different. List installed packages with rpm -qa | grep seekdb.

    2. Remove seekdb data.

      After uninstalling the package, the output may show: To clean OceanBase : bash /var/lib/seekdb/seekdb_clean.sh. Run that script to remove all seekdb data. After this step, seekdb is fully removed from the system.

      sudo bash /var/lib/seekdb/seekdb_clean.sh