ARM Linux 环境 国产 华为 欧拉 openEuler 20.03 操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程

简介: 本文介绍在ARM64架构的openEuler 20.03系统上,通过RPM包安装部署PolarDB-X单节点数据库的完整过程,涵盖环境准备、RPM安装、用户配置、数据库初始化及启动连接等步骤,助力用户在国产化软硬件平台上快速搭建PolarDB-X运行环境。

ARM64 openEuler install PolarDB-X single by rpm

之前写了五篇都是x86架构的

是时候来一篇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>
相关文章
|
26天前
|
Linux 数据库
Linux 环境 国产 华为 欧拉 openEuler 20.03 操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文为华为欧拉openEuler 20.03操作系统下Polardb-X单机版RPM包安装教程,继CentOS 7.9与银河麒麟V10后,延续相似步骤,详述环境准备、依赖安装、配置初始化及服务启动全过程,助力国产化平台数据库部署。作者张阳,资深从业者,欢迎交流。
244 5
|
27天前
|
Linux 数据库
Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程
本文介绍在CentOS 7.9环境下安装PolarDB-X单机版数据库的完整流程,涵盖系统环境准备、本地Yum源配置、RPM包安装、用户与目录初始化、依赖库解决、数据库启动及客户端连接等步骤,助您快速部署运行PolarDB-X。
507 1
Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程
|
27天前
|
Linux 数据库
Linux 环境 国产银河麒麟V10操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文介绍在国产银河麒麟V10操作系统上安装Polardb-X单机版数据库的完整过程。基于RPM包方式部署,步骤与CentOS 7.9类似,涵盖系统环境确认、依赖安装、用户配置、初始化数据目录及启动服务等关键环节,并通过命令验证运行状态,助力国产化平台数据库搭建。
367 0
|
2月前
|
监控 算法 5G
室内外融合定位技术从核心架构、技术原理到部署实施流程等详解(二)
本文详解室内外融合定位系统核心技术,涵盖北斗RTK厘米级定位、UWB高精度测距、场景自适应切换与多源数据融合四大模块。通过终端-网络-平台三层架构,实现室外高精度、室内无缝衔接的连续定位,支持化工、矿山等高危场景下的精准管控与安防联动,解决“进车间失联”难题。如果您想进一步了解室内外融合定位技术的案例,欢迎搜索维构lbs智能定位~
|
21天前
|
Java Linux 数据库连接
PolarDB-X 集中式三节点高可用集群部署 & Java 场景 CRUD 应用
本文介绍在CentOS 7.9、openEuler 20.03及银河麒麟V10上部署PolarDB-X三节点高可用集群的完整过程,涵盖环境准备、配置文件设置、集群初始化与启动,并通过Java应用实现CRUD操作验证。集群支持自动主备切换,确保服务高可用,适用于生产环境数据库架构搭建与学习参考。
305 0
|
13天前
|
人工智能 关系型数据库 分布式数据库
多图,PolarDB 2026 开发者大会有感
解读阿里云PolarDB开发者大会上数据库的AI原生演进:从数据形态融合、模型算子化到湖库一体架构,PolarDB通过四大支柱构建面向智能体时代的统一数据基座,推动数据库向“AI in SQL”与自主治理的深度变革。
|
19天前
|
Kubernetes 容器 数据库
K8S 部署 阿里云 PolarDB-X 集群(企业版、标准版)minikube 教程
本文介绍在 Minikube Kubernetes 环境中部署 PolarDB-X 数据库的完整实践,涵盖环境准备、Operator 安装、企业版与标准版集群部署。通过 Helm 快速部署 Operator,并分别搭建分布式与三节点高可用架构,验证核心功能。虽 K8S 部署便捷,但生产环境建议谨慎使用,尤其对有状态数据库系统。附系列前8篇安装指南供参考。
694 2
|
20天前
|
Ubuntu Linux 数据库
Linux 环境 Docker 安装 Polardb-X 数据库 容器 教程
本文介绍如何通过 Docker 快速部署 Polardb-X 数据库容器,实现一键启动。涵盖镜像拉取、容器运行、登录验证等步骤,操作简便,适用于快速开发与测试环境。附往期7篇主流系统安装教程。
191 5
|
21天前
|
Ubuntu Java Linux
Linux 环境 Ubuntu 18.04.6 操作系统安装 Polardb-X 数据库 单机版 deb 包 教程
本文介绍在 Ubuntu 18.04 操作系统上通过DEB包安装PolarDB-X单机版的完整流程,涵盖环境准备、RPM转DEB、依赖安装、初始化配置及服务启动等步骤,助力快速部署运行。
139 7
|
6天前
|
人工智能 自然语言处理 Shell
🦞 如何在 Moltbot (原 Clawdbot)轻松配置阿里云百炼 API 享Coding Plan 特惠套餐
阿里云百炼Coding Plan套餐现已支持Moltbot(原Clawdbot)接入,可抵扣Qwen3-Max-Thinking等大模型,新客首月每天仅0.3元!该开源AI助手支持本地部署、多平台兼容及主流大模型调用,助力自动化办公与个人知识管理。
707 6

热门文章

最新文章