使用官网发布的Yum源,安装MariaDB,减少编译安装的配置及后期维护成本。让管理更加简便。
官网:https://mariadb.org/
Yum配置链接:https://downloads.mariadb.org/mariadb/repositories/#mirror=shanghai-university
vi /etc/yum.repos.d/Mariadb.repo
# MariaDB 10.5 CentOS repository list - created 2021-03-13 05:24 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.5/centos8-amd64 module_hotfixes=1 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1
sudo dnf install MariaDB-server sudo systemctl start mariadb
设置开机启动
chkconfig mariadb on
使用阿里源:
# MariaDB 10.5 CentOS repository list - created 2021-03-13 05:24 UTC # http://downloads.mariadb.org/mariadb/repositories/ [mariadb] name = MariaDB baseurl = https://mirrors.aliyun.com/mariadb/yum/11.0/rhel9-amd64/ module_hotfixes=1 gpgkey=https://mirrors.aliyun.com/mariadb/yum/RPM-GPG-KEY-MariaDB gpgcheck=1
评论区