Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install MariaDB using yum

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Add a YUM source for MariaDB

Based on the YUM source of YUM's Linux distribution, you can easily generate the correct MariaDB.repo for your distribution using an online source generator.

Different system versions of yum source generators:

Https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna&distro=CentOS

Currently, there are YUM sources for CentOS 5, CentOS 6, RHEL 5, RHEL 6, Fedora 16, and Fedora 17.

Add the generated MariaDB.repo to the file and place it in the "/ etc/yum.repos.d/" directory. (it is recommended to name it similar to / etc/yum.repos.d/MariaDB.repo)

Here is an example MariaDB.repo file for CentOS 5 X86:

[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 can be used by YUM and rpm to verify the integrity of the downloaded package.

The id of the key we signed is 0xcbcb082a1bb943db. The short form of id is 0x1BB943DB, and the complete key fingerprint is:

1993 69E5 404B D5FC 7D2F E43B CBCB 082A 1BB9 43DB

Install MariaDB with yum

With the repo file ready, you can now install MariaDB like this:

Sudo yum install MariaDB-server MariaDB-client

If you have not already installed the GPG signing key, YUM will prompt you to install it after downloading the package (before installing 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 the rpm package for MariaDB-Galera-server does not delete any database, but any upgrade should be backed up first.

Install MariaDB Galera Cluster Cluster tools with yum

The installation instructions for MariaDB Galera Cluster are almost the same as MariaDB, and the repo files required for installation are the same, except that you need to install MariaDB-Galera-server and galera packages instead of MariaDB-server packages, like this:

Sudo yum install MariaDB-Galera-server MariaDB-client galera

Like MariaDB-server, if you have not installed the GPG signature key, YUM will prompt you to install it after downloading the package (before installing 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 the rpm package for MariaDB-server does not delete any databases, but should be backed up first with each upgrade.

Check the Galera section for more information about MariaDB Galera Cluster.

After installation is complete

After the installation is complete, start MariaDB with the command:

Sudo / etc/init.d/mysql start

Manually import the signing key of MariaDB

You can install the GPG key manually by using rpm:

Sudo rpm-- import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 226

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report