MariaDB Installation via RPMs on CentOS 7

A detailed walkthrough for installing a specific legacy version of MariaDB (10.1.21) on CentOS 7 using individual RPM packages, including dependency resolution.

This guide provides the detailed steps for installing MariaDB 10.1.21 via individual RPM packages on CentOS 7. The process involves installing dependencies, then the main packages, and resolving potential conflicts as they appear.

The RPMs needed for the installation are available from the MariaDB website. The required packages for this guide are:

jemalloc-3.6.0-1.el7.x86_64.rpm
MariaDB-10.1.21-centos7-x86_64-client.rpm
MariaDB-10.1.21-centos7-x86_64-compat.rpm
galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm
jemalloc-devel-3.6.0-1.el7.x86_64.rpm
MariaDB-10.1.21-centos7-x86_64-common.rpm
MariaDB-10.1.21-centos7-x86_64-server.rpm

Step-by-Step Installation

1. Install Basic Dependencies

First, use yum to install some general system packages that may be required.

yum install rsync nmap lsof perl-DBI nmap-ncat

2. Install MariaDB RPM Packages

Next, install the downloaded RPMs in sequence. Make sure to run these commands as a user with sufficient privileges (e.g., using sudo).

rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm
rpm -ivh jemalloc-devel-3.6.0-1.el7.x86_64.rpm
rpm -ivh MariaDB-10.1.21-centos7-x86_64-common.rpm
rpm -ivh MariaDB-10.1.21-centos7-x86_64-compat.rpm
rpm -ivh MariaDB-10.1.21-centos7-x86_64-client.rpm
rpm -ivh galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm
rpm -ivh MariaDB-10.1.21-centos7-x86_64-server.rpm

Troubleshooting Common Installation Errors and Warnings

Error 1: Package Conflict with mariadb-libs

While installing mariadb-common, you may encounter a conflict with an existing package.

Error 2: Failed Dependency for Galera

While installing the Galera package, the installation may fail due to a missing library.

Warning: GPG Key NOKEY

You may also see a warning about a missing GPG key during the installation.

Post-Installation

After all RPMs are successfully installed, the final step is to secure the server. This involves setting the root password, removing test databases, and disallowing remote root login.


This page is licensed: CC BY-SA / Gnu FDL

Last updated

Was this helpful?