linux下离线和在线安装MariaDb

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/dechong/article/details/78635116

版本:centos7
Linux下安装MariaDB官方文档参见:https://mariadb.com/kb/zh-cn/installing-mariadb-with-yum/

系统及版本选择:
https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna
添加配置文件

vi /etc/yum.repos.d/MariaDB_10.2.repo

配置MariaDB文件路径

# MariaDB 10.2 CentOS repository list - created 2017-11-25 14:57 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

使用yum或者rpm安装依赖:readline-devel,zlib-devel,openssl-devel,libaio-devel并且readline-devel依赖于ncurses-devel,如果使用yum的话会自动将所需依赖安装好,具体命令如下:

yum -y install readline-devel
yum -y install zlib-devel
yum -y install openssl-devel
yum -y install libaio-devel

运行安装命令安装MariaDB

 yum -y install MariaDB*

 systemctl start mariadb #启动服务
 systemctl enable mariadb #设置开机启动
 systemctl restart mariadb #重新启动
 systemctl stop mariadb.service #停止MariaDB

离线安装
官方下载地址:
https://mirrors.tuna.tsinghua.edu.cn/mariadb//mariadb-10.2.10/yum/centos6-amd64/rpms/

这里写图片描述

展开阅读全文

没有更多推荐了,返回首页