Linux 环境 Debian 10 操作系统安装 Polardb-X 数据库 单机版 deb 包 教程

简介: 本文介绍在Debian 10系统上通过RPM转DEB方式安装PolarDB-X数据库的完整流程,涵盖环境准备、alien工具转换rpm包、依赖处理、配置初始化及启动验证。特别指出Ubuntu下生成的deb包因压缩格式兼容性问题无法直接用于Debian,需在Debian环境下重新转换。

debian install polardb-x by deb ball

好习惯,附上之前的 6 篇

接下来这篇主要是写 Debian 10 操作系统安装 Polardb-X 数据库,这里要说明:之前 Ubuntu 操作系统下转换好的 deb 包并不能直接拿来使用,详情见文末。


0. env

root@debian:~# cat /etc/issue
Debian GNU/Linux 10 \n \l

root@debian:~# arch
x86_64
root@debian:~# uname -sr
Linux 4.19.0-21-amd64
root@debian:~#
root@debian:~# free -h
              total        used        free      shared  buff/cache   available
Mem:          3.9Gi       668Mi       2.0Gi       8.0Mi       1.2Gi       3.0Gi
Swap:            0B          0B          0B
root@debian:~#
root@debian:~# lscpu |grep "^CPU(s):"
CPU(s):              2
root@debian:~#

1. rpm 2 deb ball

这里说明:关于我为什么没有使用 Ubuntu 下转换好的 deb 包使用,是因为也测了,发现不兼容,所以又重新在 Debian 下 alien 转换的。
文末有 拿 Ubuntu 下转换好的 deb 包 安装 详细报错情况,也尝试重新打包,然而并未解决。
所以说,Ubuntu/Debian 虽然都是 deb 阵营,兼容性还是存在一些差异的,彼此之间的 deb 包不一定完全兼容。
但是,拿官方的 rpm 包 使用 alien 转换后,都可以正常使用。

root@debian:~# cd latest/
root@debian:~/latest# ll
total 658592
-rw-r--r-- 1 qc qc 674397380 Jan 14 14:10 t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64.rpm
root@debian:~/latest#
root@debian:~/latest# apt install alien -y
root@debian:~/latest#
root@debian:~/latest# alien t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64.rpm
Warning: Skipping conversion of scripts in package t-polardbx-engine: postinst preinst
Warning: Use the --scripts parameter to include the scripts.
t-polardbx-engine_8.4.19-20250826_amd64.deb generated
root@debian:~/latest#
root@debian:~/latest# ll
total 1248200
-rw-r--r-- 1 qc   qc   674397380 Jan 14 14:10 t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64.rpm
-rw-r--r-- 1 root root 603755056 Jan 14 14:20 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~/latest#

2. install deb

root@debian:~/latest# apt install ./t-polardbx-engine_8.4.19-20250826_amd64.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 't-polardbx-engine' instead of './t-polardbx-engine_8.4.19-20250826_amd64.deb'
The following NEW packages will be installed:
  t-polardbx-engine
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/604 MB of archives.
After this operation, 3,010 MB of additional disk space will be used.
Get:1 /root/latest/t-polardbx-engine_8.4.19-20250826_amd64.deb t-polardbx-engine amd64 8.4.19-20250826 [604 MB]
Selecting previously unselected package t-polardbx-engine.
(Reading database ... 138074 files and directories currently installed.)
Preparing to unpack .../t-polardbx-engine_8.4.19-20250826_amd64.deb ...
Unpacking t-polardbx-engine (8.4.19-20250826) ...
Setting up t-polardbx-engine (8.4.19-20250826) ...
Processing triggers for libc-bin (2.28-10+deb10u1) ...
N: Download is performed unsandboxed as root as file '/root/latest/t-polardbx-engine_8.4.19-20250826_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
root@debian:~/latest#
  • check after install
