CentOS7.3编译安装MariaDB10.2.12
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7.3编译安装MariaDB10.2.12相关的知识,希望对你有一定的参考价值。
在CentOS7.3编译安装MariaDB10.2.12详细教程
1. 删除CentOS7.3默认数据库配置文件
查看默认数据库配置文件
[[email protected] ~]# find -H /etc/ | grep my.c /etc/pki/tls/certs/make-dummy-cert /etc/pki/tls/certs/renew-dummy-cert /etc/my.cnf.d /etc/my.cnf.d/mysql-clients.cnf /etc/my.cnf
删除默认数据库配置文件
[[email protected] ~]# rm -rf /etc/my.cnf /etc/my.cnf.d/
再次查看默认数据库配置文件
[[email protected] ~]# find -H /etc/ | grep my.c /etc/pki/tls/certs/make-dummy-cert /etc/pki/tls/certs/renew-dummy-cert
到目前为止, 系统最小化安装自带的数据库配置文件已经删除干净了!
2. 卸载系统自带mariadb-libs
查询
[[email protected] ~]# rpm -qa|grep mariadb-libs mariadb-libs-5.5.52-1.el7.x86_64
卸载
[[email protected] ~]# rpm -e mariadb-libs-5.5.52-1.el7.x86_64 --nodeps
安装相关包
[[email protected] ~]# yum -y install libaio [[email protected] ~]# yum -y install libaio-devel [[email protected] ~]# yum -y install bison [[email protected] ~]# yum -y install bison-devel [[email protected] ~]# yum -y install zlib-devel [[email protected] ~]# yum -y install openssl [[email protected] ~]# yum -y install openssl-devel [[email protected] ~]# yum -y install ncurses [[email protected] ~]# yum -y install ncurses-devel [[email protected] ~]# yum -y install libcurl-devel [[email protected] ~]# yum -y install libarchive-devel [[email protected] ~]# yum -y install boost [[email protected] ~]# yum -y install boost-devel [[email protected] ~]# yum -y install wget [[email protected] ~]# yum -y install gcc [[email protected] ~]# yum -y install gcc-c++ [[email protected] ~]# yum -y install make [[email protected] ~]# yum -y install cmake [[email protected] ~]# yum -y install perl [[email protected] ~]# yum -y install kernel-headers [[email protected] ~]# yum -y install kernel-devel [[email protected] ~]# yum -y install pcre-devel
如果yum在某些环境下(内网.不能连接外网的情况)可以在网易的开源镜像搜索下载对应rpm包进行安装 网易开源镜像地址:
http://mirrors.163.com/centos/7/os/x86_64/Packages/
rpm -ivh your-package.rpm ---安装rpm包 rpm -Uvh your-package.rpm ---升级rpm包 rpm -q package-name ---查询包是否被安装 rpm -e package-name --nodeps ---卸载某个包 不检查依赖
自动解决依赖关系
yum localinstall xxx.rpm
3. 创建家目录存放软件包目录
这里目录名字可以随意
[[email protected] ~]# mkdir soft [[email protected] ~]# cd soft
4. MariaDB官网复制源码包链接地址并下载解压
下载
[[email protected] soft]# wget https://downloads.mariadb.org/interstitial/mariadb-10.2.12/source/mariadb-10.2.12.tar.gz
解压
tar -zxvf mariadb-10.2.12.tar.gz
以上是关于CentOS7.3编译安装MariaDB10.2.12的主要内容,如果未能解决你的问题,请参考以下文章
centos7.3编译安装LAMP环境并搭建WordPress博客
centos7.3 编译安装lamp,利用wordpress实现个人博客搭建