ARM64 openEuler install PolarDB-X single by rpm
之前写了五篇都是x86架构的
CentOS 7.9 环境安装 PolarDB-X 数据库: https://developer.aliyun.com/article/1704678
银河麒麟V10操作系统安装 Polardb-X 数据库: https://developer.aliyun.com/article/1704731
欧拉 openEuler 20.03 操作系统安装 Polardb-X 数据库: https://developer.aliyun.com/article/1704866
PolarDB-X 集中式三节点高可用集群部署 & Java 场景 CRUD 应用: https://developer.aliyun.com/article/1705878
Ubuntu 18.04.6 操作系统安装 Polardb-X 数据库: https://developer.aliyun.com/article/1706016
是时候来一篇ARM64架构的了,下面有请主角出场
0. env
[root@pc16-84 ~]# cat /etc/openEuler-release
openEuler release 20.03 (LTS-SP1)
[root@pc16-84 ~]#
[root@pc16-84 ~]# arch
aarch64
[root@pc16-84 ~]#
[root@pc16-84 ~]# uname -sr
Linux 4.19.90-2012.4.0.0053.oe1.aarch64
[root@pc16-84 ~]#
[root@pc16-84 ~]# free -h
total used free shared buff/cache available
Mem: 14Gi 6.8Gi 2.6Gi 389Mi 5.3Gi 7.1Gi
Swap: 2.1Gi 128Mi 2.0Gi
[root@pc16-84 ~]#
[root@pc16-84 ~]# lscpu |grep "^CPU(s):"
CPU(s): 8
[root@pc16-84 ~]#
1. install by rpm
[root@pc16-84 software]# ll t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64.rpm
-rw-r--r-- 1 root root 602M Jan 12 13:36 t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64.rpm
[root@pc16-84 software]#
[root@pc16-84 software]# yum install ./t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64.rpm
Last metadata expiration check: 0:31:37 ago on Mon 12 Jan 2026 01:09:21 PM CST.
Dependencies resolved.
==============================================================================================================================
Package Architecture Version Repository Size
==============================================================================================================================
Installing:
t-polardbx-engine aarch64 8.4.19-20250825_17558853.el7 @commandline 602 M
Transaction Summary
==============================================================================================================================
Install 1 Package
Total size: 602 M
Installed size: 2.7 G
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64 1/1
Installing : t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64 1/1
Running scriptlet: t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64 1/1
Copying /u01/xcluster80_20250825_current to /u01/xcluster80
Copying /u01/xcluster80_20250825_current to /u01/xcluster80_20250825
Verifying : t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64 1/1
Installed:
t-polardbx-engine-8.4.19-20250825_17558853.el7.aarch64
Complete!
[root@pc16-84 software]#
2. check after install
[root@pc16-84 software]# ll /opt/
total 0
lrwxrwxrwx 1 root root 24 Jan 12 13:43 polardbx_engine -> /u01/xcluster80_20250825
[root@pc16-84 software]# ll /opt/polardbx_engine/
total 732K
drwxr-xr-x 2 root root 4.0K Jan 12 13:43 bin
drwxr-xr-x 2 root root 4.0K Jan 12 13:43 docs
drwxr-xr-x 3 root root 4.0K Jan 12 13:43 include
drwxr-xr-x 6 root root 4.0K Jan 12 13:43 lib
-rwxr-xr-x 1 root root 277K Jan 12 13:43 LICENSE
-rwxr-xr-x 1 root root 119K Jan 12 13:43 LICENSE.router
-rwxr-xr-x 1 root root 277K Jan 12 13:43 LICENSE-test
drwxr-xr-x 4 root root 4.0K Jan 12 13:43 man
-rwxr-xr-x 1 root root 1.6K Jan 12 13:43 mysqlrouter-log-rotate
-rwxr-xr-x 1 root root 952 Jan 12 13:43 README
-rwxr-xr-x 1 root root 679 Jan 12 13:43 README.router
-rwxr-xr-x 1 root root 952 Jan 12 13:43 README-test
drwxr-xr-x 2 root root 4.0K Jan 12 13:43 run
drwxr-xr-x 28 root root 4.0K Jan 12 13:43 share
drwxr-xr-x 2 root root 4.0K Jan 12 13:43 support-files
drwxr-xr-x 3 root root 4.0K Jan 12 13:43 var
[root@pc16-84 software]#
[root@pc16-84 software]# ll /opt/polardbx_engine/bin/
total 2.2G
-rwxr-xr-x 1 root root 22M Jan 12 13:43 comp_err
-rwxr-xr-x 1 root root 26M Jan 12 13:43 ibd2sdi
-rwxr-xr-x 1 root root 24M Jan 12 13:43 innochecksum
-rwxr-xr-x 1 root root 88K Jan 12 13:43 kms_agent_mock
-rwxr-xr-x 1 root root 12M Jan 12 13:43 lz4_decompress
-rwxr-xr-x 1 root root 26M Jan 12 13:43 myisamchk
-rwxr-xr-x 1 root root 25M Jan 12 13:43 myisam_ftdump
-rwxr-xr-x 1 root root 14M Jan 12 13:43 myisamlog
-rwxr-xr-x 1 root root 25M Jan 12 13:43 myisampack
-rwxr-xr-x 1 root root 22M Jan 12 13:43 my_print_defaults
-rwxr-xr-x 1 root root 38M Jan 12 13:43 mysql
-rwxr-xr-x 1 root root 36M Jan 12 13:43 mysqladmin
-rwxr-xr-x 1 root root 44M Jan 12 13:43 mysqlbinlog
-rwxr-xr-x 1 root root 37M Jan 12 13:43 mysqlcheck
-rwxr-xr-x 1 root root 39M Jan 12 13:43 mysql_client_test
-rwxr-xr-x 1 root root 5.1K Jan 12 13:43 mysql_config
-rwxr-xr-x 1 root root 22M Jan 12 13:43 mysql_config_editor
-rwxr-xr-x 1 root root 1.3G Jan 12 13:43 mysqld
-rwxr-xr-x 1 root root 28K Jan 12 13:43 mysqld_multi
-rwxr-xr-x 1 root root 31K Jan 12 13:43 mysqld_safe
-rwxr-xr-x 1 root root 37M Jan 12 13:43 mysqldump
-rwxr-xr-x 1 root root 7.5K Jan 12 13:43 mysqldumpslow
-rwxr-xr-x 1 root root 36M Jan 12 13:43 mysqlimport
-rwxr-xr-x 1 root root 25M Jan 12 13:43 mysql_keyring_encryption_test
-rwxr-xr-x 1 root root 39M Jan 12 13:43 mysql_migrate_keyring
-rwxr-xr-x 1 root root 51M Jan 12 13:43 mysqlpump
-rwxr-xr-x 1 root root 12M Jan 12 13:43 mysqlrouter
-rwxr-xr-x 1 root root 2.2M Jan 12 13:43 mysqlrouter_keyring
-rwxr-xr-x 1 root root 1.7M Jan 12 13:43 mysqlrouter_passwd
-rwxr-xr-x 1 root root 12M Jan 12 13:43 mysqlrouter_plugin_info
-rwxr-xr-x 1 root root 36M Jan 12 13:43 mysql_secure_installation
-rwxr-xr-x 1 root root 36M Jan 12 13:43 mysqlshow
-rwxr-xr-x 1 root root 37M Jan 12 13:43 mysqlslap
-rwxr-xr-x 1 root root 26M Jan 12 13:43 mysql_ssl_rsa_setup
-rwxr-xr-x 1 root root 43M Jan 12 13:43 mysqltest
-rwxr-xr-x 1 root root 100K Jan 12 13:43 mysqltest_safe_process
-rwxr-xr-x 1 root root 11M Jan 12 13:43 mysql_tzinfo_to_sql
-rwxr-xr-x 1 root root 40M Jan 12 13:43 mysql_upgrade
-rwxr-xr-x 1 root root 68M Jan 12 13:43 mysqlxtest
-rwxr-xr-x 1 root root 23M Jan 12 13:43 perror
-rwxr-xr-x 1 root root 57M Jan 12 13:43 polarx_rpc_test
-rwxr-xr-x 1 root root 11M Jan 12 13:43 zlib_decompress
[root@pc16-84 software]#
3. basic config
[root@pc16-84 software]# useradd -ms /bin/bash polarx
[root@pc16-84 software]#
[root@pc16-84 software]# echo "PolarDB-X1234" | passwd --stdin polarx
Changing password for user polarx.
passwd: all authentication tokens updated successfully.
[root@pc16-84 software]#
[root@pc16-84 software]# echo "polarx ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
[root@pc16-84 software]#
[root@pc16-84 software]# cat /etc/sudoers|grep polarx
polarx ALL=(ALL) NOPASSWD: ALL
[root@pc16-84 software]#
[root@pc16-84 software]# su - polarx
Welcome to 4.19.90-2012.4.0.0053.oe1.aarch64
System information as of time: Mon Jan 12 14:03:13 CST 2026
System load: 0.11
Processes: 170
Memory used: 43.1%
Swap used: 6.0%
Usage On: 18%
IP address: 16.0.0.84
Users online: 1
[polarx@pc16-84 ~]$ mkdir -p polardbx-engine/{log,mysql,run,data,tmp}
[polarx@pc16-84 ~]$
[polarx@pc16-84 ~]$ ll
total 4.0K
drwxr-xr-x 7 polarx polarx 4.0K Jan 12 14:05 polardbx-engine
[polarx@pc16-84 ~]$
[polarx@pc16-84 ~]$ ll polardbx-engine/
total 20K
drwxr-xr-x 2 polarx polarx 4.0K Jan 12 14:05 data
drwxr-xr-x 2 polarx polarx 4.0K Jan 12 14:05 log
drwxr-xr-x 2 polarx polarx 4.0K Jan 12 14:05 mysql
drwxr-xr-x 2 polarx polarx 4.0K Jan 12 14:05 run
drwxr-xr-x 2 polarx polarx 4.0K Jan 12 14:05 tmp
[polarx@pc16-84 ~]$
[polarx@pc16-84 ~]$ vim my.cnf
[polarx@pc16-84 ~]$ 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
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@pc16-84 ~]$
4. database init
[polarx@pc16-84 ~]$ /opt/polardbx_engine/bin/mysqld --defaults-file=my.cnf --initialize-insecure
[polarx@pc16-84 ~]$
5. start PolarDB-X
[polarx@pc16-84 ~]$ /opt/polardbx_engine/bin/mysqld_safe --defaults-file=my.cnf &
[1] 144898
[polarx@pc16-84 ~]$ 2026-01-12T06:16:53.516612Z mysqld_safe Logging to '/home/polarx/polardbx-engine/log/alert.log'.
2026-01-12T06:16:53.559400Z mysqld_safe Starting mysqld daemon with databases from /home/polarx/polardbx-engine/data
[polarx@pc16-84 ~]$
6. check port (4886)
[polarx@pc16-84 ~]$ sudo netstat -antp|grep 4886
tcp6 0 0 :::14886 :::* LISTEN 145203/mysqld
tcp6 0 0 :::4886 :::* LISTEN 145203/mysqld
[polarx@pc16-84 ~]$
7. client login
[polarx@pc16-84 ~]$ /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>