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

简介: 本文为华为欧拉openEuler 20.03操作系统下Polardb-X单机版RPM包安装教程,继CentOS 7.9与银河麒麟V10后,延续相似步骤,详述环境准备、依赖安装、配置初始化及服务启动全过程,助力国产化平台数据库部署。作者张阳,资深从业者,欢迎交流。

第一篇写道 CentOS 7.9 Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程

第二篇文章是 国产银河麒麟V10操作系统 Linux 环境 国产银河麒麟V10操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程

本篇文章是基于 华为 欧拉 openEuler 20.03 操作系统

基本步骤和上两篇基本相似,以下是详细过程

[root@localhost ~]# cat /etc/openEuler-release
openEuler release 20.03 (LTS)
[root@localhost ~]#
[root@localhost ~]# free -h
              total        used        free      shared  buff/cache   available
Mem:          7.3Gi       266Mi       6.8Gi       0.0Ki       195Mi       6.6Gi
Swap:         4.0Gi          0B       4.0Gi
[root@localhost ~]#
[root@localhost ~]# ll
total 4.0K
-rw-------. 1 root root 1.1K Nov 17 11:49 anaconda-ks.cfg
[root@localhost ~]#
[root@localhost ~]# ll
total 644M
-rw-------. 1 root root 1.1K Nov 17 11:49 anaconda-ks.cfg
-rw-------. 1 root root 644M Jan  8 16:19 t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64.rpm
[root@localhost ~]#
[root@localhost ~]# yum repolist
repo id                                                        repo name
OS                                                             openEuler-20.03LTS-OS
update                                                         openEuler-20.03LTS-Update
[root@localhost ~]#
[root@localhost ~]# yum install ./t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64.rpm
Last metadata expiration check: 0:00:42 ago on Thu 08 Jan 2026 04:19:49 PM CST.
Dependencies resolved.
===============================================================================================================================================
 Package                            Architecture            Version                                        Repository                     Size
===============================================================================================================================================
Installing:
 t-polardbx-engine                  x86_64                  8.4.19-20250825_17558853.el7                   @commandline                  643 M

Transaction Summary
===============================================================================================================================================
Install  1 Package

Total size: 643 M
Installed size: 2.8 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.x86_64                                                                 1/1
  Installing       : t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64                                                                 1/1
  Running scriptlet: t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64                                                                 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.x86_64                                                                 1/1

Installed:
  t-polardbx-engine-8.4.19-20250825_17558853.el7.x86_64

Complete!
[root@localhost ~]# ll /opt/polardbx_engine/
total 732K
drwxr-xr-x.  2 root root 4.0K Jan  8 16:21 bin
drwxr-xr-x.  2 root root 4.0K Jan  8 16:21 docs
drwxr-xr-x.  3 root root 4.0K Jan  8 16:21 include
drwxr-xr-x.  6 root root 4.0K Jan  8 16:21 lib
-rwxr-xr-x.  1 root root 277K Jan  8 16:21 LICENSE
-rwxr-xr-x.  1 root root 119K Jan  8 16:21 LICENSE.router
-rwxr-xr-x.  1 root root 277K Jan  8 16:21 LICENSE-test
drwxr-xr-x.  4 root root 4.0K Jan  8 16:21 man
-rwxr-xr-x.  1 root root 1.6K Jan  8 16:21 mysqlrouter-log-rotate
-rwxr-xr-x.  1 root root  952 Jan  8 16:21 README
-rwxr-xr-x.  1 root root  679 Jan  8 16:21 README.router
-rwxr-xr-x.  1 root root  952 Jan  8 16:21 README-test
drwxr-xr-x.  2 root root 4.0K Jan  8 16:21 run
drwxr-xr-x. 28 root root 4.0K Jan  8 16:21 share
drwxr-xr-x.  2 root root 4.0K Jan  8 16:21 support-files
drwxr-xr-x.  3 root root 4.0K Jan  8 16:21 var
[root@localhost ~]#
[root@localhost ~]# useradd -ms /bin/bash polarx
[root@localhost ~]# echo "polarx:polarx" | chpasswd
[root@localhost ~]# echo "polarx    ALL=(ALL)    NOPASSWD: ALL" >> /etc/sudoers
[root@localhost ~]# su - polarx


Welcome to 4.19.90-2003.4.0.0036.oe1.x86_64

System information as of time:  Thu Jan  8 16:22:54 CST 2026

System load:    0.54
Processes:      101
Memory used:    3.6%
Swap used:      0.0%
Usage On:       21%
IP address:     192.168.122.10
Users online:   2



