Deploy seekdb with package managers
This topic describes how to deploy seekdb using your system's package manager.
- CentOS/RHEL
- Debian/Ubuntu
- 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] http:/mirrors.aliyun.com/oceanbase/community/stable/$(lsb_release -is | awk '{print tolower($0)}')/$(lsb_release -cs)/$(dpkg --print-architecture)/ ./" | 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
-
Prerequisites
Before you begin, ensure that:
-
Your Mac is running macOS 15 or later.
-
You have at least 1 CPU core and 2 GB of available memory.
-
A MySQL client is installed for database connections.
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