Linux · 2019年8月10日 0

CentOS7 安装官网最新MariaDB

在/etc/yum.repos.d/创建MariaDB.repo
方法一
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


方法二,官网的方法
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
yum install -y mariadb-server

比较慢,需要挂代理。
https://mariadb.com/kb/en/library/documentation/mariadb-administration/getting-installing-and-upgrading-mariadb/binary-packages/mariadb-package-repository-setup-and-usage/

初始化命令 mysql_secure_installation

使用国内服务器比较快:

Here is your custom MariaDB YUM repository entry for CentOS. Copy and paste it into a file under /etc/yum.repos.d (we suggest naming the file MariaDB.repo or something similar).

# MariaDB 10.5 CentOS repository list - created 2021-01-29 07:48 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://mirrors.nju.edu.cn/mariadb/yum/10.5/centos7-amd64
gpgkey=https://mirrors.nju.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1