Installing Using an RPM Package
The RPM package installation supports offline installation and online installation. Select an installation method based on actual requirements.
For details about the offline installation, see Offline Installation. For details about the online installation, see Online Installation.
Offline Installation
The offline installation uses MariaDB 10.3.9 as an example. You can refer to this section when installing MariaDB of other versions.
- Download the RPM package to the /home directory on the server.
1 2
cd /home wget https://mirrors.huaweicloud.com/kunpeng/yum/el/8/aarch64/Packages/database/mariadb-10.3.9-1.el8.aarch64.rpm --no-check-certificate
- Go to the /home directory and install MariaDB 10.3.9.
1 2
cd /home rpm -ivh mariadb-10.3.9-1.el8.aarch64.rpm
If MariaDB fails to be installed and the message "error: Failed dependencies: (mariadb >= 3:10.3.27 if mariadb) is needed by (installed) mariadb-connector-c-3.1.11-2.el8_3.aarch64" is displayed, run the following command to uninstall mariadb-connector-c-3.1.11-2.el8_3.aarch64 and reinstall MariaDB:
1yum -y remove mariadb-connector-c-3.1.11-2.el8_3.aarch64
- View the installed RPM package.
1rpm -qa | grep mariadb-10.3.9

- Check the path for MariaDB after the installation.
1ll /usr/local/mariadb
Online Installation
The online installation uses MariaDB 10.3.8 as an example. You can refer to this section when installing MariaDB of other versions.
- Configure the yum source.
- Back up the original yum repository files and create a repo directory.
1 2
mv /etc/yum.repos.d/ /etc/yum.repos.d-bak mkdir /etc/yum.repos.d
- Write the new configuration to the repo file:
- For CentOS 7.6:
1echo -e "[kunpeng]\nname=CentOS-kunpeng - Base - mirrors.huaweicloud.com\nbaseurl=https://mirrors.huaweicloud.com/kunpeng/yum/el/7/aarch64/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/CentOS-Base-kunpeng.repo
- For CentOS 8.1:
echo -e "[kunpeng]\nname=CentOS-kunpeng - Base - mirrors.huaweicloud.com\nbaseurl=https://mirrors.huaweicloud.com/kunpeng/yum/el/8/aarch64/\ngpgcheck=0\nenabled=1" > /etc/yum.repos.d/CentOS-Base-kunpeng.repo
- For CentOS 7.6:
- Check whether the new configuration is successfully written to the repo file in step 1.b:
1cat /etc/yum.repos.d/CentOS-Base-kunpeng.repoIf the command output is the same as the written content in 1.b, the operation is successful.

- Make the yum source take effect.
yum clean all yum makecache
- Back up the original yum repository files and create a repo directory.
- Install the RPM package.
1yum -y install mariadb-10.3.8-1.el7.aarch64 --enablerepo=kunpeng

- View the installed RPM package.
1rpm -qa | grep mariadb