[polarx@localhost ~]$ mkdir polardbx-engine
[polarx@localhost ~]$ cd polardbx-engine && mkdir log mysql run data tmp
[polarx@localhost polardbx-engine]$ ll
total 20K
drwx------. 2 polarx polarx 4.0K Jan  8 16:23 data
drwx------. 2 polarx polarx 4.0K Jan  8 16:23 log
drwx------. 2 polarx polarx 4.0K Jan  8 16:23 mysql
drwx------. 2 polarx polarx 4.0K Jan  8 16:23 run
drwx------. 2 polarx polarx 4.0K Jan  8 16:23 tmp
[polarx@localhost polardbx-engine]$ vim my.cnf
[polarx@localhost 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@localhost polardbx-engine]$
[polarx@localhost polardbx-engine]$ sudo yum install libaio-devel -y
Last metadata expiration check: 0:04:02 ago on Thu 08 Jan 2026 04:19:49 PM CST.
Dependencies resolved.
===============================================================================================================================================
 Package                             Architecture                  Version                                 Repository                     Size
===============================================================================================================================================
Installing:
 libaio-devel                        x86_64                        0.3.112-1.oe1                           update                         10 k
Upgrading:
 libaio                              x86_64                        0.3.112-1.oe1                           update                         21 k

Transaction Summary
===============================================================================================================================================
Install  1 Package
Upgrade  1 Package

Total download size: 32 k
Downloading Packages:
(1/2): libaio-devel-0.3.112-1.oe1.x86_64.rpm                                                                    26 kB/s |  10 kB     00:00
(2/2): libaio-0.3.112-1.oe1.x86_64.rpm                                                                          39 kB/s |  21 kB     00:00
-----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                           57 kB/s |  32 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                       1/1
  Upgrading        : libaio-0.3.112-1.oe1.x86_64                                                                                           1/3
  Installing       : libaio-devel-0.3.112-1.oe1.x86_64                                                                                     2/3
  Cleanup          : libaio-0.3.111-5.oe1.x86_64                                                                                           3/3
  Running scriptlet: libaio-0.3.111-5.oe1.x86_64                                                                                           3/3
  Verifying        : libaio-devel-0.3.112-1.oe1.x86_64                                                                                     1/3
  Verifying        : libaio-0.3.112-1.oe1.x86_64                                                                                           2/3
  Verifying        : libaio-0.3.111-5.oe1.x86_64                                                                                           3/3

Upgraded:
  libaio-0.3.112-1.oe1.x86_64

Installed:
  libaio-devel-0.3.112-1.oe1.x86_64

Complete!
[polarx@localhost polardbx-engine]$
[polarx@localhost polardbx-engine]$ /opt/polardbx_engine/bin/mysqld --defaults-file=my.cnf --initialize-insecure
[polarx@localhost polardbx-engine]$
[polarx@localhost polardbx-engine]$ ^C
[polarx@localhost polardbx-engine]$
[polarx@localhost polardbx-engine]$ /opt/polardbx_engine/bin/mysqld_safe --defaults-file=my.cnf &
[1] 2817
[polarx@localhost polardbx-engine]$ 2026-01-08T08:28:27.115219Z mysqld_safe Logging to '/home/polarx/polardbx-engine/log/alert.log'.
2026-01-08T08:28:27.142472Z mysqld_safe Starting mysqld daemon with databases from /home/polarx/polardbx-engine/data

[polarx@localhost polardbx-engine]$
[polarx@localhost polardbx-engine]$ netstat -antp|grep 4886
-bash: netstat: command not found
[polarx@localhost polardbx-engine]$
[polarx@localhost polardbx-engine]$ sudo yum install net-tools -y
Last metadata expiration check: 0:09:03 ago on Thu 08 Jan 2026 04:19:49 PM CST.
Dependencies resolved.
===============================================================================================================================================
 Package                            Architecture                    Version                                  Repository                   Size
===============================================================================================================================================
Installing:
 net-tools                          x86_64                          2.0-0.54.oe1                             OS                          196 k

Transaction Summary
===============================================================================================================================================
Install  1 Package

Total download size: 196 k
Installed size: 869 k
Downloading Packages:
net-tools-2.0-0.54.oe1.x86_64.rpm                                                                              617 kB/s | 196 kB     00:00
-----------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                          614 kB/s | 196 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                       1/1
  Installing       : net-tools-2.0-0.54.oe1.x86_64                                                                                         1/1
  Running scriptlet: net-tools-2.0-0.54.oe1.x86_64                                                                                         1/1
  Verifying        : net-tools-2.0-0.54.oe1.x86_64                                                                                         1/1

Installed:
  net-tools-2.0-0.54.oe1.x86_64