root@debian:~/latest# ll /opt/
total 0
root@debian:~/latest# ll /u01/
total 0
drwxr-xr-x 11 root root 263 Jan 14 14:22 xcluster80_20250825_current
root@debian:~/latest#
root@debian:~/latest# ll /u01/xcluster80_20250825_current/
total 704
drwxr-xr-x  2 root root   4096 Jan 14 14:22 bin
drwxr-xr-x  2 root root     87 Jan 14 14:22 docs
drwxr-xr-x  3 root root    282 Jan 14 14:22 include
drwxr-xr-x  6 root root    207 Jan 14 14:22 lib
-rwxr-xr-x  1 root root 283374 Aug 22 17:58 LICENSE
-rwxr-xr-x  1 root root 121462 Aug 22 17:58 LICENSE.router
-rwxr-xr-x  1 root root 283374 Aug 22 17:58 LICENSE-test
drwxr-xr-x  4 root root     30 Jan 14 14:22 man
-rwxr-xr-x  1 root root   1622 Aug 22 17:59 mysqlrouter-log-rotate
-rwxr-xr-x  1 root root    952 Aug 22 17:58 README
-rwxr-xr-x  1 root root    679 Aug 22 17:58 README.router
-rwxr-xr-x  1 root root    952 Aug 22 17:58 README-test
drwxr-xr-x  2 root root      6 Aug 22 18:06 run
drwxr-xr-x 28 root root   4096 Jan 14 14:22 share
drwxr-xr-x  2 root root     77 Jan 14 14:22 support-files
drwxr-xr-x  3 root root     17 Jan 14 14:22 var
root@debian:~/latest#

3. basic config

root@debian:~/latest# cd /u01/
root@debian:/u01# ll
total 0
drwxr-xr-x 11 root root 263 Jan 14 14:22 xcluster80_20250825_current
root@debian:/u01#
root@debian:/u01# cp -a xcluster80_20250825_current xcluster80
root@debian:/u01#
root@debian:/u01# cp -a xcluster80_20250825_current xcluster80_20250825
root@debian:/u01#
root@debian:/u01# ll

total 0
drwxr-xr-x 11 root root 263 Jan 14 14:22 xcluster80
drwxr-xr-x 11 root root 263 Jan 14 14:22 xcluster80_20250825
drwxr-xr-x 11 root root 263 Jan 14 14:22 xcluster80_20250825_current
root@debian:/u01#
root@debian:/u01# ln -s /u01/xcluster80_20250825 /opt/polardbx_engine
root@debian:/u01#
root@debian:/u01# cd /opt/
root@debian:/opt# ll
total 0
lrwxrwxrwx 1 root root 24 Jan 14 14:25 polardbx_engine -> /u01/xcluster80_20250825
root@debian:/opt#
root@debian:/opt# ll polardbx_engine/
total 704
drwxr-xr-x  2 root root   4096 Jan 14 14:22 bin
drwxr-xr-x  2 root root     87 Jan 14 14:22 docs
drwxr-xr-x  3 root root    282 Jan 14 14:22 include
drwxr-xr-x  6 root root    207 Jan 14 14:22 lib
-rwxr-xr-x  1 root root 283374 Aug 22 17:58 LICENSE
-rwxr-xr-x  1 root root 121462 Aug 22 17:58 LICENSE.router
-rwxr-xr-x  1 root root 283374 Aug 22 17:58 LICENSE-test
drwxr-xr-x  4 root root     30 Jan 14 14:22 man
-rwxr-xr-x  1 root root   1622 Aug 22 17:59 mysqlrouter-log-rotate
-rwxr-xr-x  1 root root    952 Aug 22 17:58 README
-rwxr-xr-x  1 root root    679 Aug 22 17:58 README.router
-rwxr-xr-x  1 root root    952 Aug 22 17:58 README-test
drwxr-xr-x  2 root root      6 Aug 22 18:06 run
drwxr-xr-x 28 root root   4096 Jan 14 14:22 share
drwxr-xr-x  2 root root     77 Jan 14 14:22 support-files
drwxr-xr-x  3 root root     17 Jan 14 14:22 var
root@debian:/opt#

4. create polardbx account

root@debian:/opt# useradd -ms /bin/bash polarx
root@debian:/opt#
root@debian:/opt# echo "polarx:polarx" | chpasswd
root@debian:/opt#
root@debian:/opt# echo "polarx ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
root@debian:/opt#
root@debian:/opt# su - polarx
polarx@debian:~$
polarx@debian:~$ mkdir -p polardbx-engine/{log,mysql,run,data,tmp}
polarx@debian:~$
polarx@debian:~$ ll
total 0
drwxr-xr-x 7 polarx polarx 64 Jan 14 14:27 polardbx-engine
polarx@debian:~$
polarx@debian:~$ ll polardbx-engine/
total 0
drwxr-xr-x 2 polarx polarx 6 Jan 14 14:27 data
drwxr-xr-x 2 polarx polarx 6 Jan 14 14:27 log
drwxr-xr-x 2 polarx polarx 6 Jan 14 14:27 mysql
drwxr-xr-x 2 polarx polarx 6 Jan 14 14:27 run
drwxr-xr-x 2 polarx polarx 6 Jan 14 14:27 tmp
polarx@debian:~$

