Deploy seekdb with package managers
This topic describes how to deploy seekdb using your system's package manager.
- CentOS/RHEL
- Debian/Ubuntu
- Windows
- macOS
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
jqcommand-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
Online installation always installs the latest version of seekdb. If you need to install a specific version, use offline installation.
Offline installation
-
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.
tipAs 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.
-
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.
-
(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.cnfExample contents:
port=2881
data-dir=/var/lib/oceanbase/store
redo-dir=/var/lib/oceanbase/store/redo
cpu_count=4
memory_limit=2GConfiguration options are described in the following table:
Option Required Default Description port No 2881 SQL service port for seekdb. redo_dir No /var/lib/oceanbase/store/redo Directory 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_dir No /var/lib/oceanbase/store Directory 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_count No 4 Number of CPUs seekdb can use. Set to 0 for auto-detection. memory_limit No 2G Maximum memory seekdb can use. -
Start seekdb:
sudo systemctl start seekdb -
Verify that seekdb is running:
sudo systemctl status seekdbWhen 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
portvalue 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
testwith 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:
-
Stop seekdb:
sudo systemctl stop seekdb -
Uninstall the package and data:
-
Remove the seekdb package.
For an online installation:
sudo yum erase seekdbReplace
seekdbwith the actual package name if different. List packages withyum list | grep seekdb.For an offline installation:
sudo rpm -e seekdbReplace
seekdbwith the actual package name if different. List installed packages withrpm -qa | grep seekdb. -
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
-
Prerequisites
Before you begin, ensure that:
-
Your system is DEB-based. The following distributions are currently supported:
-
Debian 11, 12, and 13 (Linux kernel 4.19 or later)
-
Ubuntu 20.04, 22.04, and 24.04 (Linux kernel 4.19 or later)
-
-
You have at least 1 CPU core and 2 GB of available memory.
-
The
jqcommand-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
-
Add the seekdb repository:
echo "deb [trusted=yes] https://mirrors.aliyun.com/oceanbase/community/stable/$(lsb_release -is | awk '{print tolower($0)}')/$(lsb_release -cs)/$(dpkg --print-architecture)/ ./" | sudo tee /etc/apt/sources.list.d/oceanbase.list -
Install seekdb:
sudo apt update
sudo apt install seekdb
Offline installation
-
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.
-
In the directory containing the package, install seekdb with dpkg:
sudo dpkg -i seekdb-*.deb
Step 2: Start seekdb
After installation, start seekdb as follows.
-
(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.cnfExample contents:
port=2881
data-dir=/var/lib/oceanbase/store
redo-dir=/var/lib/oceanbase/store/redo
cpu_count=4
memory_limit=2GConfiguration options are described in the following table:
Option Required Default Description port No 2881 SQL service port for seekdb. redo_dir No /var/lib/oceanbase/store/redo Directory 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_dir No /var/lib/oceanbase/store Directory 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_count No 4 Number of CPUs seekdb can use. Set to 0 for auto-detection. memory_limit No 2G Maximum memory seekdb can use. -
Start seekdb:
sudo systemctl start seekdb -
Verify that seekdb is running:
sudo systemctl status seekdbWhen 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
portvalue 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
testwith 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:
-
Stop seekdb:
sudo systemctl stop seekdb -
Uninstall the package and data:
-
Remove the seekdb package.
For an online installation:
sudo apt remove seekdbReplace
seekdbwith the actual package name if different. List packages withapt list | grep seekdb.For an offline installation:
sudo dpkg -r seekdbReplace
seekdbwith the actual package name if different. List installed packages withdpkg -l | grep seekdb. -
Remove seekdb data.
After uninstalling the package, run the following to remove all seekdb data. After this step, seekdb is fully removed from the system.
sudo bash /var/lib/seekdb/seekdb_clean.sh
-
Windows deployment is currently an experimental capability. Evaluate risk carefully before using it in production.
Prerequisites
Before you begin, confirm the following:
-
Only x86-64 CPU architecture is currently supported.
-
Only Windows 11 64-bit is currently supported.
-
The environment has at least 1 CPU core.
-
The environment has at least 2 GB of available memory.
-
A database client tool (MySQL client) is installed.
-
The current user has administrator privileges.
Deploy seekdb
Step 1: Install seekdb
-
Go to the seekdb Download Center, find seekdb, select the target version, and download the Windows installer package (
.msi). -
Double-click the installer package and complete the installation wizard.
Step 2: Initialize and start seekdb
-
After installation, start
seekdb Configurator. -
In the configuration wizard, verify the following settings in order:
-
Data Directory
-
Service configuration and port (default port is
2881) -
root account password
-
Windows service configuration (default service name is
seekdb)
-
-
On the Apply Configuration page, click Execute. seekdb starts automatically after configuration is complete.
Step 3: Connect to seekdb
The following example uses the MySQL client to connect to seekdb:
mysql -h<IP> -uroot -P<Port> -p<Passwd> -A -Dtest
Parameter descriptions:
-
-h: The seekdb host IP. For a local deployment, use
127.0.0.1. -
-u: The seekdb account in the format
username. The default seekdb username isroot. -
-P: The seekdb port. The default is 2881.
-
-p: The seekdb password, which is the root password set during initialization.
-
-A: Disables automatic statistics retrieval in the MySQL client when connecting.
-
-D: The database name to access. You can replace it with your business database name.
Example:
mysql -h127.0.0.1 -uroot -P2881 -p****** -A -Dtest
Manage seekdb
Check seekdb status
In Windows Service Manager, check the status of the seekdb service. A status of Running indicates seekdb started successfully.
Remove seekdb
Follow these steps to remove seekdb deployed on Windows.
-
In Control Panel > Programs and Features, select
seekdb, click Uninstall, and complete the wizard. -
(Optional) Follow the uninstall wizard prompts to choose whether to delete the seekdb data directory.
Prerequisites
Before you begin, ensure that:
-
Your Mac is running macOS 15.3 or later.
-
You have at least 1 CPU core and 2 GB of available memory.
-
A MySQL client is installed for database connections.
-
You have installed the corresponding dependencies. If not, install using the following command:
brew install zstd utf8proc thrift re2 brotli
Deploy seekdb
Step 1: Install seekdb
-
Add the seekdb Homebrew tap:
brew tap oceanbase/seekdb -
Install seekdb:
brew install seekdb
Step 2: Start seekdb
After installation, you can start seekdb in one of these ways:
-
Start as a background service
seekdb-start -
Run in the foreground
seekdb --nodaemon -
Use a custom data directory
seekdb --base-dir=/custom/path
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. The default for a local seekdb instance is
127.0.0.1. - -u: Username. The default seekdb user is
root. - -P: Port. Default is 2881.
- -p: Password. Default is empty.
- -A: Disable automatic loading of statistics in the MySQL client.
- -D: Database name. Replace
testwith your target database if needed.
Example:
mysql -h127.0.0.1 -uroot -P2881 -p****** -A -Dtest
Manage seekdb
You can start, stop, and check the status of seekdb using the commands below.
Check seekdb status
Run:
seekdb-status
A status of running means seekdb is up.
Remove seekdb
To uninstall seekdb installed via Homebrew:
-
Stop seekdb:
seekdb-stop -
Remove configuration and data:
seekdb-cleanup -
Uninstall the seekdb formula:
brew uninstall seekdb