13.5 C
Texas
angeloma
Senior Writer and partner

How to install MariaDB 10.6 on Rocky Linux 8 / AlmaLinux 8 / CentOS 8?

Rocky Linux 8 / AlmaLinux 8 / 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.6 on Rocky Linux 8 / AlmaLinux 8 / 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 Rocky Linux 8 / AlmaLinux 8 / 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.6 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.6 on Rocky Linux 8 / AlmaLinux 8 / CentOS 8

- Advertisement -

MariaDB’s support with Linux is quite good and proof of this is that it provides us with a dedicated repository for Rocky Linux 8 / AlmaLinux 8 / 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.

dnf update

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

nano /etc/yum.repos.d/mariadb.repo

And add the following information:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.6/rhel8-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.6

dnf install mariadb-server

During the installation, you will have to accept the GPG key from the repository and the installation will continue.

2.- Installing MariaDB 10.6 on Rocky Linux 8 / AlmaLinux 8 / CentOS 8
2.- Installing MariaDB 10.6 on Rocky Linux 8 / AlmaLinux 8 / CentOS 8

Then you have to start the MariaDB service:

systemctl start mariadb

and proceed to the configuration with the mariadb_secure_installation script

mariadb_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.6.3-MariaDB, for Linux (x86_64) using readline 5.1

So, you can enjoy MariaDB.

Conclusion

MariaDB 10.6 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 Rocky Linux 8 / AlmaLinux 8 / CentOS 8.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article