5. my.cnf config

polarx@debian:~$
polarx@debian:~$ cd polardbx-engine/
polarx@debian:~/polardbx-engine$
polarx@debian:~/polardbx-engine$ vim my.cnf
polarx@debian:~/polardbx-engine$ cat my.cnf
[mysqld]
basedir = /opt/polardbx_engine
log_error_verbosity = 2
default_authentication_plugin = mysql_native_password
gtid_mode = ON
enforce_gtid_consistency = ON
log_bin = mysql-binlog
binlog_format = row
binlog_row_image = FULL
master_info_repository = TABLE
relay_log_info_repository = TABLE

# change me if needed
datadir = /home/polarx/polardbx-engine/data
tmpdir = /home/polarx/polardbx-engine/tmp
socket = /home/polarx/polardbx-engine/tmp.mysql.sock
log_error = /home/polarx/polardbx-engine/log/alert.log
port = 4886
cluster_id = 1234
cluster_info = 127.0.0.1:14886@1
server_id = 2712347953

[mysqld_safe]
pid_file = /home/polarx/polardbx-engine/run/mysql.pid
polarx@debian:~/polardbx-engine$
polarx@debian:~/polardbx-engine$ ll
total 4
drwxr-xr-x 2 polarx polarx   6 Jan 14 14:27 data
drwxr-xr-x 2 polarx polarx   6 Jan 14 14:27 log
-rw-r--r-- 1 polarx polarx 667 Jan 14 14:27 my.cnf
drwxr-xr-x 2 polarx polarx   6 Jan 14 14:27 mysql
drwxr-xr-x 2 polarx polarx   6 Jan 14 14:27 run
drwxr-xr-x 2 polarx polarx   6 Jan 14 14:27 tmp
polarx@debian:~/polardbx-engine$

6. database init

  • 1st init
polarx@debian:~/polardbx-engine$ /opt/polardbx_engine/bin/mysqld --defaults-file=my.cnf --initialize-insecure
/opt/polardbx_engine/bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
polarx@debian:~/polardbx-engine$
  • install libaio-dev
