CentOS 8 is perhaps the most stable Linux distributions out there. This is because the packages that are part of the official repositories are frozen and tested many times by many people. However, this brings a consequence: that we will not be able to have the most recent versions of the programs. An example of this is MariaDB which is a vital program for many people. So, today I will show you how to install MariaDB 10.5 on CentOS 8.
MariaDB is a well-known archi Database Relationships Management System that is a MySQL fork. This is due to the purchase of Sun Mycrosystem by Oracle. It is perfectly compatible with MySQL and is available in most Linux distributions.
In CentOS 8 the version of MariaDB that is available in the official repositories is 10.3 but recently has seen the release of version 10.5 with some interesting new features.
So, if you want to take advantage of having a recent version of this database manager, then welcome.
Install MariaDB 10.5 on CentOS 8
MariaDB’s support with Linux is quite good and proof of this is that it provides us with a dedicated repository for CentOS 8 to facilitate installation.
So, access your server or start a terminal session and update the system. In this post, I worked as the root user. Also, you can use sudo if your user has permission to do so.
And make sure you have installed the nano text editor
dnf install nano
Then we have to create a new repository entry in the DNF configuration which is /etc/yum.repos.d/
So, create a file called mariadb.repo
And add the following information:
[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.5/centos8-amd64 module_hotfixes=1 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
Then save the changes and close the editor.
Now install MariaDB 10.5
dnf install mariadb-server
During the installation, you will have to accept the GPG key from the repository and the installation will continue.
Then you have to start the MariaDB service:
systemctl start mariadb
and proceed to the configuration with the
mysql_secure_installation Switch to unix_socket authentication [Y/n] y Remove anonymous users? [Y/n] Disallow root login remotely? [Y/n] Remove test database and access to it? [Y/n] Reload privilege tables now? [Y/n]
After the installation is complete, check the installed version:
mysql --version mysql Ver 15.1 Distrib 10.5.8-MariaDB, for Linux (x86_64) using readline 5.1
So, you can enjoy MariaDB.
MariaDB 10.5 is a good improvement over previous versions. But it is not always available in the official repositories of other Linux distributions. Today you have learned how to install it in CentOS 8.