Add a mariadb yum source
Yum source for Linux distributions based on Yum, using the online source generator makes it easy to generate the right mariadb.repo for your distribution.
Different system versions of the Yum Source generator:
https://downloads.mariadb.org/mariadb/repositories/#mirror =tuna&distro=centos
Currently there are CentOS 5, CentOS 6, Rhel 5, Rhel 6, Fedora, and Fedora 17 yum sources.
The generated Mariadb.repo is added to the file and placed under the "/etc/yum.repos.d/" directory. (recommended naming is similar to/etc/yum.repos.d/mariadb.repo)
Here is an example of CentOS 5 X86 Mariadb.repo file:
[MARIADB]
Name = MariaDB
BaseURL = http://yum.mariadb.org/5.5/centos5-x86
Gpgkey=https://yum.mariadb.org/rpm-gpg-key-mariadb
Gpgcheck=1
The above example file contains the Gpgkey command line, which automatically obtains the GPG key we use to sign the source, which allows Yum and RPM to verify the integrity of the downloaded package.
The ID of the key we signed is 0xcbcb082a1bb943db. The short form ID is 0x1bb943db, and the full key fingerprint is:
1993 69E5 404B d5fc 7d2f e43b cbcb 082A 1bb9 43DB
installing mariadb with Yum
Once you have the repo file ready, you can now install mariadb like this:
sudo yum install mariadb-server mariadb-client
If you have not yet installed the GPG signing key, Yum will prompt you to install it (before installing the package) after downloading the package.
If the server already has the Mariadb-galera-server package installed, you may need to remove it before installing Mariadb-server. (using sudo yum remove mariadb-galera-server), deleting mariadb-galera-server rpm packages will not delete any databases, but any upgrade should be backed up first.
Installing MARIADB galera cluster cluster tool with Yum
MariaDB galera cluster Installation instructions and MariaDB is almost the same, the installation of the required repo files is the same, the difference is that you need to install Mariadb-galera-server and Galera package, Instead of mariadb-server packages, like this:
sudo yum install mariadb-galera-server mariadb-client galera
Like Mariadb-server, if you have not yet installed GPG signing keys, Yum will prompt you to install them (before installing the package) after downloading the package.
If the server already has the Mariadb-server package installed, you may need to remove it before installing Mariadb-galera-server. (using sudo yum remove mariadb-server), deleting mariadb-server rpm packages will not delete any databases, but each upgrade should be backed up first.
See the Galera section for more information about MARIADB Galera cluster.
after installation is complete
start mariadb with a command after the installation is complete:
Sudo/etc/init.d/mysql Start
to manually import mariadb signing keys
You can manually install the GPG key by using the RPM:
sudo rpm--import Https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
This article is from the "Boyhack" blog, make sure to keep this source http://461205160.blog.51cto.com/274918/1942994
Installing MARIADB with Yum