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>
相关文章
|
6天前
|
存储 弹性计算 缓存
阿里云服务器租赁费用:新版租赁收费标准及活动报价参考
本文更新了2026年阿里云全系列云服务器租赁活动报价,所有特惠资源均可前往阿里云活动中心选购,整体覆盖从个人入门到企业级高性能场景的全梯度需求。其中轻量应用服务器主打极致性价比,2核2G峰值200M带宽配置每日10点、15点限时抢购价仅38元/年,2核4G配置379元/年起;高性价比的经济型e实例、通用算力型u2i实例覆盖2核4G至4核32G全档位,适配开发测试与中小型企业业务;搭载英特尔至强6处理器的第九代c9i企业级实例算力较上代提升20%,支撑高并发生产环境,不同实例规格价差清晰,用户可根据自身业务负载与预算灵活选型。
1628 116
|
7天前
|
人工智能 程序员 API
Codex 接入 DeepSeek-V4-Flash:还能补上识图,提供两套方案
Codex 接入 DeepSeek-V4-Flash 怎么配?本文覆盖 CLI 与桌面端,再用 qwen3-vl-flash 补识图,两套方案可直接照做
1107 5
|
13天前
|
云安全 人工智能 运维
阿里云联动百位企业安全专家,共识Agent防御最佳实践
当Agent成为新员工,你的安全边界在哪里?
1954 9
阿里云联动百位企业安全专家,共识Agent防御最佳实践
|
7天前
|
编解码 人工智能 安全
2核4G/4核8G/8核16G阿里云服务器如何选择实例?经济型e、通用算力型u2i与计算型c9i选哪个?
本文介绍了阿里云2核4G、4核8G、8核16G三档主流配置下经济型e、通用算力型u2i和计算型c9i三种实例的最新活动价格与适用场景。同配置下三者价差显著,以2核4G为例,经济型e低至599.93元/年,计算型c9i则高达1742.08元/年。文章详细解析了各实例的性能定位:经济型e适合轻负载入门场景,u2i兼顾稳定算力与性价比,c9i凭借第9代至强处理器与芯片级安全能力支撑高性能业务。同时提示用户可叠加满减优惠券享受折上折,建议根据业务负载与预算综合决策。
538 112
|
19天前
|
人工智能 前端开发 Linux
Codex 桌面版安装 + CC Switch 接入第三方 API 完整教程(2026 最新)
2026最新教程:手把手教你安装Codex桌面版,通过CC Switch v3.17.0一键接入Fenno等国产API(兼容OpenAI Responses格式),跳过账号登录,完整启用代码审查、多步任务与上下文感知功能。零基础友好,全程图文实操。(239字)
2752 4
|
11天前
|
存储 人工智能 关系型数据库
阿里云AI产品与云产品最新组合套餐:Token Plan、AI coding及云服务器和建站等组合优惠价
阿里云推出全新“算力+模型+应用”一站式云与AI组合套餐活动,覆盖从个人开发者到中大型企业的全场景需求。核心亮点为分三档定价的Token Plan订阅服务,支持Qwen3.8-Max-Preview大模型调用,错峰时段最低可享0.2折优惠。活动同步推出AI Coding、智能体部署、云电脑托管、0代码建站等十余类场景化组合,搭配99元/年的普惠云服务器、88元/年的入门数据库等经典特惠产品,还为企业提供1V1定制化AI转型方案,大幅降低了不同用户群体拥抱AI的技术门槛与采购成本。
730 111
|
21天前
|
人工智能 JSON 安全
Fastjson远程代码执行漏洞,阿里云AI安全为您保驾护航
阿里云AI安全产品联动防御Fastjson攻击
2653 13
Fastjson远程代码执行漏洞,阿里云AI安全为您保驾护航
|
7天前
|
人工智能 JSON Shell
2026AI漫剧本地全开源方案(附各个软件模型链接),8G显卡也能流畅运行
这是一套完全本地化部署的AI漫剧生成技术链路:涵盖LLM剧本分镜生成、FLUX文生图(IP-Adapter人脸锁定)、StoryDiffusion时序连贯控制、LTX-2.3唇形同步视频生成,及ComfyUI全流程调度。零云端费用,仅耗硬件算力,单集2–4小时可产出竖屏短视频,适配抖音/B站分发。
|
5天前
|
人工智能 API 开发工具
2026 零基础本地 AI 漫剧完整实操教程(8G 笔记本显卡可用|附可直接复制命令与代码)
本方案提供完全离线、本地运行的漫剧全自动制作流程:RTX3060/4050 8G显卡即可驱动,涵盖Qwen写分镜→ComfyUI统一角色绘图→LTX2.3图生微动画→Qwen3-TTS本地配音→FFmpeg自动合成,全程无水印、免API、不限次。专为低显存优化,解决变脸、闪烁、爆内存三大痛点。(239字)

热门文章

最新文章