polarx@debian:~/polardbx-engine$ sudo apt install libaio-dev -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libaio1
The following NEW packages will be installed:
  libaio-dev libaio1
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 31.3 kB of archives.
After this operation, 98.3 kB of additional disk space will be used.
Get:1 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 libaio1 amd64 0.3.112-3 [11.2 kB]
Get:2 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 libaio-dev amd64 0.3.112-3 [20.1 kB]
Fetched 31.3 kB in 0s (179 kB/s)
Selecting previously unselected package libaio1:amd64.
(Reading database ... 138475 files and directories currently installed.)
Preparing to unpack .../libaio1_0.3.112-3_amd64.deb ...
Unpacking libaio1:amd64 (0.3.112-3) ...
Selecting previously unselected package libaio-dev:amd64.
Preparing to unpack .../libaio-dev_0.3.112-3_amd64.deb ...
Unpacking libaio-dev:amd64 (0.3.112-3) ...
Setting up libaio1:amd64 (0.3.112-3) ...
Setting up libaio-dev:amd64 (0.3.112-3) ...
Processing triggers for libc-bin (2.28-10+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
polarx@debian:~/polardbx-engine$
  • 2d init
polarx@debian:~/polardbx-engine$ /opt/polardbx_engine/bin/mysqld --defaults-file=my.cnf --initialize-insecure
polarx@debian:~/polardbx-engine$

7. start PolarDB-X

polarx@debian:~/polardbx-engine$ /opt/polardbx_engine/bin/mysqld_safe --defaults-file=my.cnf &
[1] 12706
polarx@debian:~/polardbx-engine$ 2026-01-14T06:35:04.975940Z mysqld_safe Logging to '/home/polarx/polardbx-engine/log/alert.log'.
2026-01-14T06:35:04.994213Z mysqld_safe Starting mysqld daemon with databases from /home/polarx/polardbx-engine/data

polarx@debian:~/polardbx-engine$

8. check port (4886)

polarx@debian:~/polardbx-engine$ netstat -antp|grep 4886
-bash: netstat: command not found
polarx@debian:~/polardbx-engine$
polarx@debian:~/polardbx-engine$ sudo apt install net-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  net-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 248 kB of archives.
After this operation, 1,002 kB of additional disk space will be used.
Get:1 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 net-tools amd64 1.60+git20180626.aebd88e-1 [248 kB]
Fetched 248 kB in 0s (1,449 kB/s)
Selecting previously unselected package net-tools.
(Reading database ... 138498 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1_amd64.deb ...
Unpacking net-tools (1.60+git20180626.aebd88e-1) ...
Setting up net-tools (1.60+git20180626.aebd88e-1) ...
Processing triggers for man-db (2.8.5-2) ...
polarx@debian:~/polardbx-engine$
polarx@debian:~/polardbx-engine$ netstat -antp|grep 4886
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::4886                 :::*                    LISTEN      13002/mysqld
tcp6       0      0 :::14886                :::*                    LISTEN      13002/mysqld
polarx@debian:~/polardbx-engine$

9. client login

polarx@debian:~/polardbx-engine$ /opt/polardbx_engine/bin/mysql -h127.0.0.1 -P4886 -uroot
/opt/polardbx_engine/bin/mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
polarx@debian:~/polardbx-engine$
  • install libncurses5
polarx@debian:~/polardbx-engine$ sudo apt install libncurses5
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libtinfo5
The following NEW packages will be installed:
  libncurses5 libtinfo5
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 417 kB of archives.
After this operation, 837 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 libtinfo5 amd64 6.1+20181013-2+deb10u2 [321 kB]
Get:2 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 libncurses5 amd64 6.1+20181013-2+deb10u2 [96.2 kB]
Fetched 417 kB in 0s (2,176 kB/s)
Selecting previously unselected package libtinfo5:amd64.
(Reading database ... 138645 files and directories currently installed.)
Preparing to unpack .../libtinfo5_6.1+20181013-2+deb10u2_amd64.deb ...
Unpacking libtinfo5:amd64 (6.1+20181013-2+deb10u2) ...
Selecting previously unselected package libncurses5:amd64.
Preparing to unpack .../libncurses5_6.1+20181013-2+deb10u2_amd64.deb ...
Unpacking libncurses5:amd64 (6.1+20181013-2+deb10u2) ...
Setting up libtinfo5:amd64 (6.1+20181013-2+deb10u2) ...
Setting up libncurses5:amd64 (6.1+20181013-2+deb10u2) ...
Processing triggers for libc-bin (2.28-10+deb10u1) ...
polarx@debian:~/polardbx-engine$
  • login sucess
polarx@debian:~/polardbx-engine$ /opt/polardbx_engine/bin/mysql -h127.0.0.1 -P4886 -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 14
Server version: 8.0.32-X-Cluster-8.4.19-20250825 Source distribution

Copyright (c) 2000, 2023, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select version();
+----------------------------------+
| version()                        |
+----------------------------------+
| 8.0.32-X-Cluster-8.4.19-20250825 |
+----------------------------------+
1 row in set (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2026-01-14 14:37:51 |
+---------------------+
1 row in set (0.00 sec)

mysql>

花絮(翻车记录)

拿 Ubuntu 下转换好的 deb 包 安装,也尝试重新打包,然而并没有安装成功,以下是详细过程及报错情况。

root@debian:~# ll t-polardbx-engine_8.4.19-20250826_amd64.deb
-rw-r--r-- 1 root root 669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# apt install ./t-polardbx-engine_8.4.19-20250826_amd64.deb
Reading package lists... Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /root/t-polardbx-engine_8.4.19-20250826_amd64.deb
E: The package lists or status file could not be parsed or opened.
root@debian:~#
root@debian:~# dpkg -i t-polardbx-engine_8.4.19-20250826_amd64.deb
dpkg-deb: error: archive 't-polardbx-engine_8.4.19-20250826_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive t-polardbx-engine_8.4.19-20250826_amd64.deb (--install):
 dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# apt install zstd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  zstd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 336 kB of archives.
After this operation, 1,449 kB of additional disk space will be used.
Get:1 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 zstd amd64 1.3.8+dfsg-3+deb10u2 [336 kB]
Fetched 336 kB in 0s (1,258 kB/s)
Selecting previously unselected package zstd.
(Reading database ... 130872 files and directories currently installed.)
Preparing to unpack .../zstd_1.3.8+dfsg-3+deb10u2_amd64.deb ...
Unpacking zstd (1.3.8+dfsg-3+deb10u2) ...
Setting up zstd (1.3.8+dfsg-3+deb10u2) ...
Processing triggers for man-db (2.8.5-2) ...
root@debian:~#
root@debian:~# apt install ./t-polardbx-engine_8.4.19-20250826_amd64.deb
Reading package lists... Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /root/t-polardbx-engine_8.4.19-20250826_amd64.deb
E: The package lists or status file could not be parsed or opened.
root@debian:~#
root@debian:~# dpkg -i t-polardbx-engine_8.4.19-20250826_amd64.deb
dpkg-deb: error: archive 't-polardbx-engine_8.4.19-20250826_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up
dpkg: error processing archive t-polardbx-engine_8.4.19-20250826_amd64.deb (--install):
 dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# ar x ./t-polardbx-engine_8.4.19-20250826_amd64.deb
-bash: ar: command not found
root@debian:~#
root@debian:~# apt install binutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  binutils-common binutils-x86-64-linux-gnu libbinutils
Suggested packages:
  binutils-doc
The following NEW packages will be installed:
  binutils binutils-common binutils-x86-64-linux-gnu libbinutils
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,432 kB of archives.
After this operation, 28.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 binutils-common amd64 2.31.1-16 [2,073 kB]
Get:2 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 libbinutils amd64 2.31.1-16 [478 kB]
Get:3 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 binutils-x86-64-linux-gnu amd64 2.31.1-16 [1,823 kB]
Get:4 http://mirrors.huaweicloud.com/debian-archive/debian buster/main amd64 binutils amd64 2.31.1-16 [56.8 kB]
Fetched 4,432 kB in 2s (2,113 kB/s)
Selecting previously unselected package binutils-common:amd64.
(Reading database ... 130892 files and directories currently installed.)
Preparing to unpack .../binutils-common_2.31.1-16_amd64.deb ...
Unpacking binutils-common:amd64 (2.31.1-16) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../libbinutils_2.31.1-16_amd64.deb ...
Unpacking libbinutils:amd64 (2.31.1-16) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../binutils-x86-64-linux-gnu_2.31.1-16_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.31.1-16) ...
Selecting previously unselected package binutils.
Preparing to unpack .../binutils_2.31.1-16_amd64.deb ...
Unpacking binutils (2.31.1-16) ...
Setting up binutils-common:amd64 (2.31.1-16) ...
Setting up libbinutils:amd64 (2.31.1-16) ...
Setting up binutils-x86-64-linux-gnu (2.31.1-16) ...
Setting up binutils (2.31.1-16) ...
Processing triggers for libc-bin (2.28-10+deb10u1) ...
Processing triggers for man-db (2.8.5-2) ...
root@debian:~#
root@debian:~# ar x ./t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~# ll
total 1307156
-rw-r--r-- 1 root root     10051 Jan 14 13:58 control.tar.zst
-rw-r--r-- 1 root root 669248770 Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root         4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root 669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# zstd -d control.tar.zst -o control.tar
control.tar.zst     : 40960 bytes
root@debian:~#
root@debian:~# zstd -d data.tar.zst -o data.tar
data.tar.zst        : 3009617920 bytes
root@debian:~#
root@debian:~# ll
total 4246276
-rw-r--r-- 1 root root      40960 Jan 14 13:58 control.tar
-rw-r--r-- 1 root root      10051 Jan 14 13:58 control.tar.zst
-rw-r--r-- 1 root root 3009617920 Jan 14 13:58 data.tar
-rw-r--r-- 1 root root  669248770 Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root          4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root  669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# mkdir control data
root@debian:~# tar -xf control.tar -C control
root@debian:~# tar -xf data.tar -C data
root@debian:~# ll
total 4246276
drwxr-xr-x 2 root root         66 Jan 14 08:47 control
-rw-r--r-- 1 root root      40960 Jan 14 13:58 control.tar
-rw-r--r-- 1 root root      10051 Jan 14 13:58 control.tar.zst
drwxr-xr-x 4 root root         28 Jan 14 08:47 data
-rw-r--r-- 1 root root 3009617920 Jan 14 13:58 data.tar
-rw-r--r-- 1 root root  669248770 Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root          4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root  669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# ll control
total 48
-rw-r--r-- 1 root root   824 Jan 14 08:47 control
-rw-r--r-- 1 root root 33887 Jan 14 08:47 md5sums
-rw-r--r-- 1 root root   628 Jan 14 08:47 shlibs
-rw-r--r-- 1 root root    75 Jan 14 08:47 triggers
root@debian:~#
root@debian:~# ll data
total 0
drwxr-xr-x 3 root root 41 Jan 14 08:46 u01
drwxr-xr-x 3 root root 19 Jan 14 08:47 usr
root@debian:~#
root@debian:~# tar -zcf control.tar.gz control
root@debian:~# ll
total 4246288
drwxr-xr-x 2 root root         66 Jan 14 08:47 control
-rw-r--r-- 1 root root      40960 Jan 14 13:58 control.tar
-rw-r--r-- 1 root root      11289 Jan 14 14:04 control.tar.gz
-rw-r--r-- 1 root root      10051 Jan 14 13:58 control.tar.zst
drwxr-xr-x 4 root root         28 Jan 14 08:47 data
-rw-r--r-- 1 root root 3009617920 Jan 14 13:58 data.tar
-rw-r--r-- 1 root root  669248770 Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root          4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root  669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# tar -zcf data.tar.gz data
root@debian:~#
root@debian:~# ll
total 5149408
drwxr-xr-x 2 root root         66 Jan 14 08:47 control
-rw-r--r-- 1 root root      40960 Jan 14 13:58 control.tar
-rw-r--r-- 1 root root      11289 Jan 14 14:04 control.tar.gz
-rw-r--r-- 1 root root      10051 Jan 14 13:58 control.tar.zst
drwxr-xr-x 4 root root         28 Jan 14 08:47 data
-rw-r--r-- 1 root root 3009617920 Jan 14 13:58 data.tar
-rw-r--r-- 1 root root  924793644 Jan 14 14:06 data.tar.gz
-rw-r--r-- 1 root root  669248770 Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root          4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root  669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
root@debian:~#
root@debian:~# ar rcs t-polardbx-engine_8.4.19-20260114_amd64.deb debian-binary control.tar.gz data.tar.gz
root@debian:~# ll
total 6052540
drwxr-xr-x 2 root root         66 Jan 14 08:47 control
-rw-r--r-- 1 root root      40960 Jan 14 13:58 control.tar
-rw-r--r-- 1 root root      11289 Jan 14 14:04 control.tar.gz
-rw-r--r-- 1 root root      10051 Jan 14 13:58 control.tar.zst
drwxr-xr-x 4 root root         28 Jan 14 08:47 data
-rw-r--r-- 1 root root 3009617920 Jan 14 13:58 data.tar
-rw-r--r-- 1 root root  924793644 Jan 14 14:06 data.tar.gz
-rw-r--r-- 1 root root  669248770 Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root          4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root  669259014 Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
-rw-r--r-- 1 root root  924805126 Jan 14 14:07 t-polardbx-engine_8.4.19-20260114_amd64.deb
root@debian:~#
root@debian:~# ls -lh
total 5.8G
drwxr-xr-x 2 root root   66 Jan 14 08:47 control
-rw-r--r-- 1 root root  40K Jan 14 13:58 control.tar
-rw-r--r-- 1 root root  12K Jan 14 14:04 control.tar.gz
-rw-r--r-- 1 root root 9.9K Jan 14 13:58 control.tar.zst
drwxr-xr-x 4 root root   28 Jan 14 08:47 data
-rw-r--r-- 1 root root 2.9G Jan 14 13:58 data.tar
-rw-r--r-- 1 root root 882M Jan 14 14:06 data.tar.gz
-rw-r--r-- 1 root root 639M Jan 14 13:58 data.tar.zst
-rw-r--r-- 1 root root    4 Jan 14 13:58 debian-binary
-rw-r--r-- 1 root root 639M Jan 14 13:46 t-polardbx-engine_8.4.19-20250826_amd64.deb
-rw-r--r-- 1 root root 882M Jan 14 14:07 t-polardbx-engine_8.4.19-20260114_amd64.deb
root@debian:~#
root@debian:~# apt install ./t-polardbx-engine_8.4.19-20260114_amd64.deb
Reading package lists... Error!
E: Sub-process Popen returned an error code (2)
E: Encountered a section with no Package: header
E: Problem with MergeList /root/t-polardbx-engine_8.4.19-20260114_amd64.deb
E: The package lists or status file could not be parsed or opened.
root@debian:~#
root@debian:~# dpkg -i ./t-polardbx-engine_8.4.19-20260114_amd64.deb
dpkg: error processing archive ./t-polardbx-engine_8.4.19-20260114_amd64.deb (--install):
 unable to open file '/var/lib/dpkg/tmp.ci//control': Is a directory
Errors were encountered while processing:
 ./t-polardbx-engine_8.4.19-20260114_amd64.deb
root@debian:~#
相关文章
|
20天前
|
Ubuntu Java Linux
ARM Linux 环境 国产 华为 欧拉 openEuler 20.03 操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文介绍在ARM64架构的openEuler 20.03系统上,通过RPM包安装部署PolarDB-X单节点数据库的完整过程,涵盖环境准备、RPM安装、用户配置、数据库初始化及启动连接等步骤,助力用户在国产化软硬件平台上快速搭建PolarDB-X运行环境。
252 1
|
20天前
|
Ubuntu Linux 数据库
Linux 环境 Docker 安装 Polardb-X 数据库 容器 教程
本文介绍如何通过 Docker 快速部署 Polardb-X 数据库容器,实现一键启动。涵盖镜像拉取、容器运行、登录验证等步骤,操作简便,适用于快速开发与测试环境。附往期7篇主流系统安装教程。
185 5
|
26天前
|
Linux 数据库
Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程
本文介绍在CentOS 7.9环境下安装PolarDB-X单机版数据库的完整流程,涵盖系统环境准备、本地Yum源配置、RPM包安装、用户与目录初始化、依赖库解决、数据库启动及客户端连接等步骤,助您快速部署运行PolarDB-X。
502 1
Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程
|
20天前
|
弹性计算 数据库 云计算
阿里云服务器如何购买价格更便宜?领取优惠券便宜购买图文教程参考
本文重点介绍2026年阿里云推出的多元优惠券体系。包括学生专享300元无门槛券、企业迁移算力补贴、新用户满减券(满100减10元)、165元券包(满50减15至满350减100)及系统赠券等。通过实操案例展示阿里云目前优惠券的领券路径与使用流程,如经济型e实例2核8G配置通过150元券实现757.39元至607.39元的减免,计算型c9i实例4核8G配置通过150元券实现3147.56元至2997.56元的优惠。
阿里云服务器如何购买价格更便宜?领取优惠券便宜购买图文教程参考
|
29天前
|
人工智能 安全 API
Nacos 安全护栏:MCP、Agent、配置全维防护,重塑 AI Registry 安全边界
Nacos安全新标杆:精细鉴权、无感灰度、全量审计!
586 66
|
20天前
|
运维 Kubernetes Go
别再靠人肉运维了:Kubernetes Operator 才是运维自动化的终极形态
别再靠人肉运维了:Kubernetes Operator 才是运维自动化的终极形态
83 6
|
26天前
|
Linux 数据库
Linux 环境 国产 华为 欧拉 openEuler 20.03 操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文为华为欧拉openEuler 20.03操作系统下Polardb-X单机版RPM包安装教程,继CentOS 7.9与银河麒麟V10后,延续相似步骤,详述环境准备、依赖安装、配置初始化及服务启动全过程,助力国产化平台数据库部署。作者张阳,资深从业者,欢迎交流。
244 5
|
21天前
|
Java Linux 数据库连接
PolarDB-X 集中式三节点高可用集群部署 & Java 场景 CRUD 应用
本文介绍在CentOS 7.9、openEuler 20.03及银河麒麟V10上部署PolarDB-X三节点高可用集群的完整过程,涵盖环境准备、配置文件设置、集群初始化与启动,并通过Java应用实现CRUD操作验证。集群支持自动主备切换,确保服务高可用,适用于生产环境数据库架构搭建与学习参考。
303 0
|
26天前
|
Linux 数据库
Linux 环境 国产银河麒麟V10操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文介绍在国产银河麒麟V10操作系统上安装Polardb-X单机版数据库的完整过程。基于RPM包方式部署,步骤与CentOS 7.9类似,涵盖系统环境确认、依赖安装、用户配置、初始化数据目录及启动服务等关键环节,并通过命令验证运行状态,助力国产化平台数据库搭建。
365 0

热门文章

最新文章