Both Red Hat Enterprise Linux 7 (RHEL 7) and CentOS Linux 7 is shipped with MariaDB 5.5 as the default database server version. Now, since MariaDB v5.5 has reached its end of life and has long been removed from MariaDB Repositories, so it’s not recomended to using it on production environment.

MariaDB 5.5 is known as LTS version of MariaDB database server and it’s get 8 years support starting from 11 April 2012 to 11 April 2020. Well, MariaDB Foundation has released MariaDB 10.5 on 24 Jun 2020 and will still get actively support and security maintenance until 24 Jun 2025. It’s the latest stable release after MariaDB 10.4 become old-stable version.

On this today guide I will teach you on how to install and configure MariaDB 10.5 database server on both RedHat EL7 and CentOS 7 machine. It’s quite easy to deploy MariaDB 10.5 on both distribution system, since CentOS 7 has the same binary code and functionality with it upstream source, RHEL 7.

PLEASE NOTE: On this guide i’m using $5 Digital Ocean droplet (1GB RAM, 1vCPU, 25GB SSD storage and 1000 GB bandwidth) running CentOS 7 Linux.

PREREQUISITES
* Virtual Machine / Cloud Server with RHEL / CentOS 7
* Server IPv4 Address
* Full Root Access
* gNome Terminal for Linux Users
* PuTTy SSH Client for Windows Users

1.) Update Your System Firts

If you’re using freshly deployed virtual or cloud server, you must perform system update to get any update or security path from the OS vendor. On this case is especially Red Hat and CentOS.

$ yum update

2.) Adding MariaDB Repository to Your System

Simply add the following MariaDB repository to your machine before we can install it on your system. You can using your flavouer editor like vim or nano editors. And then create a file called MariaDB.repo inside /etc/yum.repos.d/ directory.

* For CentOS 7

$ nano /etc/yum.repos.d/MariaDB.repo
----------------------------------------------------------
# MariaDB 10.5 CentOS repository list - created 2021-01-12 21:09 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
----------------------------------------------------------

* For Red Hat EL7

$ nano /etc/yum.repos.d/MariaDB.repo
----------------------------------------------------------
# MariaDB 10.5 RedHat repository list - created 2021-01-12 21:22 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
----------------------------------------------------------

3.) Run MariaDB Installer

Simply run the following command to run MariaDB 10.5 installer on your machine.

$ sudo yum install MariaDB-server MariaDB-client

And then restart the MariaDB service in order to move to the next step. If you don’t restart MariaDB service after installed it on your system, you cannot run mysql_secure_installation command. So, on this step we will using temporary root password for MariaDB 10.5 before we set the correct MariaDB root password.

Run the following commands:

$ systemctl restart mariadb.service

OR

$ service mariadb restart

4.) Securing Your MariaDB Installation

Well, after we have MariaDB 10.5 installed on your system, don’t forget to securing your MariaDB Installation in order to create secure production environment for your server. Ok, let’s run this simple command:

$ mysql_secure_installation

Dont forget to set root password as well during securing MariaDB installation.

5.) Restart and Tweaking Performance for Your MariaDB 10.5 Database Server

$ systemctl restart mariadb.service

OR

$ service mariadb restart

To make any tweaking or doing performance tuning for your MariaDB 10.5 database server, simply edit the MariaDB configuration file on my.cnf inside /etc/ directory.

$ nano /etc/my.cnf

CONCLUSION:

Setting up and configuring the latest stable version of MariaDB 10.5 on both RedHat EL7 and CentOS 7 machine is quite easy. You just need relax time to perform this installation procedure and it should be done under 20 minutes on fresh server.

LEAVE A REPLY

Please enter your comment!
Please enter your name here