Complete!
[polarx@localhost polardbx-engine]$
[polarx@localhost 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      3134/mysqld
tcp6       0      0 :::14886                :::*                    LISTEN      3134/mysqld
[polarx@localhost polardbx-engine]$
[polarx@localhost 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> ^DBye
[polarx@localhost polardbx-engine]$ cat /etc/openEuler-release
openEuler release 20.03 (LTS)
[polarx@localhost polardbx-engine]$ date
Thu Jan  8 16:29:21 CST 2026
[polarx@localhost polardbx-engine]$ date -R
Thu, 08 Jan 2026 16:29:23 +0800
[polarx@localhost polardbx-engine]$
相关文章
|
1月前
|
Linux 数据库
Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程
本文介绍在CentOS 7.9环境下安装PolarDB-X单机版数据库的完整流程,涵盖系统环境准备、本地Yum源配置、RPM包安装、用户与目录初始化、依赖库解决、数据库启动及客户端连接等步骤,助您快速部署运行PolarDB-X。
561 1
Linux 环境 Polardb-X 数据库 单机版 rpm 包 安装教程
|
26天前
|
Ubuntu Java Linux
ARM Linux 环境 国产 华为 欧拉 openEuler 20.03 操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文介绍在ARM64架构的openEuler 20.03系统上,通过RPM包安装部署PolarDB-X单节点数据库的完整过程,涵盖环境准备、RPM安装、用户配置、数据库初始化及启动连接等步骤,助力用户在国产化软硬件平台上快速搭建PolarDB-X运行环境。
289 1
|
SQL Kubernetes 关系型数据库
如何一键安装部署PolarDB-X
《PolarDB-X 动手实践》系列第一期,体验如何一键安装部署PolarDB-X。
|
27天前
|
存储 安全 对象存储
手把手教你如何开启阿里云OSS存储服务并布署到网站1
本文介绍如何在阿里云OSS创建首个存储空间(Bucket)并配置RAM用户。首先登录OSS控制台创建Bucket,填写名称与地域;随后进入RAM控制台创建用户并获取访问密钥,实现安全访问。附详细步骤图示与链接示例,助您快速搭建对象存储环境。
310 6
|
1月前
|
Linux 数据库
Linux 环境 国产银河麒麟V10操作系统安装 Polardb-X 数据库 单机版 rpm 包 教程
本文介绍在国产银河麒麟V10操作系统上安装Polardb-X单机版数据库的完整过程。基于RPM包方式部署,步骤与CentOS 7.9类似,涵盖系统环境确认、依赖安装、用户配置、初始化数据目录及启动服务等关键环节,并通过命令验证运行状态,助力国产化平台数据库搭建。
430 0
|
4月前
|
SQL 关系型数据库 MySQL
开源新发布|PolarDB-X v2.4.2开源生态适配升级
PolarDB-X v2.4.2开源发布,重点完善生态能力:新增客户端驱动、开源polardbx-proxy组件,支持读写分离与高可用;强化DDL变更、扩缩容等运维能力,并兼容MySQL主备复制及MCP AI生态。
开源新发布|PolarDB-X v2.4.2开源生态适配升级
|
26天前
|
Ubuntu Linux 数据库
Linux 环境 Docker 安装 Polardb-X 数据库 容器 教程
本文介绍如何通过 Docker 快速部署 Polardb-X 数据库容器,实现一键启动。涵盖镜像拉取、容器运行、登录验证等步骤,操作简便,适用于快速开发与测试环境。附往期7篇主流系统安装教程。
232 5
|
27天前
|
Java Linux 数据库连接
PolarDB-X 集中式三节点高可用集群部署 & Java 场景 CRUD 应用
本文介绍在CentOS 7.9、openEuler 20.03及银河麒麟V10上部署PolarDB-X三节点高可用集群的完整过程,涵盖环境准备、配置文件设置、集群初始化与启动,并通过Java应用实现CRUD操作验证。集群支持自动主备切换,确保服务高可用,适用于生产环境数据库架构搭建与学习参考。
325 0
|
24天前
|
Kubernetes 容器 数据库
K8S 部署 阿里云 PolarDB-X 集群(企业版、标准版)minikube 教程
本文介绍在 Minikube Kubernetes 环境中部署 PolarDB-X 数据库的完整实践,涵盖环境准备、Operator 安装、企业版与标准版集群部署。通过 Helm 快速部署 Operator,并分别搭建分布式与三节点高可用架构,验证核心功能。虽 K8S 部署便捷,但生产环境建议谨慎使用,尤其对有状态数据库系统。附系列前8篇安装指南供参考。
866 2

热门文章

最新文章