---
title: "How to install MariaDB 10 on CentOS 7 / RHEL 7"
publish_date: 2014-10-10
updated_date: 2020-02-20
author: "MariaDB"
---

# How to install MariaDB 10 on CentOS 7 / RHEL 7

MariaDB Server has grown substantially in the past 6 years, so in February 2020 we’ve provided a refresh of this topic. You can find it [here](https://staging-mdb.com/resources/blog/installing-mariadb-10-on-centos-7-rhel-7/). If you are looking to upgrade to RHEL 8, you may enjoy our blog, “[How to install MariaDB Server on RHEL 8 / CentOS 8](https://staging-mdb.com/resources/blog/how-to-install-mariadb-on-rhel8-centos8/)“.

![](https://staging-mdb.com/wp-content/uploads/2014/10/dots-separator.png)

Installing MariaDB became very easy on the latest CentOS /RHEL Linux version 7. During initial setup MariaDB has a tick in the graphical setup environment which enables MariaDB and replaces MySQL.

During installation the section

![](/sites/default/files/pictures/Images/centos3.png)

allows enabling a MariaDB server.

![](/sites/default/files/pictures/Images/centos2.png)

If you prefer the command line the installation can be performed with:

```
shell> yum install mariadb-server
```

MariaDB is shipped untuned and not protected with MariaDB version 5.5.35. No basic optimizations in the configuration file have been set and the root user has no password. An update will install the version 5.5.37. (The latest version of MariaDB October 2014 is Version 5.5.39).

```
shell> yum update
```

It is important to secure the server. MariaDB is shipped with a script to harden the system accordingly using a user dialog. It is highly recommended to use this script before creating and populating the databases.

```
shell> mysql_secure_installation
```

Install the latest Version 10 is an easy step since MariaDB’s repository configuration wizard <https://downloads.mariadb.org/mariadb/repositories> has now the latest CentOS/RHEL version available.

Before installing 10.0 it is important to perform a backup and remove the existing 5.5 version

```
shell> yum remove mariadb-server mariadb-libs
```

Create the repository settings using the link and follow the steps

![](/sites/default/files/pictures/Images/centos.png)

```
shell> /etc/init.d/mysql start
shell> mysql_upgrade
```

You are now running the latest 10.0 version!