Centos7安装MariaDB10.5
第一步:添加 MariaDB yum 仓库
1.0、卸载Centos7自带的MariaDB5.5。
- 列出安装的包
[root@localhost ~]# rpm -qa | grep mariadb
mariadb-libs-5.5.41-2.el7_0.x86_64
- 卸载包
[root@localhost ~]# rpm -e --nodeps mariadb-libs-5.5.41-2.el7_0.x86_64
[root@localhost ~]# yum remove mariadb
1.1、在CentOS操作系统中/etc/yum.repos.d/目录下添加 MariaDB 的yum配置文件MariaDB.repo文件。
vim /etc/yum.repos.d/MariaDB.repo
在该文件中添加以下内容保存:
https://downloads.mariadb.org/mariadb/repositories/#distro=CentOS&distro_release=centos7-amd64–centos7&mirror=escience&version=10.5
# MariaDB 10.5 CentOS repository list - created 2021-05-30 14:43 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
1.2、清除yum的缓存并重新建立
[root@localhost src]# yum clean all
[root@localhost src]# yum makecache